Method and equipment for predicting nutrient intake of livestock and poultry feed based on blood amino acid
By constructing a physiological feed correlation graph for livestock and poultry and utilizing graph neural network prediction technology, the problems of cumbersome and inaccurate assessment in traditional methods have been solved, enabling accurate prediction of nutrient intake in livestock and poultry feed and adapting to the actual conditions of different livestock and poultry and feeds.
Patent Information
- Application Number
- CN202511119650.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-28
AI Technical Summary
Traditional methods for assessing nutrient intake in livestock and poultry feed are cumbersome, costly, and inaccurate, failing to accurately reflect the complex interactions between individual physiological states and feed nutrients.
A physiological-feed correlation graph for livestock and poultry was constructed, incorporating blood amino acid content. Deep learning was performed using graph neural networks, and the model was trained using experimental datasets to predict the intake of various nutrients in feed by livestock and poultry.
It enables rapid and accurate prediction of nutrient intake in livestock and poultry feed, enhances the model's generalization ability and practicality, and adapts to the actual conditions of different livestock and poultry breeds and feed formulations.
Smart Images

Figure CN121034547A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for predicting nutrient intake in livestock and poultry feed based on blood amino acids. Background Technology
[0002] In the livestock and poultry farming sector, accurately determining the intake of feed nutrients by livestock and poultry is crucial for optimizing feed formulation, improving farming efficiency, and ensuring livestock and poultry health. Traditional methods for assessing the intake of feed nutrients mainly rely on laboratory chemical analysis, indirectly inferring the intake and digestion of feed nutrients by sampling and analyzing excrement such as feces and urine.
[0003] However, the above methods have many limitations. On the one hand, the sampling process is cumbersome, requiring a lot of manpower and time, and it is difficult to guarantee the representativeness and timeliness of the sampling. On the other hand, laboratory analysis is costly, requiring professional equipment and technicians, which increases the cost of breeding. In addition, traditional methods only focus on the nutrient content in excrement, ignoring the impact of the individual physiological state of livestock and poultry (such as breed, age, weight, health status, etc.) and the complex interactions between feed nutrients on nutrient intake, resulting in insufficient accuracy of the assessment results and failing to provide a reliable basis for precision feeding of livestock and poultry. Summary of the Invention
[0004] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, an embodiment of the present invention provides a method for predicting nutrient intake in livestock and poultry feed based on blood amino acids, comprising: An initial livestock and poultry physiological feed association graph is constructed, comprising individual livestock and poultry nodes, feed nutrient nodes, and edges connecting the individual livestock and poultry nodes and the feed nutrient nodes. These edges represent the relationship between the intake of feed nutrient by the individual livestock and poultry, and the influence of the physiological indicators of the individual livestock and poultry on the absorption and utilization of feed nutrient. The content of various amino acids in the blood of corresponding livestock and poultry blood samples is obtained, and these amino acid contents are used as supplementary attributes and integrated into the corresponding individual livestock and poultry nodes in the livestock and poultry physiological feed association graph to obtain a target livestock and poultry physiological feed association graph. A graph neural network model to be trained is then used to analyze the target livestock and poultry physiological feed association graph. The graph neural network to be trained is subjected to deep learning processing. It learns the interaction features between nodes and updates node representations through a message passing mechanism. The deep learning graph neural network model is trained using an experimental dataset, and the model parameters are adjusted with actual nutrient intake as the label to obtain the target graph neural network model. The experimental dataset includes livestock physiological information, feed nutrient data, blood amino acid content, and actual nutrient intake. The physiological information of the livestock to be predicted, the feed nutrient composition, and the blood amino acid content are input into the target graph neural network model, and the target graph neural network model outputs the predicted intake results of various nutrients in the feed for the livestock.
[0005] In conjunction with a second aspect of the present invention, an embodiment of the present invention provides a device for predicting the intake of nutrients in livestock and poultry feed based on blood amino acids. The device includes: a memory storing a computer program thereon; and a processor for executing the computer program stored in the memory to implement the method for predicting the intake of nutrients in livestock and poultry feed based on blood amino acids as described in any of the first aspects.
[0006] The aforementioned technical solution constructs a physiological-feed correlation graph for livestock and poultry, comprehensively integrating and visualizing individual livestock and poultry information, feed nutrient information, and the complex relationships between them. This overcomes the limitations of traditional methods that focus only on single factors or simple relationships, and more accurately reflects the intrinsic connection between livestock and poultry physiological state and feed nutrient intake. Obtaining livestock and poultry blood samples and measuring the content of various amino acids in the blood are incorporated into the correlation graph as supplementary attributes. Using blood amino acids as sensitive indicators of livestock and poultry physiological state and nutrient metabolism further enriches the model's input information and improves prediction accuracy. A graph neural network model is used to perform deep learning processing on the correlation graph. Leveraging the powerful relational reasoning and feature aggregation capabilities of graph neural networks, the complex interaction features between nodes are automatically learned, uncovering potential patterns hidden in the data, effectively solving the problem of traditional methods struggling to handle complex nonlinear relationships. The model is trained using an experimental dataset containing diverse information, enabling it to adapt to different livestock and poultry breeds, growth stages, and feed formulations, enhancing its generalization ability and practicality. Finally, by inputting relevant information about the livestock and poultry to be predicted, the model can quickly and accurately output its predicted intake of various nutrients in the feed.
[0007] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0008] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the execution flow of the method for predicting nutrient intake in livestock and poultry feed based on blood amino acids provided in an embodiment of the present invention.
[0009] Figure 2 This is one implementation provided by an embodiment of the present invention. Figure 1 A flowchart of step S11.
[0010] Figure 3 This is one implementation provided by an embodiment of the present invention. Figure 1 A flowchart illustrating step S13.
[0011] Figure 4 This is one implementation provided by an embodiment of the present invention. Figure 1 A flowchart illustrating step S14.
[0012] Figure 5 This is a schematic diagram of exemplary hardware and software components of the device for predicting nutrient intake in livestock and poultry feed based on blood amino acids provided in an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0015] This invention provides a method for predicting nutrient intake in livestock and poultry feed based on blood amino acids. (See also...) Figure 1 As shown, the method includes: In step S11, an initial livestock and poultry physiological feed association graph is constructed. The initial livestock and poultry physiological feed association graph includes individual livestock and poultry nodes, feed nutrient nodes, and edges connecting the individual livestock and poultry nodes and the feed nutrient nodes. The edges are used to represent the relationship between the intake of the individual livestock and poultry and the intake of the feed nutrient, and the influence of the physiological indicators of the individual livestock and poultry on the absorption and utilization of the feed nutrient.
[0016] The attributes of the livestock and poultry individual nodes include breed, age, weight, and health status, while the attributes of the feed nutrient nodes include nutrient type, content, and ratio.
[0017] It can be explained that the livestock / poultry individual node represents each specific individual livestock / poultry, and its attributes cover multiple aspects. The breed attribute reflects the species to which the livestock / poultry belongs; different breeds of livestock / poultry differ significantly in growth characteristics and nutritional requirements. The age attribute reflects the growth stage of the livestock / poultry; livestock / poultry at different growth stages have different nutrient requirements and utilization abilities. The weight attribute directly reflects the growth status of the livestock / poultry, which is closely related to nutrient intake and utilization. The health status attribute describes the physical condition of the livestock / poultry; healthy livestock / poultry and sick livestock / poultry will have very different absorption and metabolism of nutrients.
[0018] Nutrient nodes represent the various nutrients contained in the feed. The nutrient type attribute clarifies the category to which the nutrient belongs, such as protein, carbohydrates, fat, vitamins, and minerals. Different types of nutrients play different roles in the growth, development, and maintenance of physiological functions in livestock and poultry. The content attribute indicates the actual amount of the nutrient present in the feed, determining the supply level of that nutrient in the feed. The proportion attribute reflects the relative proportion of the nutrient in the total feed composition, demonstrating the balance between various nutrients.
[0019] The edges connecting individual livestock and poultry nodes and feed nutrient nodes record the historical intake of corresponding feed nutrients by livestock and poultry. By analyzing this historical data, we can understand the dietary preferences and nutrient intake habits of livestock and poultry. The absorption and utilization impact attribute considers the influence of livestock and poultry physiological indicators on nutrient digestibility and utilization. For example, factors such as livestock and poultry weight and health status will affect their absorption and utilization efficiency of nutrients.
[0020] For example, constructing an initial physiological-feed correlation graph for livestock and poultry is based on graph theory. Individual livestock and poultry and feed nutrients are abstracted as nodes in the graph, and edges are used to describe the complex relationships between them. The relationship between an individual livestock and poultry and the intake of feed nutrients reflects the actual intake of various nutrients from the feed, such as a pig consuming a certain amount of protein and carbohydrates daily. The physiological indicators of an individual livestock and poultry (such as age, weight, and health status) affect the absorption and utilization of feed nutrients, and this influence is also represented by edges. For example, young livestock and poultry may have different absorption efficiency for certain nutrients compared to adults, and livestock and poultry in poor health may have a decreased ability to absorb nutrients. By constructing such a correlation graph, the multi-dimensional relationship between livestock and poultry physiology and feed nutrients can be visually displayed.
[0021] In step S12, the content of various amino acids in the blood corresponding to the livestock and poultry blood sample is obtained. The content of various amino acids is used as a supplementary attribute and integrated into the corresponding individual livestock and poultry node in the livestock and poultry physiological feed association diagram to obtain the target livestock and poultry physiological feed association diagram.
[0022] In this embodiment of the disclosure, after constructing the livestock and poultry physiological feed association graph, livestock and poultry blood samples can be obtained and the content of various amino acids in them can be measured. The amino acid content in the blood can reflect the nutritional status and physiological state of livestock and poultry. Integrating it as a supplementary attribute into the corresponding individual nodes of livestock and poultry in the livestock and poultry physiological feed association graph can further enrich the information of the association graph and improve the accuracy of prediction.
[0023] Among them, the content of various amino acids in blood can be determined using professional analytical methods, such as high performance liquid chromatography and amino acid analyzers.
[0024] In this embodiment, the measured blood amino acid content data is integrated as a supplementary attribute into the corresponding livestock and poultry individual node in the livestock and poultry physiological feed association graph. Specifically, the blood amino acid content data is associated with the livestock and poultry individual node and stored in the node's attribute field. In this way, each livestock and poultry individual node in the livestock and poultry physiological feed association graph includes multiple attributes such as breed, age, weight, health status, and blood amino acid content.
[0025] In one embodiment of this disclosure, step S121 involves collecting venous blood samples from the target livestock and poultry, wherein the collection time of the blood samples is kept at a fixed time interval from the feeding time.
[0026] During the collection process, it is essential to ensure the quality and representativeness of the blood samples. To guarantee the accuracy and comparability of the data, the blood sample collection time should be kept at a fixed interval from the feed feeding time. This is because feed intake affects the amino acid content in the blood, and a fixed time interval allows the collected blood samples to reflect the amino acid levels of livestock and poultry under relatively stable conditions.
[0027] Step S122: Use an amino acid analyzer to perform component analysis on the blood sample to obtain the content results of multiple amino acids, including essential amino acids and non-essential amino acids.
[0028] Among these methods, an amino acid analyzer was used to analyze its components. An amino acid analyzer is an instrument specifically designed to determine the content of amino acids; it can accurately analyze the content of various amino acids in blood samples.
[0029] During the testing process, the processed sample is injected into an amino acid analyzer, which separates and detects the amino acids based on their chemical and physical properties. The test results will display the content of various amino acids in the blood, including essential and non-essential amino acids. Essential amino acids are those that livestock and poultry cannot synthesize or whose synthesis rate cannot meet their growth and maintenance needs, and must be obtained from feed; non-essential amino acids are those that livestock and poultry can synthesize on their own.
[0030] Step S123: Perform data cleaning on the content detection results to remove abnormal detection values and retain valid amino acid content data.
[0031] After obtaining the amino acid content detection results, data cleaning is required. Data cleaning is to remove outlier values to ensure the accuracy and reliability of the data. Outlier values may be caused by errors in the detection process, sample contamination, or other reasons, which can adversely affect subsequent analysis and prediction.
[0032] During data cleaning, statistical methods can be used to analyze the test results and identify outliers. For example, by calculating the mean and standard deviation of the data, data points that deviate excessively from the mean can be considered outliers. These outliers are then removed from the dataset, retaining only the valid amino acid content data.
[0033] Step S124: Add an amino acid content supplementary attribute to the individual nodes of livestock and poultry corresponding to the target livestock and poultry in the livestock and poultry physiological feed association diagram. The supplementary attribute contains the specific content information of each amino acid.
[0034] After data cleaning, the effective amino acid content data is added as a supplementary attribute to the individual livestock and poultry nodes corresponding to the target livestock and poultry in the livestock and poultry physiological feed association graph. Specifically, the specific content information of each amino acid is stored in the attribute field of the node.
[0035] Step S125: Associate the amino acid content supplementation attribute with the original breed attribute, age attribute, weight attribute, and health status attribute of the livestock and poultry individual node, and complete the integration operation of blood amino acid data into the livestock and poultry physiological feed association graph.
[0036] To ensure that blood amino acid data can be effectively integrated into the livestock and poultry physiological feed association graph, the amino acid content supplementation attribute is associated with and stored in relation to the original breed, age, weight, and health status attributes of individual livestock and poultry nodes. A database management system can be used to implement this association storage, storing all attribute data in a unified data table and linking them using the unique identifier of each individual livestock and poultry node.
[0037] In step S13, the graph neural network model to be trained is invoked to perform deep learning processing on the target livestock and poultry physiological feed association graph. The graph neural network to be trained learns the interaction features between nodes through a message passing mechanism and updates the node representation.
[0038] In this embodiment of the disclosure, after constructing the livestock and poultry physiological feed association graph and integrating blood amino acid data, a graph neural network model is needed to perform deep learning processing on the association graph. A graph neural network is a deep learning model specifically designed for processing graph-structured data. It can learn the interaction features between nodes through a message passing mechanism, update node representations, and thus uncover potential information in the graph data.
[0039] The core of a graph neural network is the message passing mechanism, which updates node representations by passing messages between nodes. In each round of message passing, a node collects information from its neighbors and updates its representation by combining this information with its own. Through multiple iterations of message passing, nodes can learn the interaction features with their neighbors, thereby better representing their own characteristics and relationships with other nodes.
[0040] In this embodiment, the physiological-feed relationship graph of livestock and poultry is used as input to the graph neural network, and the representation of the nodes is updated through a message passing mechanism. The updated node representation will contain more information and can more accurately reflect the relationship between individual livestock and poultry and feed nutrients.
[0041] In step S14, the graph neural network model trained by deep learning is used with the experimental dataset, and the model parameters are adjusted with the actual nutrient intake as the label to obtain the target graph neural network model. The experimental dataset includes livestock and poultry physiological information, feed nutrient data, blood amino acid content and actual nutrient intake.
[0042] To enable graph neural network models to accurately predict the intake of various nutrients in feed by livestock and poultry, the models need to be trained using experimental datasets that include livestock and poultry physiological information, feed nutrient data, blood amino acid content, and actual nutrient intake. During training, the actual nutrient intake is used as a label, and the model parameters are continuously adjusted to ensure that the model's predictions are as close as possible to the actual values.
[0043] First, the experimental dataset is divided into a training set and a validation set. The training set is used for model training, while the validation set is used to evaluate model performance and tune training hyperparameters. The ratio of these two sets can be set according to specific circumstances; generally, most of the data is allocated to the training set to ensure that the model learns enough sample information.
[0044] A training sample is selected from the training set. Physiological information of livestock and poultry is extracted from the sample to construct individual node attributes in a livestock and poultry physiological-feed association graph. Feed nutrient data is extracted to construct feed nutrient node attributes and edge attributes in the same graph. Blood amino acid content is extracted as a supplementary attribute for individual livestock and poultry nodes. The constructed livestock and poultry physiological-feed association graph is input into a graph neural network model. Node representations are generated through a message passing mechanism, and nutrient intake predictions are calculated based on these node representations.
[0045] The difference between the predicted value and the actual nutrient intake labels in the training samples is calculated as the loss value. The loss value measures the deviation between the model's prediction and the actual value. By minimizing the loss value, the model's predictions can be made more accurate. The backpropagation algorithm is used to pass the loss value from the output layer to the input layer, adjusting the parameter weights of the message passing layer in the graph neural network. The backpropagation algorithm is a commonly used optimization algorithm in deep learning. It can automatically adjust the model's parameters based on the magnitude of the loss value, causing the model to be trained in the direction of reducing the loss value.
[0046] After iterating through the entire training set, the model's prediction accuracy is evaluated using the validation set. Training hyperparameters, such as the learning rate and the number of message passing layers, are adjusted based on the accuracy results until the model converges. Model convergence means that the model's performance no longer shows significant improvement on the validation set; at this point, the model's parameters have been adjusted to a suitable state.
[0047] In step S15, the physiological information of the livestock and poultry to be predicted, the composition of feed nutrients, and the blood amino acid content are input into the target graph neural network model to obtain the predicted intake results of various nutrients in the feed of the livestock and poultry output by the target graph neural network model.
[0048] In this embodiment, the physiological information of the livestock to be predicted, the composition of feed nutrients, and the blood amino acid content are input into the target graph neural network model. The model then processes this input data using the knowledge and parameters learned during training. First, the model maps these input data to node features in a graph and constructs a corresponding graph structure (similar to the physiological-feed correlation graph of the target livestock) based on the relationships between them. Then, information is passed between nodes through a message passing mechanism to update the node representations, ensuring that each node contains rich global and local feature information. Finally, based on the updated node representations, the model calculates and outputs the predicted intake of various nutrients in the feed for the livestock to be predicted through a specific output layer. This prediction result is based on the model's learning and analysis of a large amount of experimental data and has a certain degree of accuracy and reliability.
[0049] The aforementioned technical solution constructs a physiological-feed correlation graph for livestock and poultry, comprehensively integrating and visualizing individual livestock and poultry information, feed nutrient information, and the complex relationships between them. This overcomes the limitations of traditional methods that focus only on single factors or simple relationships, and more accurately reflects the intrinsic connection between livestock and poultry physiological state and feed nutrient intake. Obtaining livestock and poultry blood samples and measuring the content of various amino acids in the blood are incorporated into the correlation graph as supplementary attributes. Using blood amino acids as sensitive indicators of livestock and poultry physiological state and nutrient metabolism further enriches the model's input information and improves prediction accuracy. A graph neural network model is used to perform deep learning processing on the correlation graph. Leveraging the powerful relational reasoning and feature aggregation capabilities of graph neural networks, the complex interaction features between nodes are automatically learned, uncovering potential patterns hidden in the data, effectively solving the problem of traditional methods struggling to handle complex nonlinear relationships. The model is trained using an experimental dataset containing diverse information, enabling it to adapt to different livestock and poultry breeds, growth stages, and feed formulations, enhancing its generalization ability and practicality. Finally, by inputting relevant information about the livestock and poultry to be predicted, the model can quickly and accurately output its predicted intake of various nutrients in the feed.
[0050] In one possible implementation, see [link to relevant documentation] Figure 2 As shown, in step S11, constructing the initial livestock and poultry physiological feed correlation diagram includes: In step S111, an initial node set is created, which includes multiple individual livestock and poultry nodes and multiple feed nutrient nodes; In this embodiment of the disclosure, when constructing the livestock and poultry physiological feed association graph, an initial node set is first created. This set is the fundamental component of the entire graph, containing all the individual livestock and poultry nodes and feed nutrient nodes that need to be considered. In practice, this can be achieved by identifying and classifying the livestock and poultry in the breeding environment one by one, creating a corresponding node for each individual livestock and poultry. Simultaneously, the various nutrients in the feed are analyzed and classified, creating a corresponding node for each nutrient.
[0051] In step S112, livestock and poultry individual attributes are set for each of the livestock and poultry individual nodes, and nutrient attributes are set for each of the feed nutrient nodes; The individual attributes of the livestock and poultry include at least one of the following: breed attribute, age attribute, weight attribute, and health status attribute. The breed attribute indicates the breed type of the livestock and poultry, the age attribute indicates the duration of the growth stage of the livestock and poultry, the weight attribute indicates the current weight level of the livestock and poultry, and the health status attribute indicates the disease or health status of the livestock and poultry.
[0052] In this embodiment of the disclosure, after creating the initial node set, specific attributes are set for each individual livestock and poultry node. For breed attributes, the breed type of the livestock and poultry is accurately recorded by consulting breeding records or conducting on-site observations. Different breeds of livestock and poultry differ in genetic characteristics, growth rate, meat quality, etc., and these differences directly affect their nutrient requirements and utilization.
[0053] Age reflects the growth stage of livestock and poultry, and is an important indicator for measuring their growth and development. Their age can be determined by recording their birth date or rearing time. The nutritional needs and utilization abilities of livestock and poultry differ at different growth stages. For example, young livestock and poultry require more protein and energy to support their rapid growth, while adult livestock and poultry need to maintain a balanced diet to preserve their health and production performance.
[0054] Weight is an important indicator of livestock and poultry growth status. Appropriate weighing equipment can be used to weigh livestock and poultry regularly to obtain their current weight level. Changes in weight can reflect the growth rate and nutritional status of livestock and poultry. For example, slow weight gain in livestock and poultry may indicate insufficient nutrient intake or health problems.
[0055] Health status attributes describe the physical condition of livestock and poultry. Health status can be assessed by observing the livestock's behavior, appearance, and appetite. It can also be combined with veterinary diagnoses to determine if the livestock or poultry are diseased. Healthy livestock and poultry can absorb and utilize nutrients more effectively, while sick livestock and poultry may exhibit malabsorption of nutrients or metabolic abnormalities.
[0056] The nutrient attributes include at least one of the following: nutrient type attribute, content attribute, and proportion attribute. The nutrient type attribute represents the specific category among protein, carbohydrate, fat, vitamin, and mineral. The content attribute represents the absolute content of the nutrient in the feed. The proportion attribute represents the relative proportion of the nutrient to the total composition of the feed.
[0057] Assigning attributes to each feed nutrient node is a crucial step in constructing a physiological feed association graph for livestock and poultry. The nutrient type attribute clarifies the category to which a nutrient belongs, and different types of nutrients play different roles in the growth and health of livestock and poultry. For example, protein is an important component of the body tissues and cells of livestock and poultry, and is essential for their growth, reproduction, and immune function; carbohydrates are the main source of energy for livestock and poultry; fat is not only an important form of energy storage but also participates in the physiological metabolic processes of livestock and poultry; although vitamins and minerals are present in relatively small amounts in feed, they play an indispensable role in the normal physiological functions of livestock and poultry.
[0058] Content attributes indicate the absolute amount of a nutrient in feed, and are an important indicator of feed nutritional value. The content of various nutrients in feed can be determined using professional feed analysis methods. For example, chemical analysis methods can determine the content of nutrients such as protein, fat, and carbohydrates in feed. Accurately determining the nutrient content in feed helps in the rational formulation of feed, ensuring that livestock and poultry receive sufficient nutrition.
[0059] The proportion attribute reflects the relative proportion of a nutrient in the total composition of feed, embodying the balance between various nutrients. A reasonable nutrient ratio is crucial for the health and growth of livestock and poultry. For example, if the protein content in feed is too high and the carbohydrate content is too low, it may lead to insufficient energy supply in livestock and poultry, affecting their growth rate; conversely, if the protein content is too low and the carbohydrate content is too high, it may lead to obesity in livestock and poultry, reducing their production performance.
[0060] In step S113, an edge is established between the livestock and poultry individual node and the feed nutrient node to obtain an edge set. The intake relationship of the edge is used to represent the historical intake record of the corresponding feed nutrient of the livestock and poultry individual. In this embodiment, establishing edges between individual livestock and poultry nodes and feed nutrient nodes is a key step in constructing a livestock and poultry physiological feed association graph, which can intuitively reflect the relationship between livestock and poultry and feed nutrients. During the edge establishment process, two important attributes of the edges need to be determined: the intake relationship attribute and the absorption and utilization impact relationship attribute.
[0061] The intake relationship attribute records the historical intake of corresponding feed nutrients by livestock and poultry. This information can be obtained through detailed analysis of livestock and poultry dietary records. For example, during the breeding process, the daily feed intake and nutrient composition of the feed can be recorded to calculate the historical intake of various nutrients by the livestock and poultry.
[0062] The absorption and utilization impact attribute considers the influence of livestock and poultry physiological indicators on nutrient digestibility and utilization. Physiological indicators of livestock and poultry, such as weight and health status, significantly affect nutrient absorption and utilization. The relationship between livestock and poultry physiological indicators and nutrient digestibility and utilization can be determined through analysis and modeling of large amounts of experimental data. For example, by studying the digestion and absorption of a certain nutrient by livestock and poultry of different weights and health statuses, a corresponding mathematical model can be established to calculate the degree of influence of livestock and poultry physiological indicators on the digestibility and utilization of that nutrient.
[0063] In step S114, the initial node set and the edge set are structured to generate an initial livestock and poultry physiological feed association graph with node attributes and edge attributes.
[0064] In this embodiment of the disclosure, after setting the node attributes and establishing and setting the edges, it is necessary to organize the initial node set and edge set in a structured manner. The purpose of this process is to integrate all nodes and edges according to certain rules to generate a livestock and poultry physiological feed association graph with a clear structure and attributes.
[0065] In the process of structured organization, graph databases or graph computing frameworks can be used. These tools can effectively manage and store node and edge data, and provide powerful query and analysis functions. By storing node and edge data in a graph database, it is convenient to operate and maintain the physiological-feed association graph of livestock and poultry.
[0066] The generated livestock and poultry physiological feed association graph will contain all individual livestock and poultry nodes, feed nutrient nodes, and the edges between them, and each node and edge will have explicit attributes.
[0067] In one possible implementation, step S113, establishing the edges between the livestock / poultry individual nodes and the feed nutrient nodes to obtain an edge set, includes: In step S1131, all combinations of the livestock and poultry individual nodes and the feed nutrient nodes are traversed, and the edges are created between the livestock and poultry individual nodes and the feed nutrient nodes where there are historical feeding records. In this embodiment, when establishing edges between individual livestock / poultry nodes and feed nutrient nodes, it is first necessary to traverse all combinations of individual livestock / poultry nodes and feed nutrient nodes in the livestock / poultry physiological feed association graph. For each node pair, it is checked whether there is a historical feeding record. If a historical feeding record exists, it means that the individual livestock / poultry has previously ingested the corresponding feed nutrient, and an edge is created for that node pair. This method ensures that the edge establishment is based on actual feeding conditions, thereby guaranteeing the authenticity and reliability of the association graph.
[0068] In step S1132, for each created edge, the daily intake data of the corresponding feed nutrients of the livestock and poultry individuals in the historical feeding records are extracted, and the average intake of the livestock and poultry individuals is calculated as the intake relationship attribute value based on the daily intake data of each livestock and poultry individual. In this embodiment of the disclosure, after creating edges for node pairs with historical feeding records, it is necessary to set an intake relationship attribute value for each edge. Specifically, this involves extracting daily intake data of the corresponding feed nutrients from the historical feeding records. This data reflects the intake of the nutrient by livestock and poultry over different time periods. Then, these daily intake data are statistically analyzed to calculate the average intake. The average intake can be used as the intake relationship attribute value for the edge, which can objectively reflect the intake level of the feed nutrient by livestock and poultry.
[0069] In step S1133, based on historical experimental data on different livestock and poultry physiological indicators and the digestibility and utilization of the feed nutrients, a correlation model between the livestock and poultry physiological indicators and the digestibility and utilization is established. The digestibility is used to represent the proportion of the nutrients in the feed that are digested and absorbed by the individual livestock and poultry, and the utilization is used to represent the proportion of the nutrients that are digested and absorbed and used for growth and metabolism. To determine the influence of edge absorption and utilization on relational attribute values, it is necessary to analyze historical experimental data on livestock and poultry physiological indicators and nutrient digestibility and utilization. Physiological indicators mainly include body weight and health status, which play a crucial regulatory role in nutrient digestion and utilization. Digestibility represents the proportion of nutrients in feed digested and absorbed by livestock and poultry, reflecting the processing capacity of their digestive system. Utilization rate represents the proportion of digested and absorbed nutrients used for growth and metabolism, reflecting the degree of effective nutrient utilization by livestock and poultry.
[0070] By analyzing a large amount of historical experimental data, the intrinsic relationship between livestock and poultry physiological indicators and nutrient digestibility and utilization can be discovered. For example, research may show that larger-weight livestock and poultry have higher digestibility of certain nutrients, while healthy livestock and poultry have higher utilization rates of nutrients.
[0071] In step S1134, the degree of influence of the physiological indicators of the individual livestock and poultry nodes determined by the association model on the digestibility and utilization rate of the corresponding feed nutrients is used as the absorption and utilization influence relationship attribute value. In this embodiment of the disclosure, after analyzing historical experimental data on livestock and poultry physiological indicators and nutrient digestibility and utilization, it is necessary to establish a correlation model between physiological indicators and digestibility and utilization. This correlation model can be constructed based on statistical analysis methods or machine learning algorithms, and it can describe the quantitative relationship between livestock and poultry physiological indicators and nutrient digestibility and utilization.
[0072] After establishing the correlation model, the physiological indicators (such as weight and health status) of the current livestock and poultry individual node are input into the model. Through the model's calculations, the degree of influence of the livestock and poultry individual on the digestibility and utilization rate of the corresponding feed nutrients can be obtained. This degree of influence will be used as the absorption and utilization influence relation attribute value of the edge, which can accurately reflect the impact of livestock and poultry physiological indicators on nutrient absorption and utilization.
[0073] In step S1135, based on the intake relationship attribute value and the absorption and utilization influence relationship attribute value, an intake relationship attribute and an absorption and utilization influence relationship attribute are set for each edge to obtain the edge set.
[0074] In this embodiment of the disclosure, after calculating the intake relationship attribute value and the absorption and utilization influence relationship attribute value of the edge, it is necessary to set these attributes for each edge. By setting accurate attributes for the edges, the livestock and poultry physiological feed correlation graph can more completely and accurately reflect the relationship between livestock and poultry and feed nutrients. In practice, the intake relationship attribute value and the absorption and utilization influence relationship attribute value can be stored in the attribute fields of the edge for subsequent analysis and use.
[0075] In one possible implementation, see [link to relevant documentation] Figure 3 As shown, in step S13, the step of calling the graph neural network model to be trained to perform deep learning processing on the target livestock and poultry physiological feed correlation graph includes: In step S131, the message passing layer of the graph neural network is initialized, wherein the message passing layer is configured with a neighbor aggregation module and a feature update module; In this embodiment of the disclosure, initializing the message passing layer is a crucial starting step when performing deep learning processing on the graph neural network. As a core component of the graph neural network, the message passing layer contains a neighbor aggregation module and a feature update module, which play important roles. The neighbor aggregation module collects information about the current node's neighboring nodes, including attributes of feed nutrient nodes and edge attributes. By aggregating this information, the current node can acquire features of its surrounding environment. The feature update module is responsible for updating the representation of the current node based on the information collected by the neighbor aggregation module and the current node's own attributes, ensuring that the node's representation continuously adapts to the interactions between nodes in the graph structure.
[0076] During initialization, appropriate parameters need to be set for the neighbor aggregation module and the feature update module. These parameters affect the method and effect of information aggregation and feature update. For example, for the neighbor aggregation module, it is necessary to determine how to perform weighted summation or other forms of combination on the information of neighbor nodes; for the feature update module, it is necessary to determine the update rules and strategies to ensure that the update of node representations is in a direction that is conducive to learning the interaction features between nodes. At the same time, in order to ensure the uniformity of the scale and the matching of feature dimensions among different features, the input feature data also needs to be preprocessed during initialization. For example, for attributes with different scales, normalization or standardization may be required so that they can be compared and calculated on the same scale in subsequent calculations.
[0077] In step S132, for each individual animal node in the target animal physiological feed association graph, the neighbor aggregation module determines the neighbor node information and edge attributes of the feed nutrient nodes connected to the individual animal node. In this embodiment, after initializing the message passing layer, the neighbor aggregation module begins collecting relevant information for each individual livestock node in the livestock physiological feed association graph. This module searches for the feed nutrient nodes connected to each individual livestock node and extracts the nutrient type, content, and proportion attributes of these feed nutrient nodes. The nutrient type attribute reflects the types of nutrients in the feed; different nutrient types have different effects on the growth and health of livestock. The content attribute indicates the actual content of the nutrient in the feed, which directly relates to the amount of that nutrient that livestock can obtain from the feed. The proportion attribute reflects the relative importance of the nutrient in the total feed composition.
[0078] Simultaneously, the neighbor aggregation module also collects the intake relationship attributes and absorption and utilization impact attributes of the edges connecting individual livestock and poultry nodes and feed nutrient nodes. The intake relationship attributes record the historical intake of corresponding feed nutrients by livestock and poultry. By analyzing this historical data, we can understand the dietary preferences and nutrient intake habits of livestock and poultry. The absorption and utilization impact attributes consider the influence of livestock and poultry physiological indicators on nutrient digestibility and utilization, which is crucial for accurately assessing the actual utilization of nutrients by livestock and poultry. When collecting this information, it is necessary to ensure that the units of measurement of different attributes are consistent and the feature dimensions are matched so that effective feature processing and calculation can be performed subsequently.
[0079] In step S133, feature transformation processing is performed on the neighbor node information and edge attributes of each livestock and poultry individual node to generate a message passing vector from the neighbor nodes of each livestock and poultry individual node to the livestock and poultry individual node. In this embodiment, after collecting neighbor node information and edge attributes, feature transformation processing is required to generate message transmission vectors from neighbor nodes to the current livestock / poultry individual node. First, the nutrient type attributes of neighbor feed nutrient nodes are extracted and converted into one-hot encoded vectors to represent nutrient categories. One-hot encoding can convert discrete nutrient type attributes into a vector form suitable for computer processing, ensuring that different nutrient types have clear representations in the vector space.
[0080] Next, the content and proportion attributes of neighboring feed nutrient nodes are extracted and converted into standardized numerical vectors to represent the absolute and relative content levels of the nutrients. Standardization allows the values of different attributes to be compared on the same scale, avoiding the impact of excessive differences in numerical ranges on subsequent calculation results.
[0081] Then, the intake relationship attributes and absorption-utilization influence relationship attributes of the edges are extracted and converted into normalized numerical vectors to represent historical intake levels and physiological influence. Normalization maps the values of these attributes to a specific range, making the attributes of different edges numerically comparable.
[0082] The nutrient category unique heat encoding vector, nutrient content standardized numerical vector, and edge attribute normalized numerical vector obtained through the above processing are concatenated to generate a comprehensive neighbor node information vector. This comprehensive vector contains multifaceted information about neighbor nodes and edges, and can more comprehensively describe the impact of neighbor nodes on the current livestock individual node.
[0083] Finally, a linear transformation layer in the graph neural network is used to perform dimension mapping on the composite vector, generating a message passing vector with dimensions consistent with the attribute representation of the current livestock individual node. This is done to ensure that the message passing vector can be effectively fused and calculated with the attributes of the current livestock individual node.
[0084] In step S134, the message transmission vector is fused with the breed attribute, age attribute, weight attribute, health status attribute, and amino acid content supplementation attribute of the corresponding livestock and poultry individual node to generate a node update feature vector; In this embodiment, after generating the message passing vector, it is fused with the breed attribute, age attribute, weight attribute, health status attribute, and amino acid content supplementation attribute of the current livestock and poultry individual node to generate a node update feature vector. These attributes each reflect different aspects of the characteristics of the livestock and poultry individual. The breed attribute reflects the genetic characteristics of the livestock and poultry, the age attribute reflects the growth stage of the livestock and poultry, the weight attribute intuitively shows the growth status of the livestock and poultry, the health status attribute describes the physical condition of the livestock and poultry, and the amino acid content supplementation attribute reflects the nutritional status and physiological state of the livestock and poultry.
[0085] In the process of fusion computing, the uniformity of dimensions and the matching of feature dimensions among different attributes are considered. To ensure the reasonableness of the calculation results, it may be necessary to further process or adjust certain attributes. For example, if some attributes have different dimensions, normalization or standardization may be required so that they can be calculated on the same scale in fusion computing.
[0086] There are several ways to perform fusion computation. For example, a weighted summation method can be used, assigning different weights to each attribute and then summing the message passing vector and each attribute according to their weights. The weights can be determined based on the importance of different attributes. For instance, when predicting the intake of nutrients by livestock and poultry, the amino acid content supplementation attribute may be relatively more important and can be given a higher weight. Through fusion computation, the information of neighboring nodes and the attribute information of the current individual livestock and poultry node can be integrated to generate a more comprehensive node update feature vector that better reflects the node's characteristics.
[0087] In step S135, the original attribute representation of the livestock and poultry individual node is replaced by the node update feature vector through the feature update module, thereby completing the node representation update after single-layer message passing; In this embodiment, after generating the node update feature vector, the feature update module uses this vector to replace the original attribute representation of the current livestock individual node, thereby completing the node representation update after single-layer message passing. The feature update module integrates the information from the node update feature vector into the node representation according to pre-set update rules and strategies. This process is a crucial step in the graph neural network's learning of inter-node interaction features through message passing; each node representation update allows the node to better capture information about its surrounding environment and its relationship with other nodes.
[0088] When replacing existing attribute representations, it's crucial to ensure that the new node representation accurately reflects the node's latest features. Simultaneously, to guarantee the stability and convergence of the graph neural network, some control and adjustment of the update process may be necessary. For example, setting the update step size or employing regularization methods can prevent overly drastic node representation updates or overfitting. Through continuous node representation updates, the graph neural network can gradually learn the complex interaction features between nodes.
[0089] In step S136, the neighbor aggregation, message passing vector generation, and node representation update operations of the message passing layer are repeatedly executed until the preset number of message passing layers is reached, thus completing the deep learning process.
[0090] To enable the graph neural network to fully learn the interaction features between nodes, the neighbor aggregation, message passing vector generation, and node representation update operations of the message passing layer need to be repeatedly executed until the preset number of message passing layers is reached. Each message passing process allows a node to obtain information from its more distant neighbors, thereby continuously enriching the node's representation.
[0091] During the repeated execution of these operations, message passing at each layer is based on the updated node representation of the previous layer. As the number of message passing layers increases, nodes can learn more complex and global features. The preset number of message passing layers is an important hyperparameter, and its setting needs to be determined based on the specific task and dataset. If the number of message passing layers is too small, nodes may not be able to fully learn the interaction features between nodes; if the number of message passing layers is too large, it may lead to increased computational complexity and overfitting.
[0092] After reaching the preset number of message passing layers, the graph neural network generates a final set of node representations. Each node representation in this set contains rich information about the interactions between nodes.
[0093] In one possible implementation, step S133, which involves performing feature transformation processing on the neighbor node information and edge attributes of each livestock individual node to generate a message passing vector from the neighbor nodes to the livestock individual node, includes: In step S1331, the nutrient type attribute is extracted from the neighbor node information of each livestock and poultry individual node, and each nutrient type attribute is converted into a one-hot encoded vector to represent the nutrient category. Among them, the nutrient type attribute in the neighbor node information is the information about the types of nutrients contained in the nodes adjacent to the individual livestock and poultry node, such as different nutrient types such as protein, carbohydrates, fat, vitamins, and minerals.
[0094] In this embodiment, the nutrient type attribute is extracted from the neighbor node information of each livestock individual node and converted into a one-hot encoded vector because nutrient types are discrete and unordered categorical variables. Directly using these text-based nutrient names for calculation and processing is inconvenient and hinders the model from learning the relationship between nutrient types and other features. One-hot encoding converts each nutrient type into a fixed-dimensional vector, ensuring clear distinction between different nutrient types in the vector space.
[0095] In step S1332, the content attribute and proportion attribute in the neighbor node information of each livestock and poultry individual node are extracted, and the content attribute and proportion attribute are converted into a first standardized numerical vector representing the absolute value of nutrients and a second standardized numerical vector representing the relative content level, respectively. The first standardized numerical vector is obtained by standardizing the content attribute and is used to represent the absolute content level of nutrients. Standardization eliminates the influence of different nutrient content dimensions, making the content data of different nutrients comparable. The second standardized numerical vector is obtained by standardizing the proportion attribute and is used to represent the relative content level of nutrients. Similarly, standardization can unify the scale of proportion data, facilitating model processing and analysis.
[0096] In this embodiment of the disclosure, the content and proportion attributes of each livestock individual node are extracted from the neighbor node information and converted into a first standardized numerical vector and a second standardized numerical vector, respectively, because content and proportion are two different dimensions describing the quantity of nutrients. Content reflects the absolute quantity of nutrients, while proportion reflects the relative importance of nutrients in the whole.
[0097] Because the content and proportion of different nutrients can vary greatly—for example, some micronutrients may be present in very small amounts while major nutrients are present in larger amounts—model training may be affected by the numerical units without standardization, leading to insufficient learning of certain features. Standardization transforms the content and proportion data into numerical vectors with a similar distribution. For instance, using Z-score standardization converts the data into a distribution with a mean of 0 and a standard deviation of 1. This allows the model to treat the content and proportion of different nutrients more fairly, improving training effectiveness and prediction accuracy.
[0098] In step S1333, the intake relationship attribute and the absorption and utilization influence relationship attribute of the edge are extracted, and the intake relationship attribute and the absorption and utilization influence relationship attribute are converted into a first normalized numerical vector for representing the historical intake level and a second normalized numerical vector for representing the degree of physiological influence. The first normalized numerical vector is obtained by normalizing the intake relationship attribute and is used to represent the historical intake level. Normalization maps the numerical range of the intake relationship attribute to a specific interval (e.g., [0, 1]), making the intake levels of different livestock individuals comparable. The second normalized numerical vector is obtained by normalizing the absorption and utilization influence relationship attribute and is used to represent the degree of physiological influence. Similarly, normalization standardizes the numerical scale of the absorption and utilization influence relationship attribute, facilitating model processing and analysis.
[0099] In this embodiment, the intake relationship attribute and absorption-utilization influence relationship attribute of the edges are extracted and converted into a first normalized numerical vector and a second normalized numerical vector, respectively, because the intake relationship and absorption-utilization influence relationship are important factors affecting the intake and utilization of nutrients by livestock and poultry. The intake relationship attribute reflects the historical intake of livestock and poultry, while the absorption-utilization influence relationship attribute reflects the influence of neighboring nodes on the physiological processes of livestock and poultry.
[0100] Because the numerical ranges and units of these attributes may vary—for example, intake may be expressed in grams while absorption rate may be expressed as a percentage—directly using these raw data for calculations can make it difficult for the model to learn and understand the relationships between them. Normalization, by unifying the numerical ranges of different attributes into a specific interval, such as using min-max normalization to linearly map the data to the [0, 1] interval, allows the model to process these features more effectively and better capture the effects of intake and absorption / utilization relationships on individual livestock and poultry.
[0101] In step S1334, the one-hot encoded vector, the first normalized numerical vector, the second normalized numerical vector, the first normalized numerical vector, and the second normalized numerical vector are concatenated to generate a comprehensive vector corresponding to the neighbor node information. In this embodiment, the one-heat encoded vector, the first normalized numerical vector, the second normalized numerical vector, the first normalized numerical vector, and the second normalized numerical vector are concatenated to generate a comprehensive vector corresponding to the neighbor node information. This is to integrate various relevant information of the neighbor nodes and provide a comprehensive feature representation for the model. Each vector describes the characteristics of the neighbor nodes from different perspectives: the one-heat encoded vector represents the nutrient type, the normalized numerical vector represents the nutrient content and proportion, and the normalized numerical vector represents the relationship between intake and absorption / utilization.
[0102] By concatenating these vectors, the model can simultaneously consider information from different aspects, thus more accurately understanding the influence of neighboring nodes on individual livestock nodes. For example, when predicting the absorption of a certain nutrient by livestock, the model can comprehensively consider multiple factors such as nutrient type, content, intake, and the relationship between absorption and utilization, thereby improving the accuracy of the prediction.
[0103] In step S1335, the linear transformation layer in the graph neural network is used to perform dimension mapping processing on the comprehensive vector to generate a message passing vector whose dimension is consistent with the livestock and poultry individual attribute representation of the livestock and poultry individual node.
[0104] In this embodiment, a linear transformation layer in a graph neural network is used to perform dimension mapping on the composite vector, generating a message passing vector with dimensions consistent with the livestock individual node's attribute representation. This is to enable effective fusion and interaction between the information of neighboring nodes and the information of the livestock individual node. In a graph neural network, the feature vector dimensions of different nodes may differ. To achieve information transmission and aggregation between nodes, it is necessary to convert the information of neighboring nodes into dimensions compatible with the target node (livestock individual node). The linear transformation layer learns a weight matrix and a bias vector to linearly combine the composite vector, mapping it to the target dimension space.
[0105] In this way, the generated message passing vector can be further calculated with the attribute representations of individual livestock nodes, such as through addition and concatenation, thereby enabling the transmission of neighbor node information to individual livestock nodes and providing a foundation for the model to learn the relationship between individual livestock nodes and their neighbors. For example, if the attribute representation of an individual livestock node has a dimension of 64, while the comprehensive vector has a dimension of 128, a linear transformation layer can map the comprehensive vector into a 64-dimensional message passing vector, allowing it to be fused with the attribute representations of individual livestock nodes and participate in subsequent calculations and predictions of the model.
[0106] In one possible implementation, see [link to relevant documentation] Figure 4 As shown, in step S14, the process of training the deep learning graph neural network model using the experimental dataset, adjusting the model parameters with actual nutrient intake as the label, and obtaining the target graph neural network model includes: In step S141, the experimental dataset is divided into a training set and a validation set. Multiple training samples in the training set include livestock and poultry physiological information, feed nutrient data, blood amino acid content, and corresponding actual nutrient intake labels. In this embodiment of the disclosure, when training a graph neural network model using an experimental dataset, the dataset is first divided into a training set and a validation set. The purpose of dividing the dataset is to evaluate the model's generalization ability, that is, the model's performance on unseen data. The training set is used to train the model, allowing it to learn the features and patterns in the data; the validation set is used to evaluate the model's performance during training and to prevent overfitting.
[0107] When partitioning the dataset, it's crucial to ensure that the data in the training and validation sets are representative and cover all possible scenarios in the experimental dataset. Random partitioning can be used, randomly assigning samples from the experimental dataset to the training and validation sets. Furthermore, to guarantee fairness and appropriateness, stratified sampling can be employed. This involves stratifying the samples based on different features or categories, and then randomly partitioning within each stratum, ensuring that the proportions of each category in the training and validation sets are similar to those in the experimental dataset.
[0108] Each training sample includes livestock physiological information, feed nutrient data, blood amino acid content, and corresponding actual nutrient intake labels. Livestock physiological information includes breed, age, weight, and health status, reflecting the individual characteristics and growth state of the livestock. Feed nutrient data includes nutrient type, content, and proportion, describing the nutritional composition of the feed. Blood amino acid content is obtained by collecting and measuring blood samples from livestock, reflecting their nutritional and physiological status. Actual nutrient intake labels represent the actual intake of various nutrients from the feed by the livestock, measured or recorded, and serve as the target values for model training.
[0109] In step S142, the process is traversed, a training sample is selected from the training set, and the attributes of individual livestock nodes in the livestock physiological feed association graph are constructed based on the livestock physiological information in the training sample. The attributes of feed nutrient nodes and edge attributes in the livestock physiological feed association graph are constructed based on the feed nutrient data, and the blood amino acid content is used as a supplementary attribute of the individual livestock node. In this embodiment of the disclosure, after selecting a training sample from the training set, the data in the sample needs to be processed to construct a livestock and poultry physiological-feed association graph. First, the livestock and poultry physiological information in the sample is extracted, including breed, age, weight, health status, etc., and this information is set as the attributes of the individual livestock and poultry nodes in the livestock and poultry physiological-feed association graph. These attributes can describe the characteristics and growth status of individual livestock and poultry.
[0110] Next, feed nutrient data, including nutrient type, content, and proportion, is extracted from the sample and set as attributes of feed nutrient nodes in the livestock and poultry physiological feed association graph. Simultaneously, based on the information in the sample, edges are established between individual livestock and poultry nodes and feed nutrient nodes, and ingestion and absorption / utilization impact attributes are set for these edges. The ingestion attribute represents the historical intake records of the corresponding feed nutrient by livestock and poultry, while the absorption / utilization impact attribute represents the degree to which livestock and poultry physiological indicators affect the digestibility and utilization rate of that nutrient.
[0111] Finally, the blood amino acid content was extracted from the samples and used as a supplementary attribute for individual livestock and poultry nodes. Blood amino acid content reflects the nutritional status and physiological state of livestock and poultry; integrating it into the livestock and poultry physiological-feed correlation graph can further enrich the node information and improve the model's predictive accuracy.
[0112] In step S143, the constructed livestock and poultry physiological feed association graph is input into the graph neural network model after deep learning, node representations are generated through message passing mechanism, and nutrient intake predictions are made based on the node representations. In this embodiment, after the constructed livestock and poultry physiological-feed association graph is input into the graph neural network model, the model generates node representations through a message passing mechanism. The message passing mechanism is the core mechanism of the graph neural network, enabling nodes to exchange and interact, thereby learning the interaction features between nodes. In each round of message passing, a node collects information from its neighboring nodes and updates it by combining this information with its own. After multiple iterations of message passing, the node can generate a node representation containing rich information.
[0113] Based on the generated node representations, the graph neural network model calculates predicted nutrient intake values. The specific calculation process is implemented through the model's output layer. The output layer maps the node representations to the nutrient intake prediction space based on the node representations and the model's parameters, thus obtaining the predicted intake of various nutrients from feed for livestock and poultry. During the calculation process, it is necessary to ensure the uniformity of dimensions and the matching of feature dimensions among different features to ensure the accuracy of the prediction results.
[0114] In step S144, the difference between the predicted nutrient intake value and the actual nutrient intake label in the training sample is calculated to obtain the loss value. In this embodiment of the disclosure, to evaluate the prediction accuracy of the graph neural network model, it is necessary to calculate the difference between the predicted value and the actual nutrient intake labels in the training samples as the loss value. First, the predicted value is decomposed into sub-predicted values for each type of nutrient, and these sub-predicted values correspond one-to-one with the sub-labels for each type of nutrient in the actual nutrient intake labels. Then, the absolute error is calculated for the sub-predicted value and sub-label for each type of nutrient. The absolute error is the absolute value of the difference between the sub-predicted value and the sub-label. By calculating the absolute error, the degree of prediction deviation of the model for the intake of each type of nutrient can be measured.
[0115] Next, the absolute errors for all nutrient categories are summed to obtain the total absolute error (TAO). The TAO reflects the overall bias in the model's predictions of nutrient intake. Finally, the ratio of the TAO to the number of nutrient categories is calculated to obtain the mean absolute error (MAE). The MAE, representing the difference between the predicted and actual labels, is used as the loss value. A smaller loss value indicates that the model's predictions are closer to the actual values, and the better the model's performance.
[0116] In step S145, the backpropagation algorithm is used to pass the loss value from the output layer to the input layer, and the parameter weights of the message passing layer in the graph neural network are adjusted. In this embodiment of the disclosure, after calculating the loss value, the backpropagation algorithm is used to pass the loss value from the output layer to the input layer to adjust the parameter weights of the message passing layer in the graph neural network. The backpropagation algorithm is an optimization algorithm based on gradient descent, which calculates the gradient of the loss value with respect to the model parameters, and then adjusts the parameter weights according to the direction and magnitude of the gradient, so that the loss value gradually decreases.
[0117] During backpropagation, the model starts from the output layer and calculates the error signal for each neuron based on the loss value. Then, the error signal is propagated from back to front to each layer, calculating the gradient of the parameters for each layer. Based on the calculated gradients, optimization algorithms (such as stochastic gradient descent, Adam, etc.) are used to update the parameter weights. The optimization algorithm determines the adjustment step size and direction of the parameter weights based on the magnitude and direction of the gradient, ensuring that the parameter weights are updated in the direction that reduces the loss value.
[0118] By continuously performing backpropagation and parameter updates, the graph neural network model can gradually learn the features and patterns in the data, improving the model's prediction accuracy. During the parameter weight update process, attention must be paid to the learning rate setting. An excessively large learning rate may prevent the model from converging, while an excessively small learning rate may result in slow convergence.
[0119] In step S146, after completing the full sample iteration in the training set, the prediction accuracy of the graph neural network model is evaluated using the validation set. The training hyperparameters are adjusted according to the accuracy results until the model converges, thus obtaining the target graph neural network model.
[0120] In this embodiment of the disclosure, after completing full iteration of the training set, a validation set is needed to evaluate the model's predictive accuracy. The validation set is a dataset not used for training during the training process, which can more objectively evaluate the model's performance on unseen data. Samples from the validation set are input into the trained graph neural network model, and the error between the model's predictions and the actual nutrient intake labels is calculated, such as mean absolute error or mean squared error. These error metrics are used to evaluate the model's predictive accuracy.
[0121] If the model's prediction accuracy on the validation set is unsatisfactory, it indicates that the model may be overfitting or underfitting. In this case, the training hyperparameters need to be adjusted based on the accuracy results. Training hyperparameters include the learning rate, the number of message passing layers, and the batch size. For example, if the model is overfitting, the learning rate can be reduced, the number of message passing layers reduced, or a regularization term increased; if the model is underfitting, the learning rate can be increased, the number of message passing layers increased, or the model structure adjusted.
[0122] The training hyperparameters are continuously adjusted, and the model is retrained and validated until the model's prediction accuracy on the validation set reaches a stable state, i.e., the model converges. Model convergence means that the model's performance no longer shows significant improvement on the validation set, and the model's parameters have been adjusted to a suitable state for use in actual prediction tasks.
[0123] In one possible implementation, step S144, calculating the difference between the predicted nutrient intake value and the actual nutrient intake label in the training sample to obtain the loss value, includes: In step S1441, the predicted value is decomposed into sub-predicted values of various nutrients, and the sub-predicted values correspond one-to-one with the sub-labels of various nutrients in the actual nutrient intake label. In this embodiment of the disclosure, during model training, the predicted value output by the graph neural network model is a result that integrates the intake of all nutrients. To more accurately evaluate the model's prediction accuracy for each type of nutrient, it is necessary to decompose this overall predicted value. Since different types of nutrients differ in their absorption, metabolism, and utilization processes within livestock and poultry, and thus have varying impacts on their growth and development, it is essential to analyze the prediction results for each type of nutrient separately.
[0124] In this embodiment, the predicted value is decomposed into sub-predicted values for various nutrients, each corresponding one-to-one with a sub-label of a nutrient in the actual nutrient intake label. This allows for independent error calculation and analysis for each nutrient category, providing a foundation for subsequent optimization of the model's predictive ability for different nutrients. For example, if the model's prediction of protein is significantly off-target while its prediction of carbohydrates is relatively accurate, this decomposition clearly identifies this, allowing for targeted adjustment of model parameters to improve the accuracy of protein prediction.
[0125] In step S1442, the absolute value of the error between the sub-predicted value and the sub-label for each nutrient is calculated; In this embodiment of the disclosure, calculating the absolute value of the error between the sub-predicted value and the sub-label for each nutrient category is to eliminate the influence of the positive or negative sign of the error on the evaluation. This is because in practical applications, we are more concerned with the magnitude of the difference between the predicted and actual values, rather than whether the predicted value is higher or lower than the actual value. By taking the absolute value, all errors can be unified into non-negative values, making the errors of different nutrient categories comparable.
[0126] For example, for fat nutrients, if the sub-predicted value is 30 grams and the actual sub-label is 35 grams, the error is -5 grams, which, when taken as the absolute value, equals 5 grams. For mineral nutrients, if the sub-predicted value is 10 grams and the actual sub-label is 8 grams, the error is 2 grams, which, when taken as the absolute value, also equals 2 grams. This allows for a fair comparison of the model's accuracy in predicting different nutrients.
[0127] In step S1443, the absolute values of the errors for all nutrient categories are summed to obtain the total absolute error value; In this embodiment of the disclosure, the total absolute error value is obtained by summing the absolute values of the errors for all nutrient categories. This total absolute error value is an important indicator for measuring the overall accuracy of the model's predictions. Since different types of nutrients are all important in livestock and poultry farming, the model needs to predict all nutrients as accurately as possible.
[0128] In this embodiment of the disclosure, the model's bias in predicting all nutrients can be aggregated by summing the absolute values of the errors for each nutrient category. If the total absolute error is large, it indicates that the model's overall prediction of nutrient intake differs significantly from the actual situation, and further optimization and adjustment of the model may be necessary. Conversely, if the total absolute error is small, it indicates that the model's prediction results are relatively close to the actual values and have a certain degree of accuracy.
[0129] In step S1444, the ratio of the total absolute error value to the number of nutrient categories is calculated to obtain the average absolute error value; In this embodiment of the disclosure, the average absolute error is obtained by calculating the ratio of the total absolute error to the number of nutrient categories. This is to eliminate the influence of the number of nutrient categories on error assessment and to more fairly compare the predictive performance of the model under different conditions. This is because, in practical applications, the number of nutrient categories in feed may vary depending on different feed formulations and livestock species.
[0130] If the model is evaluated solely based on the total absolute error (TAR), the TAR may be too large when there are many nutrient categories. However, this does not necessarily mean the model has poor predictive performance; it could simply be due to the large number of nutrient categories considered. By calculating the mean absolute error (MAE) and distributing the total error evenly across each nutrient category, a relatively stable evaluation index that is unaffected by the number of nutrient categories can be obtained. In step S1445, the mean absolute error value is used as the difference between the predicted value and the actual label to obtain the loss value.
[0131] In this embodiment, the mean absolute error (MAE) is used as the difference between the predicted value and the actual label to obtain the loss value because the MAE can comprehensively and objectively reflect the average error level of the model throughout the entire nutrient prediction task. During model training, the loss function is a key factor guiding model parameter optimization. By using the MAE as the loss value, the model can adjust its parameters based on this metric.
[0132] A large loss value indicates a significant discrepancy between the model's predictions and the actual labels. The model needs to update its parameters using backpropagation to bring the predictions closer to the actual values. As the model parameters are continuously adjusted, the loss value gradually decreases. When the loss value reaches a small, acceptable range, it indicates that the model's predictive performance has improved, enabling it to accurately predict the intake of various nutrients in feed by livestock and poultry. For example, in the initial stage of model training, the mean absolute error (loss value) may be large, such as 5 grams. After multiple iterations of training and parameter adjustments, the loss value may decrease to 1 gram, indicating a significant improvement in the model's predictive accuracy.
[0133] In one possible implementation, in step S15, the physiological information of the livestock to be predicted, the composition of feed nutrients, and the blood amino acid content are input into the target graph neural network model to obtain the predicted intake results of various nutrients in the feed for the livestock output by the target graph neural network model, including: In step S151, physiological information of the livestock to be predicted is collected, including breed, age, weight, and health status. Among the physiological information, breed reflects the genetic characteristics of livestock and poultry, with different breeds exhibiting differences in growth rate and nutritional requirements. Age indicates the growth stage of the livestock and poultry, as different growth stages result in varying nutrient requirements and utilization abilities. Weight visually displays the growth status of the livestock and poultry, and is closely related to nutrient intake and utilization. Health status describes the physical condition of the livestock and poultry; healthy and sick livestock and poultry show significant differences in nutrient absorption and metabolism.
[0134] In this embodiment of the disclosure, breed information can be obtained by consulting breeding records or inquiring with farmers. Different breeds of livestock and poultry have different genetic backgrounds and growth characteristics. For example, some breeds of chickens grow faster and have a relatively higher protein requirement; while some breeds of pigs have better meat quality and may have different requirements for fat and vitamins.
[0135] Age information can be determined by recording the birth date or breeding time of livestock and poultry. Age is an important factor affecting the nutritional needs of livestock and poultry. Young livestock and poultry usually need more nutrients such as protein, calcium, and phosphorus to support their rapid growth and bone development; while adult livestock and poultry need to maintain a nutritional balance to maintain health and production performance.
[0136] Weight information can be measured using professional weighing equipment. Accurate weight data reflects the growth status and nutritional condition of livestock and poultry; excessively rapid or slow weight gain may indicate an unbalanced nutritional intake. When measuring weight, it is important to ensure consistency in the timing and conditions to guarantee the accuracy and comparability of the data.
[0137] Health status information can be assessed by observing livestock and poultry's behavior, appearance, and appetite. For example, healthy livestock and poultry typically exhibit characteristics such as being active, having glossy fur, and a good appetite; while sick livestock and poultry may show symptoms such as lethargy, loss of appetite, and disheveled feathers or fur. Furthermore, the health status of livestock and poultry can be determined in conjunction with veterinary diagnostic results; sick livestock and poultry may require special nutritional support to help them recover.
[0138] In step S152, the feed nutrient composition data of the livestock and poultry to be predicted is obtained, and the feed nutrient composition data includes nutrient type, content and ratio. The nutrient type information clarifies the types of nutrients contained in the feed, such as protein, carbohydrates, fats, vitamins, and minerals. Different types of nutrients play different roles in the growth, development, and maintenance of physiological functions in livestock and poultry. The content information indicates the actual amount of the nutrient present in the feed, determining the supply level of that nutrient. The proportion information reflects the relative weight of the nutrient in the total feed composition, demonstrating the balance between various nutrients.
[0139] In this embodiment of the disclosure, when obtaining data on the current nutrient composition of the feed ingested by livestock and poultry to be predicted, relevant information can be obtained from multiple sources. First, a nutrient analysis report of the feed can be obtained from the feed supplier. These reports typically detail the type, content, and proportion of various nutrients in the feed. Feed suppliers conduct rigorous quality control and nutritional analysis during feed production to ensure that the nutritional composition of the feed meets the needs of livestock and poultry.
[0140] Secondly, feed analysis can be performed in-house. Professional feed analysis methods, such as chemical analysis and near-infrared spectroscopy, can be used to determine the content and proportion of various nutrients in the feed. In-house analysis provides a more accurate understanding of the actual nutritional composition of the feed, but it requires specialized equipment and technical personnel.
[0141] When obtaining data on feed nutrient composition, it is crucial to ensure the accuracy and timeliness of the data. The nutritional composition of feed can be affected by factors such as raw material quality and production processes; therefore, regular testing and analysis of the feed are necessary to ensure data reliability. Furthermore, variations may exist between different batches of feed, requiring timely data updates.
[0142] In step S153, the blood amino acid content data measured in the blood sample of the livestock to be predicted is obtained, and the content data including multiple amino acids is obtained. In this embodiment, the amino acid content in blood can reflect the nutritional status and physiological state of livestock and poultry, and using it as input data can further improve the accuracy of predictions. Strict operating procedures must be followed when collecting blood samples to ensure sample quality and safety. The content of various amino acids in blood can be determined using specialized analytical methods, such as high-performance liquid chromatography (HPLC) and amino acid analyzers.
[0143] In this embodiment of the disclosure, when collecting blood samples from livestock and poultry to be predicted, strict adherence to operating procedures is required to ensure sample quality and safety. First, a suitable blood collection site must be selected, typically a vein, such as the wing vein of a chicken or the ear vein of a pig. Before blood collection, the collection site must be disinfected to prevent infection.
[0144] Use specialized blood collection equipment, such as lancets and blood collection tubes, to collect an appropriate amount of blood. The collected blood samples need to be processed promptly to prevent amino acid degradation and loss. Blood samples can be placed in blood collection tubes containing anticoagulants and stored and transported at low temperatures.
[0145] Specialized analytical methods, such as high-performance liquid chromatography (HPLC) and amino acid analyzers, can be used to determine the amino acid content in blood. These methods are characterized by high sensitivity and accuracy, enabling precise determination of the content of various amino acids in the blood. During the measurement process, sample pretreatment is necessary to remove impurities and interfering substances, ensuring the accuracy of the results. Simultaneously, regular calibration and maintenance of the analytical instrument are required to guarantee its stable performance.
[0146] In step S154, an initial livestock and poultry physiological feed correlation diagram is constructed based on the physiological information and the feed nutrient composition data. The initial livestock and poultry physiological-feed correlation graph includes individual livestock and poultry nodes and feed nutrient nodes corresponding to the livestock and poultry to be predicted, and sets corresponding node attributes and edge attributes. Attributes such as breed, age, weight, and health status of the individual livestock and poultry nodes are set, while attributes such as nutrient type, content, and proportion of the feed nutrient nodes are set. Edges are established between individual livestock and poultry nodes and feed nutrient nodes, and ingestion relationship attributes and absorption and utilization impact relationship attributes are set for the edges. Ingestion relationship attributes can be estimated based on historical data or experience, while absorption and utilization impact relationship attributes need to consider the influence of livestock and poultry physiological indicators on nutrient digestibility and utilization.
[0147] In this embodiment of the disclosure, when constructing an initial livestock and poultry physiological-feed correlation graph based on collected physiological information and feed nutrient composition data, the first step is to create individual livestock and poultry nodes and feed nutrient nodes. Attributes such as breed, age, weight, and health status are set for individual livestock and poultry nodes; these attributes describe the characteristics and growth status of the individual livestock and poultry. Attributes such as nutrient type, content, and ratio are set for feed nutrient nodes; these attributes describe the characteristics and composition of nutrients in the feed.
[0148] Establish edges between individual livestock / poultry nodes and feed nutrient nodes, and set the attributes of these edges. The intake relationship attribute of the edges can be estimated based on historical data or experience, for example, by referring to the intake of the feed nutrient by livestock / poultry of the same breed and growth stage. The absorption and utilization impact relationship attribute of the edges needs to consider the influence of livestock / poultry physiological indicators on nutrient digestibility and utilization, which can be determined by establishing mathematical models or referring to relevant research.
[0149] When constructing an association graph, it is necessary to ensure the accuracy and consistency of node and edge attributes. At the same time, attention should be paid to the uniformity of units and the matching of feature dimensions between different attributes to ensure that subsequent calculations and analyses can proceed smoothly. In step S155, the blood amino acid content data is added as a supplementary attribute to the individual nodes of the livestock and poultry in the initial livestock and poultry physiological feed association diagram corresponding to the livestock and poultry to be predicted, so as to obtain the livestock and poultry physiological feed association diagram to be analyzed. Among them, individual livestock and poultry nodes contain richer information, reflecting their physiological and nutritional status more comprehensively. When adding the measured blood amino acid content data as a supplementary attribute to the individual livestock and poultry node corresponding to the livestock and poultry to be predicted, the content data of each amino acid needs to be accurately recorded in the node's attribute field. In this way, the individual livestock and poultry nodes contain richer information, reflecting their physiological and nutritional status more comprehensively.
[0150] When adding supplementary attributes, pay attention to the data format and storage method for subsequent processing and analysis. Also, ensure that the supplementary attributes are compatible with other node attributes and do not affect the structure and performance of the graph.
[0151] In step S156, the physiological feed correlation graph of the livestock and poultry to be analyzed is input into the target graph neural network model. Node representations are generated through a message passing mechanism. Based on the node representations, the predicted intake values of various nutrients are calculated, and the target graph neural network model outputs the predicted intake results of various nutrients in the feed for the livestock and poultry.
[0152] The message passing mechanism enables nodes to exchange information and learn complex relationships between them. In each round of message passing, a node collects information from its neighbors and updates it by combining this information with its own. Through multiple iterations of message passing, a node can generate a node representation containing rich information.
[0153] In this embodiment, after the constructed livestock and poultry physiological-feed association graph is input into the trained graph neural network model, the model generates node representations through a message passing mechanism. The message passing mechanism is the core mechanism of the graph neural network, enabling nodes to interact and learn from each other. In each round of message passing, a node collects information from its neighboring nodes and updates it by combining this information with its own. After multiple iterations of message passing, the node can generate a node representation containing rich information.
[0154] Based on the generated node representations, the model calculates predicted intake values for various nutrients. Specifically, it extracts the individual node representation vectors of the livestock to be predicted, which include comprehensive features such as breed, age, weight, health status, and amino acid content. Simultaneously, it extracts the node representation vectors of each feed nutrient connected to the individual livestock node, which include comprehensive features such as nutrient type, content, and proportion. A dot product operation is then performed on the individual livestock node representation vectors and the node representation vectors of each feed nutrient to generate a correlation strength value for each nutrient category. The dot product operation measures the similarity between two vectors; a higher correlation strength value indicates a stronger association between the livestock and the nutrient category.
[0155] A linear transformation is applied to the association strength values to map them to the numerical range of intake predictions. This linear transformation can be achieved through the model's output layer, which converts the association strength values into predicted intakes of various nutrients in the feed for livestock and poultry based on the node representations and model parameters. During the calculation process, it is necessary to ensure the uniformity of units and the matching of feature dimensions among different features to guarantee the accuracy of the prediction results.
[0156] In one possible implementation, in step S156, the predicted intake values of various nutrients are calculated based on node representations, and the target graph neural network model outputs the predicted intake results of various nutrients in the feed for livestock and poultry, including: Extract the individual node representation vector of the livestock and poultry to be predicted. The individual node representation vector of the livestock and poultry includes the first comprehensive feature of breed, age, weight, health status and amino acid content. In this embodiment of the disclosure, after the graph neural network model generates node representations, it is necessary to extract the individual node representation vectors of the livestock and poultry to be predicted. This vector is continuously updated and learned through a message passing mechanism, and it includes comprehensive features such as breed, age, weight, health status, and amino acid content. These features are interrelated and collectively reflect the physiological state and nutritional needs of the livestock and poultry.
[0157] Breed characteristics reflect the genetic traits of livestock and poultry. Different breeds differ in growth rate, meat quality, and disease resistance, which affect their nutrient requirements and utilization. Age characteristics reflect the growth stage of livestock and poultry; different growth stages have different nutrient requirements and metabolic capacities. Weight characteristics visually demonstrate the growth status of livestock and poultry, which is closely related to nutrient intake and utilization. Health status characteristics describe the physical condition of livestock and poultry; healthy and sick livestock and poultry will have significant differences in nutrient absorption and metabolism. Amino acid content characteristics reflect the nutritional status and physiological state of livestock and poultry; the amino acid content in the blood can serve as an important indicator for assessing whether the nutrient intake of livestock and poultry is sufficient. When extracting the node representation vector of individual livestock and poultry, it is necessary to ensure that the extracted vector accurately reflects the feature information of the node. This vector can be obtained through the output layer or intermediate layer of the model.
[0158] Extract the representation vectors of each feed nutrient node connected to the individual livestock node. The feed nutrient node representation vectors include a second comprehensive feature of nutrient type, content, and proportion. In this embodiment of the disclosure, in addition to extracting the representation vector of the individual livestock node corresponding to the livestock to be predicted, it is also necessary to extract the representation vectors of each feed nutrient node connected to the individual livestock node. These vectors contain comprehensive features such as nutrient type, content, and ratio, reflecting the characteristics and composition of various nutrients in the feed.
[0159] Nutrient type characteristics clearly identify the types of nutrients contained in the feed. Different types of nutrients play different roles in the growth, development, and maintenance of physiological functions in livestock and poultry. Content characteristics indicate the actual amount of a nutrient present in the feed, which determines the supply level of that nutrient in the feed. Proportion characteristics reflect the relative proportion of the nutrient in the total feed composition, reflecting the balance between various nutrients.
[0160] When extracting the node representation vectors of feed nutrients, it is also necessary to ensure that the extracted vectors accurately reflect the feature information of the nodes. These vectors can be obtained through the output layer or intermediate layers of the model.
[0161] Perform a dot product operation on the individual node representation vectors of livestock and poultry and the node representation vectors of each feed nutrient to generate the association strength value of each type of nutrient; In this embodiment of the disclosure, when performing a dot product operation on the individual node representation vectors of livestock and poultry and the node representation vectors of each feed nutrient, the dot product operation can measure the degree of similarity between the two vectors. Through the dot product operation, the association strength value of each type of nutrient can be obtained. The larger the association strength value, the higher the degree of association between the livestock and poultry and that type of nutrient.
[0162] When performing a dot product operation, it is essential to ensure that the two vectors have the same dimension to guarantee the accuracy of the calculation. Furthermore, it is crucial to maintain consistency in the units and dimensions of different features to avoid inaccurate results due to inconsistent units or mismatched dimensions.
[0163] Association strength values can serve as an important indicator for assessing the demand of livestock and poultry for this type of nutrient, and can help understand the relationship between livestock and poultry and feed nutrients.
[0164] The correlation strength value is linearly transformed to map it to the numerical range of the intake prediction. The linear transformation of the association strength values is performed to map them to the numerical range of intake prediction. This linear transformation can be achieved through the model's output layer, which converts the association strength values into predictions of livestock and poultry intake of various nutrients in feed based on the node representations and model parameters.
[0165] When performing linear transformations, it is necessary to determine appropriate transformation parameters, which can be learned through the model training process. The choice of transformation parameters affects the accuracy and reliability of the prediction results, therefore, reasonable adjustments and optimizations are required.
[0166] The purpose of linear transformation is to map association strength values from an abstract vector space to a specific intake prediction space, giving the prediction results practical physical meaning. Through linear transformation, association strength values can be converted into specific prediction values for the intake of various nutrients in feed by livestock and poultry.
[0167] The values mapped from the correlation strength values are used as the predicted intake values of various nutrients, and the target graph neural network model outputs the predicted intake results of various nutrients in feed for livestock and poultry.
[0168] In this embodiment of the disclosure, after the preceding calculations and processing, predicted values for the intake of various nutrients in feed by livestock and poultry are obtained. These predicted values are output as the final prediction results. Feed can be rationally allocated based on the prediction results to ensure that livestock and poultry receive sufficient nutrition and improve breeding efficiency. Simultaneously, the prediction results can also be used to monitor the nutritional status of livestock and poultry, promptly identify nutritional problems, and take corresponding measures.
[0169] When outputting prediction results, it is essential to ensure their accuracy and reliability. The predictions can be validated and evaluated, for example, by comparing them with actual intake data to verify their accuracy. If the predictions deviate significantly from reality, the model needs to be adjusted and optimized to improve accuracy.
[0170] This invention provides a device for predicting nutrient intake in livestock and poultry feed based on blood amino acids. The device includes: a memory storing a computer program thereon; and a processor for executing the computer program stored in the memory to implement the method for predicting nutrient intake in livestock and poultry feed based on blood amino acids as described in any of the foregoing embodiments.
[0171] Figure 5 The illustrated device 100 for predicting nutrient intake in livestock feed based on blood amino acids includes a processor 1001 and a memory 1003. The processor 1001 and memory 1003 are connected, for example, via a bus 1002. Optionally, the device 100 may further include a communication component 1004, which can be used for data interaction between the device 100 and other devices, such as sending and / or receiving data. It should be noted that in actual operation, the communication component 1004 is not limited to one, and the structure of this device 100 for predicting nutrient intake in livestock feed based on blood amino acids does not constitute a limitation on the embodiments of this application.
[0172] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0173] Bus 1002 may include a pathway for transmitting information between the aforementioned components. Bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 1002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0174] The memory 1003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing program code and capable of being read by a computer, without limitation herein.
[0175] The memory 1003 is used to store program code for executing embodiments of the present disclosure, and its execution is controlled by the processor 1001. The processor 1001 is used to execute the program code stored in the memory 1003 to implement the steps shown in the foregoing embodiments of the method for predicting nutrient intake in livestock and poultry feed based on blood amino acids.
[0176] The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of the present disclosure, various changes, modifications, substitutions and variations can be made to these embodiments, and all such changes, modifications, substitutions and variations fall within the protection scope of the present disclosure.
[0177] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction, and such combinations should also be considered as part of this disclosure. To avoid unnecessary repetition, this disclosure will not further describe the various possible combinations. The technical scope of this application is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for predicting feed nutrient intake of livestock and poultry based on blood amino acids, characterized in that, The method comprises: constructing an initial livestock physiological feed correlation graph, the initial livestock physiological feed correlation graph comprising livestock individual nodes, feed nutrient nodes, and edges connecting the livestock individual nodes and the feed nutrient nodes, the edges being used to represent intake relationships of the livestock individuals with the feed nutrients and influence relationships of physiological indicators of the livestock individuals on absorption and utilization of the private chat nutrients; obtaining contents of various types of amino acids in livestock blood samples, taking the contents of the various types of amino acids as supplementary attributes, and integrating the contents into corresponding livestock individual nodes in the livestock physiological feed correlation graph to obtain a target livestock physiological feed correlation graph; calling a graph neural network model to be trained to perform deep learning processing on the target livestock physiological feed correlation graph, the graph neural network to be trained learning interaction features between nodes through a message passing mechanism and updating node representations; training the graph neural network model after deep learning using an experimental data set, adjusting model parameters with actual nutrient intake amounts as labels to obtain a target graph neural network model, wherein the experimental data set comprises livestock physiological information, feed nutrient data, blood amino acid contents, and actual nutrient intake amounts; inputting physiological information, feed nutrient compositions, and blood amino acid contents of livestock to be predicted into the target graph neural network model to obtain a prediction result of the target graph neural network model on intake amounts of various types of nutrients in feed by the livestock.
2. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 1, characterized in that, The method comprises: creating an initial node set comprising a plurality of livestock individual nodes and a plurality of feed nutrient nodes; setting livestock individual attributes for each livestock individual node and nutrient attributes for each feed nutrient node; establishing edges between the livestock individual nodes and the feed nutrient nodes to obtain an edge set, the intake relationships of the edges being used to represent historical intake records of the livestock individuals for corresponding feed nutrients; structurally organizing the initial node set and the edge set to generate an initial livestock physiological feed correlation graph with node attributes and edge attributes.
3. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 2, characterized in that, The method comprises: traversing all combinations of the livestock individual nodes and the feed nutrient nodes, and creating the edges between the livestock individual nodes and the feed nutrient nodes for which historical feeding records exist; for each created edge, extracting daily intake data of the livestock individual for corresponding feed nutrients in the historical feeding records, and calculating average intake amounts of the livestock individual as intake relationship attribute values according to the daily intake data of the livestock individual; According to different livestock physiological indexes in historical experimental data and historical experimental data of digestibility and utilization rate of feed nutrients, a correlation model of the livestock physiological indexes and the digestibility and the utilization rate is established, wherein the digestibility is used to represent the proportion of the nutrients in the feed being digested and absorbed by the livestock individual, and the utilization rate is used to represent the proportion of the nutrients after being digested and absorbed for growth metabolism; The influence degree of the physiological index of the livestock individual node determined by the correlation model on the corresponding feed nutrient digestibility and utilization rate is taken as an absorption and utilization influence relationship attribute value; According to the intake relationship attribute value and the absorption and utilization influence relationship attribute value, intake relationship attributes and absorption and utilization influence relationship attributes are set for each edge to obtain the edge set.
4. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 1, characterized in that, The graph neural network model to be trained is called to perform deep learning processing on the target livestock physiological feed correlation graph, including: Initializing a message passing layer of the graph neural network, wherein a neighbor aggregation module and a feature updating module are configured in the message passing layer; For each livestock individual node in the target livestock physiological feed correlation graph, neighbor node information of feed nutrient nodes connected with the livestock individual node and edge attributes are determined by the neighbor aggregation module; The neighbor node information and the edge attributes of each livestock individual node are subjected to feature conversion processing to generate a message passing vector of the neighbor node of each livestock individual node to the livestock individual node; The message passing vector is fused with breed attributes, age attributes, weight attributes, health status attributes, and amino acid content supplement attributes of the corresponding livestock individual node to generate a node update feature vector; The node update feature vector is used to replace original attribute representation of the livestock individual node by the feature updating module to complete node representation updating after single-layer message passing; The neighbor aggregation, message passing vector generation, and node representation updating operations of the message passing layer are repeatedly performed until a preset number of message passing layers is reached to complete the deep learning processing.
5. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 4, characterized in that, The neighbor node information and the edge attributes of each livestock individual node are subjected to feature conversion processing to generate a message passing vector of the neighbor node of each livestock individual node to the livestock individual node, including: Nutrient type attributes in the neighbor node information of each livestock individual node are extracted, and each nutrient type attribute is converted into a one-hot encoding vector representing a nutrient category; Content attributes and proportion attributes in the neighbor node information of each livestock individual node are extracted, and the content attributes and the proportion attributes are respectively converted into a first standardized numerical vector representing absolute nutrients and a second standardized numerical vector representing relative content levels; Intake relationship attributes and absorption and utilization influence relationship attributes of edges are extracted, and the intake relationship attributes and the absorption and utilization influence relationship attributes are converted into a first normalized numerical vector representing historical intake levels and a second normalized numerical vector representing physiological influence degrees; concatenate the one-hot encoded vector, the first normalized numerical value vector, the second normalized numerical value vector, the first normalized numerical value vector and the second normalized numerical value vector to generate a comprehensive vector corresponding to neighbor node information; using a linear transformation layer in the graph neural network, dimension mapping processing is performed on the comprehensive vector to generate a message passing vector with a dimension consistent with the livestock individual attribute representation of the livestock individual node.
6. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 1, characterized in that, After training the deep learning graph neural network model using the experimental data set, adjusting the model parameters with the actual nutrient intake as the label to obtain a target graph neural network model, comprising: divide the experimental data set into a training set and a validation set, each training sample in the training set includes livestock physiological information, feed nutrient data, blood amino acid content and corresponding actual nutrient intake label; iteratively execute, select a training sample from the training set, construct the livestock individual node attribute in the livestock physiological feed correlation graph according to the livestock physiological information in the training sample, construct the feed nutrient node attribute and edge attribute in the livestock physiological feed correlation graph according to the feed nutrient data, and take the blood amino acid content as the supplement attribute of the livestock individual node; input the constructed livestock physiological feed correlation graph into the deep learning graph neural network model to generate node representation through the message passing mechanism, and predict the nutrient intake prediction value based on the node representation; calculate the difference value between the nutrient intake prediction value and the actual nutrient intake label in the training sample to obtain a loss value; use the back propagation algorithm to transfer the loss value from the output layer to the input layer to adjust the parameter weight of the message passing layer in the graph neural network; after completing the iteration of all samples in the training set, evaluate the prediction accuracy of the graph neural network model using the validation set, adjust the training hyperparameters according to the accuracy result until the model converges to obtain the target graph neural network model.
7. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 6, characterized in that, The calculation of the difference value between the nutrient intake prediction value and the actual nutrient intake label in the training sample to obtain a loss value, comprising: decompose the prediction value into sub-prediction values of each type of nutrient, and each sub-prediction value corresponds to a sub-label of each type of nutrient in the actual nutrient intake label; calculate the absolute value of the error between the sub-prediction value of each type of nutrient and the sub-label; sum the absolute values of the errors of all nutrient categories to obtain a total absolute error value; calculate the ratio of the total absolute error value to the number of nutrient categories to obtain an average absolute error value; the average absolute error value is taken as the difference value between the prediction value and the actual label to obtain the loss value.
8. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to any one of claims 1-7, characterized in that, The physiological information, feed nutrient composition and blood amino acid content of the livestock to be predicted are input into the target graph neural network model to obtain the intake prediction result of each type of nutrient in the feed by the target graph neural network model, comprising: collect the physiological information of the livestock to be predicted, including breed, age, weight, health status; acquire feed nutrient composition data of the livestock and poultry to be predicted, the feed nutrient composition data including nutrient type, content, and proportion; acquire blood amino acid content data measured in a blood sample of the livestock and poultry to be predicted, to obtain content data of multiple amino acids; construct an initial livestock and poultry physiological feed correlation graph according to the physiological information and the feed nutrient composition data; add the blood amino acid content data as a supplementary attribute to a livestock and poultry individual node in the initial livestock and poultry physiological feed correlation graph corresponding to the livestock and poultry to be predicted, to obtain a livestock and poultry physiological feed correlation graph to be analyzed; input the livestock and poultry physiological feed correlation graph to be analyzed into the target graph neural network model, generate node representations through a message passing mechanism, calculate intake prediction values of various nutrients based on the node representations, and obtain intake prediction results of the livestock and poultry to various nutrients in feed output by the target graph neural network model.
9. The method of predicting feed nutrient intake of livestock and poultry based on blood amino acids according to claim 8, characterized in that, The method for predicting livestock and poultry feed nutrient intake based on blood amino acids includes the following steps: extract a livestock and poultry individual node representation vector corresponding to the livestock and poultry to be predicted, the livestock and poultry individual node representation vector including first comprehensive features of breed, age, weight, health status, and amino acid content; extract various feed nutrient node representation vectors connected to the livestock and poultry individual node, the feed nutrient node representation vector including second comprehensive features of nutrient type, content, and proportion; perform dot product operation on the livestock and poultry individual node representation vector and the various feed nutrient node representation vectors, to generate correlation strength values of each type of nutrient; perform linear transformation processing on the correlation strength values, to map the correlation strength values to a numerical range of intake prediction values; map the numerical values after mapping of the correlation strength values to intake prediction values of various nutrients, to obtain intake prediction results of the livestock and poultry to various nutrients in feed output by the target graph neural network model.
10. A device for predicting feed nutrient intake of livestock and poultry based on blood amino acids, characterized in that, The device includes: a memory having a computer program stored thereon; a processor configured to execute the computer program stored in the memory, to implement the method for predicting livestock and poultry feed nutrient intake based on blood amino acids according to any one of claims 1-9.