Cow feed proportioning optimization method and system based on AI

Through the AI-based hierarchical heterogeneous graph network and hierarchical graph reinforcement learning system, a dynamic cow herd graph network was constructed, which solved the problem that traditional feed rationing methods were difficult to balance individual differences and group optimization, and realized the precise modeling and dynamic response of the social relationships of the cow herds, improved the accuracy and adaptability of feed ratios, and improved the production efficiency and economic benefits of the dairy farm.

CN119920409AActive Publication Date: 2025-05-02ANGANG IND GRP DAIRY CO LTD

Patent Information

Application Number
CN202510408729.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-05-02
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

Traditional dairy cow feed rationing methods are difficult to balance individual differences with group optimization, and ignore social relations in dairy cows, have a single decision-making level, and lack of adaptability in static proportioning, resulting in low production efficiency and economic benefits.

Method used

Using a hierarchical heterogeneous graph network based on AI and a hierarchical graph reinforcement learning system, a dynamic dairy cow herd graph network structure is constructed, a multi-level feed ratio decision-making plan is generated, and the optimal feed distribution strategy is generated through a multi-level Nash balanced optimization system.

Benefits of technology

It realizes accurate modeling of the social relations of dairy cow herds, dynamically responds to changes in the group structure, improves the accuracy and adaptability of feed ratios, and improves the production efficiency and economic benefits of dairy cow pastures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119920409A_ABST
    Figure CN119920409A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of feed proportion optimization, and discloses an AI-based dairy cow feed proportion optimization method and system, and the optimization method comprises the following steps: processing dairy cow group feature data through a hierarchical heterogeneous graph network construction system, and generating a dynamic dairy cow group graph network structure; processing a real-time group network state tensor through a hierarchical graph reinforcement learning system, and generating a multi-level feed ratio decision scheme; and processing the multi-level decision scheme through a multi-level Nash equilibrium optimization system, and generating an optimal feed distribution strategy table. According to the method, the optimal feed distribution strategy table is obtained by optimizing the feed ratio of the dairy cows in multiple aspects, so that the dairy cows in a modernized large-scale dairy cow pasture are intelligently fed, the efficiency is improved, the yield is increased, fairness is promoted, and high adaptability and expansion are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of feed ratio optimization, and more specifically, to an AI-based dairy cow feed ratio optimization method and system. Background Art

[0002] At present, the feed proportioning technology in the dairy farming industry faces several key challenges. Traditional feed proportioning methods mainly adopt linear programming methods based on nutritional requirements, or fixed proportioning methods based on experience. These methods have the following obvious shortcomings: First, it is difficult to balance individual differences and group optimization. Cows at different production stages, body conditions, and genetic backgrounds have different nutritional requirements. The "one-size-fits-all" formula causes high-yielding cows to be malnourished and low-yielding cows to be overnourished; second, the social relationship in the dairy cow group is ignored. The dominant, affiliative and competitive relationships affect feeding, but are not considered by the existing proportioning system; third, the decision-making level is single, and it is impossible to accurately feed from the group to the individual at multiple levels, and the feed resource allocation is unreasonable; fourth, the static proportioning lacks adaptability and is difficult to adjust in real time with changes in the environment, group structure, and individual status.

[0003] The above technical problems seriously restrict the production efficiency and economic benefits of modern large-scale dairy farms. Therefore, there is an urgent need for an innovative feed ratio technology solution that can comprehensively solve the above problems. Summary of the invention

[0004] The present invention provides an AI-based dairy cow feed ratio optimization method and system to solve the technical problems mentioned in the related art.

[0005] In a first aspect, the present invention provides an AI-based method for optimizing dairy cow feed ratios, comprising the following steps: processing dairy cow group characteristic data through a hierarchical heterogeneous graph network construction system to generate a dynamic dairy cow group graph network structure; processing real-time group network state tensors through a hierarchical graph reinforcement learning system to generate a multi-level feed ratio decision plan; processing multi-level decision plans through a multi-level Nash equilibrium optimization system to generate an optimal feed distribution strategy table.

[0006] As a further optimization scheme of the present invention, the hierarchical heterogeneous graph network construction system includes a feature extraction unit, a relationship modeling unit and a dynamic update unit; the dynamic cow group graph network structure includes a node set, an edge set and an attribute set, and the processing of cow group feature data through the hierarchical heterogeneous graph network construction system includes: processing individual cow feature data through a multimodal feature fusion network to generate a cow node feature vector; processing group interaction time series data through a multidimensional social relationship modeling network to generate a cow relationship edge feature matrix; processing node features and edge features through a time series graph dynamic update network to generate a real-time group network state tensor.

[0007] As a further optimization solution of the present invention, the multimodal feature fusion network includes three parallel encoder modules and a feature fusion module, and the three parallel encoder modules include:

[0008] Basic information encoder module, used to process the basic information vector of the cow ,in, is the basic information vector containing characteristics such as age, lactation period, and weight, is the basic feature dimension, express dimensional real space; output basic eigenvectors It represents the 128-dimensional feature vector processed by the basic information encoder, and its calculation expression is:

[0009] ;

[0010] in, is the weight matrix of the fully connected layer, is the bias vector, is the rectified linear unit activation function;

[0011] Metabolic state encoder module for processing time-series metabolic state sequences ,in, Represents a metabolic state sequence containing time series data such as milk production, feed intake, and body condition score. is the length of time series data; output metabolic feature vector represents the 256-dimensional feature vector processed by the metabolic state encoder, and its calculation expression is:

[0012] ;

[0013] in, and are the matrix and bias vector of the encoder respectively, and are the forward and backward hidden states of LSTM, is the vector concatenation operator;

[0014] Behavior feature encoder module for processing spatiotemporal behavior data tensors ,in, represents a spatiotemporal behavior data tensor including activity level, feeding duration, rest time, etc. and are the height and width dimensions of the spatial data respectively; output behavior feature vector It represents the 256-dimensional feature vector processed by the behavior feature encoder, and its calculation expression is:

[0015] ;

[0016] in, For the pooling operation, , and These are the 1st, 2nd and 3rd layer 3D convolution operations respectively.

[0017] As a further optimization scheme of the present invention, the multidimensional social relationship modeling network includes a relationship type identification module, a feature extraction module and an edge feature generation module, including:

[0018] Relation type identification module for processing position sequence data and behavioral interaction records ,in, Represents dairy cow and The position sequence data between Represents dairy cow In time location, Represents dairy cow and The behavioral interaction records between Indicates that they are in time Interaction behavior; output relationship type vector The three-dimensional vector representing the relationship type between cows corresponds to the probability distribution of dominant relationship, affinity relationship and competitive relationship, and its calculation expression is:

[0019] ;

[0020] in, is the weight matrix, and They are convolutional neural network and long short-term memory network, is the normalized exponential function;

[0021] Interaction feature extraction module, used to process interaction frequency statistics and interaction duration ,in, Represents dairy cow and between The frequency of different types of interactions, Represents dairy cow and between The average duration of different types of interactions; output interaction feature vector Represents dairy cow and The 128-dimensional interaction feature vector between is calculated as:

[0022] ;

[0023] in, is the weight matrix, is the bias vector;

[0024] Edge feature generation module, used to process relationship type vectors and the interaction eigenvector , output edge feature vector Represents dairy cow and The 256-dimensional edge feature vector between is calculated as:

[0025] ;

[0026] in, Generates functions for edge features, is the weight matrix, is the bias vector.

[0027] As a further optimization scheme of the present invention, the multi-level feed ratio decision-making scheme includes a system-level benchmark feed formula vector, a group differentiated formula matrix and a personalized precision feeding plan set. The real-time group network state tensor is processed by a hierarchical graph reinforcement learning system, including: processing global graph state data through a system-level graph attention strategy network to generate a benchmark feed formula vector; processing sub-group feature data through a group-level multi-agent advantage actor critic network to generate a group differentiated formula matrix; processing individual state data through an individual-level graph attention reinforcement learning network to generate a personalized precision feeding plan set.

[0028] As a further optimization scheme of the present invention, the system-level graph attention strategy network includes a graph attention encoding module, a global information aggregation module and a strategy generation module, including:

[0029] The graph attention encoding module is used to generate the node attention weight matrix ,in, express The attention weight matrix between nodes, is the total number of dairy cows, and its calculation expression is:

[0030] ;

[0031] in, Representation Node For Node The attention weight, For Node The query vector is For Node The key vector of is the attention vector, For Node The neighbor set of Indicates the index variable when summing. represents the natural exponential function, is the activation function of the rectified linear unit with leakage;

[0032] The global information aggregation module is used to generate node message vectors ,in, represents the node message vector matrix, is the feature dimension graph level, and its calculation expression is:

[0033] ;

[0034] in, For Node The message vector, is the transformation matrix of the value, For Node In time The characteristic vector of is a nonlinear activation function and ,in, Represents the global representation vector of the entire graph, is the set of all nodes in the graph, is the weight matrix of graph level representation;

[0035] The strategy generation module is used to generate the benchmark feed formula vector ,in, represents the system-level benchmark feed recipe vector, is the amount of feed components, and its calculation expression is:

[0036] ;

[0037] in is the system-level decision-making strategy function, and are the weight and bias of the policy network respectively.

[0038] As a further optimization scheme of the present invention, the group-level multi-agent advantage actor-critic network includes a subgroup division module, a state encoding module, a strategy network module and a value network module, including:

[0039] The subgroup partitioning module uses the spectral clustering algorithm, and its calculation expression is:

[0040] ;

[0041] in, Indicates The graph of the subgroups is shown in Figure 2. is the spectral clustering algorithm, is the number of subgroups, where Representation Node and nodes The feature similarity of is the cosine similarity function;

[0042] The policy network module is used to generate the population recipe adjustment vector ,in, Representing a group The formula adjustment vector is calculated as follows:

[0043] ;

[0044] in, For the group The policy function, For the group The state vector of is a normal distribution, where the mean network is , and are the mean network weight and bias respectively, and the standard deviation network is , and are the standard deviation network weights and biases, is a soft positive function;

[0045] The value network module is used to generate state value estimates Representing a group The state value estimate is calculated as follows:

[0046] ;

[0047] in, and are the weights and biases of the value network, Representing a group communication information, is the communication information conversion matrix;

[0048] The individual-level graph attention reinforcement learning network comprises a state encoding module, an attention calculation module, a strategy generation module and a reward calculation module, including:

[0049] The attention calculation module is used to generate the attention context vector , indicating a node The attention context vector is calculated as follows:

[0050] ;

[0051] in, is the individual level attention coefficient, For Node The value vector of is the scaling factor of the attention mechanism;

[0052] The strategy generation module is used to generate personalized feeding plans ,in, Represents an individual The feeding plan vector is calculated as follows:

[0053] ;

[0054] in, For individuals The policy function, For individuals The state vector of is the policy network function;

[0055] The reward calculation module is used to calculate the comprehensive reward value:

[0056] ;

[0057] in, Represents an individual The comprehensive reward value, is the reward weight coefficient, , and They are production performance rewards, health status rewards and social relationship rewards.

[0058] As a further optimization scheme of the present invention, the multi-level Nash equilibrium optimization system includes a utility function construction unit, an equilibrium solving unit and a resource allocation unit. The processing of multi-level decision-making schemes through the multi-level Nash equilibrium optimization system includes: processing decision-making scheme data through a multi-level utility function construction network to generate an intelligent agent utility function set; processing the utility function set through an iterative optimal response algorithm to generate a Nash equilibrium strategy set; processing the equilibrium strategy set through a priority resource allocation algorithm to generate a final feed allocation strategy table.

[0059] As a further optimization solution of the present invention, the multi-level utility function construction network includes three parallel utility calculation modules, and the three parallel utility calculation modules include:

[0060] System-level utility calculation module, used to calculate the system-level utility function:

[0061] ;

[0062] in, represents the system-level utility function, is the production benefit function, is the cost function, is the nutritional balance function, is the system-level utility weight;

[0063] Group-level utility calculation module, used to calculate group-level utility function:

[0064] ;

[0065] in, represents the group-level utility function, For individuals The weight in the group, is the group-level action value function, for Divergence, measuring strategy and The difference for The weight coefficient of the divergence;

[0066] Individual-level utility calculation module, used to calculate individual-level utility function:

[0067] ;

[0068] in, represents the individual-level utility function, is the individual immediate reward function, is the L2 norm of the difference between the individual recipe and the group recipe, is the competition cost function, is the weight coefficient of individual-level utility loss.

[0069] In the second aspect, the present invention also provides an AI-based dairy cow feed ratio optimization system for executing the above-mentioned AI-based dairy cow feed ratio optimization method, including: a relationship modeling module, which is used to process dairy cow group characteristic data through a hierarchical heterogeneous graph network construction system to generate a dynamic dairy cow group graph network structure; a hierarchical feed decision module, which is used to process real-time group network state tensors through a hierarchical graph reinforcement learning system to generate a multi-level feed ratio decision plan; an equilibrium optimization module, which is used to process multi-level decision plans through a multi-level Nash equilibrium optimization system to generate an optimal feed distribution strategy table.

[0070] The beneficial effects of the present invention are as follows: accurate modeling of social relations of dairy cow groups is achieved through heterogeneous graph networks, and more important social interaction information is captured; the dynamic graph update mechanism enables the system to respond to changes in group structure in real time, and the average response delay is reduced; and the overall milk production is improved through a hierarchical learning architecture; the graph attention mechanism significantly improves decision-making accuracy and individual feed ratio accuracy; multi-agent collaborative learning accelerates strategy convergence and reduces training time;

[0071] In addition, the dynamic Nash equilibrium mechanism ensures fair resource allocation and improves the nutritional intake of vulnerable individuals; the dynamic priority adjustment strategy reduces internal competition and social conflict events in the group; and the global resource constraint management improves feed utilization;

[0072] Through the adaptive graph network structure, it supports ranch applications of any scale. The real-time update mechanism responds quickly to environmental changes. The multi-level collaborative optimization framework has strong generalization ability and can adapt to different dairy cow groups. It improves the feed ratio efficiency and accuracy of large-scale dairy farms, and effectively solves the problem that traditional feed ratio methods seriously restrict the production efficiency and economic benefits of modern large-scale dairy farms. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 It is a flow chart of a method for optimizing dairy cow feed ratio based on AI provided by the present invention;

[0074] Figure 2 is a basic information table of a pasture provided by an embodiment of the present invention;

[0075] Figure 3 is a feed resource status table of a pasture provided by an embodiment of the present invention;

[0076] Figure 4 is a system-level benchmark recipe table provided by an embodiment of the present invention;

[0077] Figure 5 is a group-level differentiated formula table (high-yield group) provided in an embodiment of the present invention;

[0078] Figure 6 is a utility function calculation table for the individual dairy cow numbered A001 provided in an embodiment of the present invention;

[0079] Figure 7 It is a Nash equilibrium strategy table for a high-yield group provided by an embodiment of the present invention;

[0080] Figure 8 This is a resource allocation priority table (top 5) provided in an embodiment of the present invention;

[0081] Fig. 9 is a social relationship recognition accuracy table provided by an embodiment of the present invention;

[0082] Fig.10 is a dynamic response performance table provided by an embodiment of the present invention;

[0083] Fig.11 is a feature representation accuracy table provided by an embodiment of the present invention;

[0084] Fig.12 This is a table showing the effect of improving the milk production of dairy cows with a test period of 12 weeks provided by an embodiment of the present invention;

[0085] Fig.13 It is a feed ratio accuracy table provided by an embodiment of the present invention;

[0086] Fig.14 is a strategy convergence efficiency table provided by an embodiment of the present invention;

[0087] Fig.15 It is a nutrition intake compliance rate table provided by an embodiment of the present invention;

[0088] Fig.16 is a statistical table of social conflict events provided by an embodiment of the present invention;

[0089] Fig.17 is a feed utilization efficiency table provided by an embodiment of the present invention;

[0090] Fig.18 It is a schematic diagram of the module composition of the feed ratio optimization system provided by the present invention. DETAILED DESCRIPTION

[0091] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the contents of this specification. Each example may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.

[0092] In one embodiment, if Figure 1 As shown, the present invention provides an AI-based dairy cow feed ratio optimization method, comprising the following steps:

[0093] Step 1: Process the cow herd characteristic data through a hierarchical heterogeneous graph network construction system to generate a dynamic cow herd graph network structure;

[0094] The input data in this step include: individual cow characteristic data, including basic information, metabolic status, behavioral data, and group interaction data, including location information, behavioral records, and social relationship data.

[0095] The hierarchical heterogeneous graph network construction system consists of a feature extraction unit, a relationship modeling unit, and a dynamic update unit. The feature extraction unit first processes individual data to generate node features, and then passes the output results to the relationship modeling unit to build edge features. Finally, the dynamic update unit integrates node features and edge features to generate a complete graph network structure. The system output is a set of nodes , edge set and attribute collection Dynamic Heterogeneous Graph Network .

[0096] The specific implementation process includes the following sub-steps:

[0097] Sub-step 1.1: Process the individual feature data of the cow through the multimodal feature fusion network to generate the cow node feature vector; specifically, the multimodal feature fusion network contains three parallel encoder modules and one feature fusion module, and the contents of each module include:

[0098] Basic information encoder module, used to process the basic information vector of the cow ,in, is the basic information vector containing characteristics such as age, lactation period, and weight, is the basic feature dimension, express dimensional real space; output basic eigenvectors It represents the 128-dimensional feature vector processed by the basic information encoder, and its calculation expression is:

[0099] ;

[0100] in, is the weight matrix of the fully connected layer, is the bias vector, is the rectified linear unit activation function.

[0101] Metabolic state encoder module for processing time-series metabolic state sequences ,in, Represents a metabolic state sequence containing time series data such as milk production, feed intake, and body condition score. is the length of time series data; output metabolic feature vector represents the 256-dimensional feature vector processed by the metabolic state encoder, and its calculation expression is:

[0102] ;

[0103] ;

[0104] in, for The hidden state of the moment, for Metabolic state input at each moment, for The hidden state of the moment, and are the weight matrix and bias vector of the encoder respectively, and are the final hidden states of the forward and backward LSTMs, respectively.

[0105] Behavior feature encoder module for processing spatiotemporal behavior data tensors ,in, represents a spatiotemporal behavior data tensor including activity level, feeding duration, rest time, etc. and are the height and width dimensions of the spatial data respectively; output behavior feature vector It represents the 256-dimensional feature vector processed by the behavior feature encoder, and its calculation expression is:

[0106] ;

[0107] in, For the pooling operation, , and These are the 1st, 2nd and 3rd layer 3D convolution operations respectively.

[0108] Feature fusion module, used to process the output feature vectors of the above three encoders, and output them as node feature vectors , its calculation expression is:

[0109] ;

[0110] in, is the feature fusion weight matrix; the generated node feature vector This will be used as input for sub-step 1.2.

[0111] Sub-step 1.2: Process the group interaction time series data through the multi-dimensional social relationship modeling network to generate the cow relationship edge feature matrix; the multi-dimensional social relationship modeling network includes a relationship type recognition module, a feature extraction module and an edge feature generation module, and the specific contents include the following:

[0112] Relation type identification module for processing position sequence data and behavioral interaction records ,in, Represents dairy cow and The position sequence data between Represents dairy cow In time location, Represents dairy cow and The behavioral interaction records between Indicates that they are in time Interaction behavior; output relationship type vector The three-dimensional vector representing the relationship type between cows corresponds to the probability distribution of dominant relationship, affinity relationship and competitive relationship, and its calculation expression is:

[0113] ;

[0114] ;

[0115] in, Represents dairy cow and cows At the moment The Euclidean distance of and Respectively represent cows and cows At the moment The location coordinates of represents the Euclidean distance norm, is the weight matrix, and They are convolutional neural network and long short-term memory network, is the normalized exponential function.

[0116] Interaction feature extraction module, used to process interaction frequency statistics and interaction duration ,in, Represents dairy cow and between The frequency of different types of interactions, Represents dairy cow and between The average duration of different types of interactions; output interaction feature vector Represents dairy cow and The 128-dimensional interaction feature vector between is calculated as:

[0117] ;

[0118] in, is the weight matrix, is the bias vector.

[0119] Edge feature generation module, used to process relationship type vectors and the interaction eigenvector , output edge feature vector Represents dairy cow and The 256-dimensional edge feature vector between is calculated as:

[0120] ;

[0121] in, Generates functions for edge features, is the weight matrix, is the bias vector. The generated edge feature matrix This will be used as input for sub-step 1.3.

[0122] Sub-step 1.3: Process node features and edge features through the time-series graph dynamic update network to generate a real-time group network state tensor; the time-series graph dynamic update network includes a state update module, a structure update module, and a graph state generation module. The contents of each module are as follows:

[0123] Status update module, used to process historical node status , current moment features , historical edge weight and current interaction features , output the updated node status and the updated edge weights ; Its calculation expression is:

[0124] .

[0125] Structure update module, used to process historical graph structure , add a new node collection , remove the node collection , the output is the updated graph structure , its calculation expression is:

[0126] .

[0127] The graph state generation module is used to process the updated node state, edge weight and graph structure, and outputs the graph state tensor , its calculation expression is: ;

[0128] in, is the feature dimension. The generated graph state tensor It will be used as input to step 2 for subsequent decision optimization.

[0129] Step 2: Process the real-time group network state tensor through the hierarchical graph reinforcement learning system to generate a multi-level feed ratio decision plan; the input of this step is the graph state tensor generated in step 1 , a three-level feed ratio decision plan is generated through a hierarchical graph reinforcement learning system. The system consists of a system-level decision unit, a group-level decision unit, and an individual-level decision unit. The three units are collaboratively optimized through hierarchical information flows. The specific execution process includes the following sub-steps:

[0130] Sub-step 2.1: Process the global graph state data through the system-level graph attention strategy network to generate a benchmark feed recipe vector; the system-level graph attention strategy network includes a graph attention encoding module, a global information aggregation module, and a strategy generation module:

[0131] Graph attention encoding module, used to generate node attention weight matrix ,in, express The attention weight matrix between nodes, is the total number of dairy cows, and its calculation expression is:

[0132] ;

[0133] in, Representation Node For Node The attention weight, For Node The query vector is For Node The key vector of is the attention vector, For Node The neighbor set of Indicates the index variable when summing. represents the natural exponential function, is the leaky rectified linear unit activation function.

[0134] Global information aggregation module, used to generate node message vectors ,in, represents the node message vector matrix, is the feature dimension graph level, and its calculation expression is:

[0135] ;

[0136] in, For Node The message vector, is the transformation matrix of the value, For Node In time The characteristic vector of is a nonlinear activation function, , Represents the global representation vector of the entire graph, is the set of all nodes in the graph, is the weight matrix of graph level representation.

[0137] Strategy generation module for generating benchmark feed recipe vectors ,in, represents the system-level benchmark feed recipe vector, is the amount of feed components, and its calculation expression is:

[0138] ;

[0139] in, is the system-level decision-making strategy function, and are the weights and biases of the policy network respectively. The generated baseline feed recipe vector This will be used as input for sub-step 2.2.

[0140] Sub-step 2.2: Process the sub-group feature data through the group-level multi-agent superior actor-critic network to generate a group differentiation recipe matrix; the group-level multi-agent superior actor-critic network includes a sub-group partitioning module, a state encoding module, a policy network module, and a value network module:

[0141] The subgroup partitioning module uses a spectral clustering algorithm to process graph state tensors. and the benchmark recipe vector ; The output is Graph representation of subgroups , its calculation expression is:

[0142] ;

[0143] in, Indicates The graph of the subgroups is shown in Figure 2. is the spectral clustering algorithm, is the number of subgroups, Representation Node and nodes The feature similarity of is the cosine similarity function.

[0144] The state encoding module is used to process the subgroup graph representation , the benchmark recipe vector , population feature vector , including statistical characteristics such as lactation stage distribution and age structure; the output is the population state vector , the calculation expression is: ;

[0145] in For subgroups The graph pooling feature vector of For the graph pooling operation, For subgroups Graph representation of .

[0146] The policy network module is used to generate the population recipe adjustment vector ,in, Representing a group The formula adjustment vector is calculated as follows: ;

[0147] in, For the group The policy function, For the group The state vector of is a normal distribution, and the mean network is , and are the mean network weight and bias respectively, and the standard deviation network is , and are the standard deviation network weights and biases, is a soft positive function.

[0148] The value network module is used to generate state value estimates Representing a group The state value estimation of is calculated as follows: ;

[0149] in, and are the weights and biases of the value network, Representing a group communication information, is the communication information conversion matrix. The generated population differentiation recipe matrix This will be used as input for sub-step 2.3.

[0150] Sub-step 2.3: Process individual state data through the individual-level graph attention reinforcement learning network to generate a personalized precision feeding plan set; the individual-level graph attention reinforcement learning network includes a state encoding module, an attention calculation module, and a strategy generation module. The specific contents of each module are as follows:

[0151] The state encoding module is used to generate Represents the individual state vector, and its calculation expression is:

[0152] ;

[0153] in, Represents the characteristics of individual nodes, represents the neighbor message vector, Indicates the group formula, Represents an individual demand vector, including milk production, body weight, health status, etc.

[0154] The attention calculation module is used to process individual state vectors and neighbor state set ,generate represents the attention context vector, which is calculated as: ;

[0155] in, is the individual level attention coefficient, For Node The value vector of is the scaling factor of the attention mechanism.

[0156] The strategy generation module is used to process individual state vectors and the attention context vector , generate personalized feeding plans , its calculation expression is: ;

[0157] in For individuals The policy function, For individuals The state vector of is the policy network function.

[0158] The reward calculation module is used to generate Represents the comprehensive reward value, and its calculation expression is:

[0159] ;

[0160] in Represents an individual The comprehensive reward value, is the reward weight coefficient, , and They are production performance rewards, health status rewards and social relationship rewards.

[0161] Generated personalized precision feeding plan set Will be used as input for step 3.

[0162] Step 3: Process the multi-level decision-making scheme through the multi-level Nash equilibrium optimization system to generate the optimal feed allocation strategy table; the input of this step includes: the benchmark feed formula vector generated in step 2.1 , the population differentiation recipe matrix generated in step 2.2 , the personalized precision feeding plan set generated in step 2.3 The multi-level Nash equilibrium optimization system consists of a utility function construction unit, an equilibrium solving unit, and a resource allocation unit, and achieves coordination and consistency of multi-level decisions through iterative optimization.

[0163] The specific implementation process includes the following sub-steps:

[0164] Sub-step 3.1: Process the decision-making scheme data through the multi-level utility function construction network to generate the agent utility function set; the multi-level utility function construction network contains three parallel utility calculation modules, and the specific contents of each module are as follows:

[0165] The system-level utility calculation module is used to calculate the system-level utility function , the calculation expression is:

[0166] ;

[0167] in, represents the benchmark recipe vector, represents the group-level utility function, For individuals The weight in the group, is the group-level action value function, for Divergence, measuring strategy and The difference for The weight coefficient for the divergence.

[0168] Group-level utility calculation module, used to calculate ; Its calculation expression is:

[0169] ;

[0170] in, represents the group-level utility function, For individuals The weight in the group, is the group-level action value function, for Divergence, measuring strategy and The difference for The weight coefficient for the divergence.

[0171] The individual utility calculation module is used to calculate , its calculation expression is:

[0172] ;

[0173] in, represents the individual-level utility function, is the individual immediate reward function, is the L2 norm of the difference between the individual recipe and the group recipe, is the competition cost function, is the weight coefficient of individual-level utility loss. The utility function set generated This will be used as input for sub-step 3.2.

[0174] Sub-step 3.2: Process the utility function set through the iterative best response algorithm to generate the Nash equilibrium strategy set; the iterative best response algorithm includes a strategy initialization module, an iterative update module and a convergence test module:

[0175] The strategy initialization module is used to generate the initial strategy set , its calculation expression is:

[0176]

[0177] ;

[0178] ;

[0179] in is the system-level initial strategy, is the policy network weight matrix, is the benchmark feed formula vector; is the group-level initial strategy, is a normal distribution, is the mean function, is the standard deviation function, is the population state vector; is the individual-level initial strategy, is the strategy generation function, is the individual state vector, is the attention context vector, is the vector concatenation operator.

[0180] The iterative update module is used to generate Round Strategy Set , its calculation expression is:

[0181] ;

[0182] ;

[0183] ;

[0184] in, Indicates Round system-level strategy, is the system-level benchmark recipe vector, is the system-level utility function, represents the parameters that maximize the utility function; Indicates Wheel Group strategy, is the population recipe vector, is the group-level utility function based on the system strategy; Indicates Wheel Individual strategy, For individual feeding plans, is the individual-level utility function based on group and system strategies.

[0185] The convergence test module is used to generate the convergence judgment result, and its calculation expression is:

[0186] ;

[0187] in, represents the maximum difference between two consecutive rounds of strategies, Indicates The strategy set of the round, Indicates The strategy set of the round, is the infinite norm, , It is a Boolean value indicating whether it converges. is the preset convergence threshold. The generated Nash equilibrium strategy set This will be used as input for sub-step 3.3.

[0188] Sub-step 3.3: Process the balanced strategy set through the priority resource allocation algorithm to generate the final feed allocation table; the priority resource allocation algorithm includes a constraint checking module, a priority calculation module and an allocation execution module:

[0189] The constraint checking module is used to handle individual resource requirements , generate the feasibility check result; its calculation expression is: ;

[0190] in, Boolean value indicating whether resource allocation is feasible. For all The sum of the individuals is calculated, Indicates the feeding plan, Indicates Individuals in the feeding program The amount of resources required, Represents the total available resource constraints of the system.

[0191] The priority calculation module is used to process the individual state vector , Historical Reward Sequence , Social relationship strength , generating individual priority vectors , its calculation expression is:

[0192]

[0193]

[0194]

[0195] ;

[0196] in, represents the productivity score, is the productivity assessment weight matrix, For the Individuals in The state vector at the moment; represents the historical performance score, is a long short-term memory network, For the The historical reward sequence of an individual, represents the social relationship score, For the The set of neighbors of an individual, for Moment Individual and The strength of social ties between For the Individuals in The priority vector of the moment, It is the priority calculation function.

[0197] Assign execution modules to handle individual feeding plans , Individual Priorities , Remaining resources , generate the final allocation plan , its calculation expression is:

[0198] ;

[0199] in, Indicates The resource allocation ratio coefficient of each individual, represents the S-type activation function, which maps the output to the (0,1) interval. represents the priority conversion weight matrix, Indicates Individuals in The priority vector of the moment, Indicates The final allocation plan for each individual, represents the allocation function considering resource constraints, Indicates The initial feeding plan for each individual, express The amount of available resources remaining in the system at that moment.

[0200] The final feed distribution table generated As the final output result of this implementation.

[0201] In yet another embodiment, Fig.18 The present invention also provides an AI-based dairy cow feed ratio optimization system for executing the above-mentioned feed ratio optimization method, including: a relationship modeling module, which is used to process dairy cow group characteristic data through a hierarchical heterogeneous graph network construction system to generate a dynamic dairy cow group graph network structure; a hierarchical feed decision module, which is used to process real-time group network state tensors through a hierarchical graph reinforcement learning system to generate a multi-level feed ratio decision plan; an equilibrium optimization module, which is used to process multi-level decision plans through a multi-level Nash equilibrium optimization system to generate an optimal feed allocation strategy table.

[0202] In the above embodiment, by innovatively combining graph reinforcement learning with multi-agent collaborative competition mechanism, accurate modeling of social relations of dairy cow groups is achieved through heterogeneous graph networks, and more important social interaction information is captured; the dynamic graph update mechanism enables the system to respond to changes in group structure in real time, and the average response delay is reduced; multimodal feature fusion improves the accuracy of individual feature representation, and the accuracy of feature representation is improved; moreover, the hierarchical learning architecture realizes collaborative optimization from group to individual, and the overall milk production is improved; the graph attention mechanism significantly improves the decision-making accuracy and the accuracy of individual feed ratio; multi-agent collaborative learning accelerates the strategy convergence speed and reduces the training time; in addition, the dynamic Nash equilibrium mechanism ensures fair resource allocation and improves the nutritional intake rate of vulnerable individuals. Priority adjustment reduces conflicts, and global resource management improves feed utilization; and the adaptive graph network structure supports ranch applications of any scale, and the scalability reaches the level of 10,000 heads; the real-time update mechanism ensures the rapid response of the system to environmental changes, and the adaptability is improved; the multi-level collaborative optimization framework has a strong generalization ability and can adapt to dairy cow groups of different breeds and ages.

[0203] Through the three steps of the above technical solution, the following specific technical effects are achieved:

[0204] 1. Accurate modeling effect: The social relationship of the dairy cow group is accurately modeled through a heterogeneous graph network, capturing more than 95% of important interaction information. The dynamic graph update mechanism allows the system to respond in real time, with an average delay of less than 30 seconds. Multimodal feature fusion increases the accuracy of feature representation by 40%;

[0205] 2. Decision optimization effect: The hierarchical learning architecture increases the overall milk production by 15%-20%, the graph attention mechanism makes the accuracy of individual feed ratio reach 92%, and the multi-agent collaborative learning reduces the training time by 35%;

[0206] 3. Resource allocation effect: Dynamic Nash equilibrium ensures fair resource allocation, and increases the nutritional intake of vulnerable individuals by 50%. Dynamic adjustment strategies reduce competition and reduce social conflict events by 60%. Resource management improves feed utilization and reduces waste.

[0207] 4. System adaptability: The adaptive graph network structure supports ranch applications of any scale, and the scalability reaches the level of 10,000 heads; the real-time update mechanism ensures the system's rapid response to environmental changes, and the adaptability is improved by 80%; the multi-level collaborative optimization framework has strong generalization capabilities and can adapt to dairy cows of different breeds and ages.

[0208] Real application examples of the above embodiments

[0209] like Figure 2 and Figure 3As shown, the above embodiment is actually applied in a large modern dairy farm. It can be seen that the individual differences of dairy cows in the whole farm are large, the group structure is complex, social relationships affect feeding, and resources are limited, resulting in poor allocation of dairy cow feeding resources, uncoordinated dairy cow feed ratios, and affected balanced nutritional absorption of dairy cows.

[0210] The system collects cow characteristic information through multiple data sources: basic information is updated daily from the pasture management system, metabolic status is assessed weekly through the body condition scoring system, feeding behavior is monitored in real time by the electronic ear tag system, movement data is collected every 5 minutes through the GPS positioning system, and milk production records are automatically recorded at each milking. These data together constitute a complete individual cow characteristic portrait.

[0211] The system identifies and monitors social relationships between cows in a variety of ways: dominant relationships are updated weekly through behavioral observations and location data, affinity relationships are determined daily based on synchronous activities and spatial distance, and competitive relationships are updated in real time through feeding conflicts and interaction frequency. This multi-level social relationship monitoring ensures that the system can accurately grasp the dynamic changes within the group.

[0212] In addition, the ranch is equipped with an environmental monitoring station, which collects and monitors environmental parameters such as temperature, humidity, wind speed and light every 10 minutes to achieve real-time monitoring of the breeding environment.

[0213] like Figures 4 to 18 As shown, this embodiment selects multiple dairy cows in a large ranch for experiments and obtains the required data information. Taking the dairy cow numbered A001 as an example, its basic information includes: 4 years old, 2 parities, weight 650kg, and lactation period of 120 days. In terms of metabolic state, the daily feed intake is 23.5kg, the body condition score is 3.25 points, the daily rumination is 420 minutes, and the body temperature is 38.5℃. The behavioral data show: standing for 14.2 hours a day, moving a distance of 2.8km, drinking water 12 times, and eating 8 times. These data fully reflect the physiological and behavioral characteristics of the dairy cow.

[0214] The social relationship data of A001 cow and the surrounding cows show that A001 cow keeps a relatively close distance with A002 cow (distance frequency is 85%) and has a dominant relationship (relationship strength is 0.82); A001 cow has an affinity with A003 cow (relationship strength is 0.65) and a moderate distance (distance frequency is 75%); A001 cow has a competitive relationship with A004 cow (relationship strength is -0.38) and a long distance (distance frequency is 45%); A001 cow has a neutral relationship with A005 cow (relationship strength is 0.12) and a general distance (distance frequency is 60%). These data reflect the social status and interaction mode of A001 in the group. The system generates a 640-dimensional feature vector for each cow node. Each node establishes a connection relationship with 12-18 other nodes on average, and each edge contains 256-dimensional feature information. Taking A001-A005 as an example, they establish connections with 15, 12, 18, 14, and 16 other nodes respectively, forming a close social network structure.

[0215] Taking A001 as an example, we feed cows in different time periods throughout the day according to their production status. In the morning, we feed 3.5kg of concentrate, 4.0kg of silage, and 1.5kg of hay, mainly for the peak milk production period; at noon, we feed 2.75kg of concentrate, 4.25kg of silage, and 1.5kg of hay to maintain production and replenish water; at night, we feed 2.5kg of concentrate, 3.0kg of silage, and 1.5kg of hay to meet the nighttime metabolic needs. The daily additive feeding amount is 0.5kg for nutritional supplementation. The feeding plan fully considers the physiological rhythm and nutritional needs of dairy cows.

[0216] The system has shown good performance in ranches of different sizes. In the test of ranches with a scale of 1,000-10,000 heads, the average response time was 287.7ms, the memory occupied 9.4GB, and the accuracy remained at a high level of 98.2%. As the scale increases, the performance only decreases slightly, showing excellent scalability. The system has good adaptability to environmental changes. The average detection time for changes in environmental factors such as temperature, humidity and weather is 12.8 seconds, the adjustment completion time is 45.6 seconds, and the system recovery rate reaches 96.5%. This shows that the system can quickly identify and respond to environmental changes and maintain stable performance. And the system shows excellent generalization ability. In scenarios such as the introduction of new varieties, seasonal changes and feed changes, the average adaptation cycle takes only 3.2 days, the optimization effect reaches 92.8%, and the system stability remains at a high level of 95.5%. This shows that the system has good transfer learning capabilities and can quickly adapt to various changing scenarios.

[0217] Analysis and research show that this implementation method has achieved remarkable technical effects in practical applications, with all indicators reaching or exceeding the expected goals and exceeding expectations in some aspects, proving the feasibility and advancement of the technical solution.

[0218] The above describes an embodiment of the present invention, but this embodiment is not limited to the above specific implementation methods. The above specific implementation methods are merely illustrative and not restrictive. Under the guidance of this embodiment, ordinary technicians in this field can also make many forms, all of which are protected by this embodiment.

Claims

1. A method for optimizing dairy cow feed ratio based on AI, characterized in that: The following steps are involved: The hierarchical heterogeneous graph network construction system is used to process the cow herd characteristic data and generate a dynamic cow herd graph network structure; Process the real-time group network state tensor through the hierarchical graph reinforcement learning system to generate a multi-level feed ratio decision plan; Process multi-level decision-making schemes through a multi-level Nash equilibrium optimization system to generate an optimal feed allocation strategy table; The method of constructing a system for processing dairy cow population characteristic data through a hierarchical heterogeneous graph network includes: The individual characteristic data of dairy cows are processed through a multimodal feature fusion network to generate a dairy cow node feature vector; Process group interaction time series data through a multi-dimensional social relationship modeling network to generate a cow relationship edge feature matrix; Dynamically update network processing node features and edge features through the time-series graph to generate real-time group network state tensors; The multi-level feed ratio decision-making scheme includes a system-level benchmark feed formula vector, a group differentiation formula matrix and a personalized precision feeding plan set. The real-time group network state tensor is processed by a hierarchical graph reinforcement learning system, including: Processing global graph state data through a system-level graph attention strategy network to generate a baseline feed recipe vector; The subgroup feature data are processed through a group-level multi-agent advantage actor-critic network to generate a group-differentiated recipe matrix; Individual state data is processed through an individual-level graph attention reinforcement learning network to generate a set of personalized and precise feeding plans.

2. The AI-based dairy cow feed ratio optimization method according to claim 1, characterized in that: The hierarchical heterogeneous graph network construction system comprises a feature extraction unit, a relationship modeling unit and a dynamic update unit; the dynamic cow group graph network structure comprises a node set, an edge set and an attribute set.

3. The AI-based dairy cow feed ratio optimization method according to claim 2, characterized in that: The multimodal feature fusion network includes three parallel encoder modules and a feature fusion module, and the three parallel encoder modules include: Basic information encoder module, used to process the basic information vector of the cow ,in, is the basic information vector containing characteristics such as age, lactation period, and weight, is the basic feature dimension, express dimensional real space; output basic eigenvectors It represents the 128-dimensional feature vector processed by the basic information encoder, and its calculation expression is: ; in, is the weight matrix of the fully connected layer, is the bias vector, is the rectified linear unit activation function; Metabolic state encoder module for processing time-series metabolic state sequences ,in, Represents a metabolic state sequence containing time series data such as milk production, feed intake, and body condition score. is the length of time series data; output metabolic feature vector represents the 256-dimensional feature vector processed by the metabolic state encoder, and its calculation expression is: ; in, and are the matrix and bias vector of the encoder respectively, and are the forward and backward hidden states of LSTM, is the vector concatenation operator; Behavior feature encoder module for processing spatiotemporal behavior data tensors ,in, represents a spatiotemporal behavior data tensor including activity level, feeding duration, rest time, etc. and are the height and width dimensions of the spatial data respectively; output behavior feature vector It represents the 256-dimensional feature vector processed by the behavior feature encoder, and its calculation expression is: ; in, For the pooling operation, , and These are the 1st, 2nd and 3rd layer 3D convolution operations respectively.

4. The AI-based dairy cow feed ratio optimization method according to claim 2, characterized in that: The multidimensional social relationship modeling network includes a relationship type recognition module, a feature extraction module and an edge feature generation module, including: Relation type identification module for processing position sequence data and behavioral interaction records ,in, Represents dairy cow and The position sequence data between Represents dairy cow In time location, Represents dairy cow and The behavioral interaction records between Indicates that they are in time Interaction behavior; output relationship type vector The three-dimensional vector representing the relationship type between cows corresponds to the probability distribution of dominant relationship, affinity relationship and competitive relationship, and its calculation expression is: ; in, is the weight matrix, and They are convolutional neural network and long short-term memory network, is the normalized exponential function; Interaction feature extraction module, used to process interaction frequency statistics and interaction duration ,in, Represents dairy cow and between The frequency of different types of interactions, Represents dairy cow and between The average duration of different types of interactions; output interaction feature vector Represents dairy cow and The 128-dimensional interaction feature vector between is calculated as: ; in, is the weight matrix, is the bias vector; Edge feature generation module, used to process relationship type vectors and the interaction eigenvector , output edge feature vector Represents dairy cow and The 256-dimensional edge feature vector between is calculated as: ; in, Generates functions for edge features, is the weight matrix, is the bias vector.

5. The AI-based dairy cow feed ratio optimization method according to claim 1, characterized in that: The system-level graph attention strategy network includes a graph attention encoding module, a global information aggregation module and a strategy generation module, including: The graph attention encoding module is used to generate the node attention weight matrix ,in, express The attention weight matrix between nodes, is the total number of dairy cows, and its calculation expression is: ; in, Representation Node For Node The attention weight, For Node The query vector is For Node The key vector of is the attention vector, For Node The neighbor set of Indicates the index variable when summing. represents the natural exponential function, is the activation function of the rectified linear unit with leakage; The global information aggregation module is used to generate node message vectors ,in, represents the node message vector matrix, is the feature dimension graph level, and its calculation expression is: ; in, For Node The message vector, is the transformation matrix of the value, For Node In time The characteristic vector of is a nonlinear activation function and ,in, Represents the global representation vector of the entire graph, is the set of all nodes in the graph, is the weight matrix of graph level representation; The strategy generation module is used to generate the benchmark feed formula vector ,in, represents the system-level benchmark feed recipe vector, is the amount of feed components, and its calculation expression is: ; in is the system-level decision-making strategy function, and are the weight and bias of the policy network respectively.

6. The AI-based dairy cow feed ratio optimization method according to claim 1, characterized in that: The group-level multi-agent advantage actor-critic network includes a subgroup division module, a state encoding module, a strategy network module and a value network module, including: The subgroup partitioning module uses the spectral clustering algorithm, and its calculation expression is: ; in, Indicates The graph of the subgroups is shown in Figure 2. is the spectral clustering algorithm, is the number of subgroups, where Representation Node and nodes The feature similarity of is the cosine similarity function; The policy network module is used to generate the population recipe adjustment vector ,in, Representing a group The formula adjustment vector is calculated as follows: ; in, For the group The policy function, For the group The state vector of is a normal distribution, where the mean network is , and are the mean network weight and bias respectively, and the standard deviation network is , and are the standard deviation network weights and biases, is a soft positive function; The value network module is used to generate state value estimates Representing a group The state value estimate is calculated as follows: ; in, and are the weights and biases of the value network, Representing a group communication information, is the communication information conversion matrix; The individual-level graph attention reinforcement learning network comprises a state encoding module, an attention calculation module, a strategy generation module and a reward calculation module, including: The attention calculation module is used to generate the attention context vector , indicating a node The attention context vector is calculated as follows: ; in, is the individual level attention coefficient, For Node The value vector of is the scaling factor of the attention mechanism; The strategy generation module is used to generate personalized feeding plans ,in, Represents an individual The feeding plan vector is calculated as follows: ; in, For individuals The policy function, For individuals The state vector of is the policy network function; The reward calculation module is used to calculate the comprehensive reward value: ; in, Represents an individual The comprehensive reward value, is the reward weight coefficient, where , and They are production performance rewards, health status rewards and social relationship rewards.

7. The AI-based dairy cow feed ratio optimization method according to claim 1, characterized in that: The multi-level Nash equilibrium optimization system includes a utility function construction unit, an equilibrium solution unit and a resource allocation unit. The multi-level decision-making scheme is processed by the multi-level Nash equilibrium optimization system, including: The decision-making scheme data is processed by constructing a network through multi-level utility functions to generate a set of intelligent agent utility functions; The utility function set is processed by iterative optimal response algorithm to generate a Nash equilibrium strategy set; The equilibrium strategy set is processed by the priority resource allocation algorithm to generate the final feed allocation strategy table.

8. The AI-based dairy cow feed ratio optimization method according to claim 7, characterized in that: The multi-level utility function construction network includes three parallel utility calculation modules, and the three parallel utility calculation modules include: System-level utility calculation module, used to calculate the system-level utility function: ; in, represents the system-level utility function, is the production benefit function, is the cost function, is the nutritional balance function, is the system-level utility weight; Group-level utility calculation module, used to calculate group-level utility function: ; in, represents the group-level utility function, For individuals The weight in the group, is the group-level action value function, for Divergence, measuring strategy and The difference for The weight coefficient of the divergence; Individual-level utility calculation module, used to calculate individual-level utility function: ; in, represents the individual-level utility function, is the individual immediate reward function, is the L2 norm of the difference between the individual recipe and the group recipe, is the competition cost function, is the weight coefficient of individual-level utility loss.

9. An AI-based dairy cow feed ratio optimization system, characterized in that: A method for optimizing dairy cow feed ratio based on AI for executing any one of claims 1 to 8, comprising: The relational modeling module is used to process the cow population characteristic data through a hierarchical heterogeneous graph network construction system to generate a dynamic cow population graph network structure; Hierarchical feed decision module, which is used to process real-time group network state tensors through a hierarchical graph reinforcement learning system to generate multi-level feed ratio decision plans; The equilibrium optimization module is used to process multi-level decision-making schemes through a multi-level Nash equilibrium optimization system and generate an optimal feed distribution strategy table.

Citation Information

Patent Citations

  • Risk early warning method for prevention and control of epidemic diseases in animal husbandry

    CN114781952A

  • Early warning method and system for animal diseases based on social graph network

    CN114864105A

  • Intelligent rationing method and system for pig house feed supply

    CN118607361A

  • Intelligent heterogeneous metadata scheduling optimization method and system based on reinforcement learning algorithm

    CN119719782A

  • Blockchain-based industrial internet of things data management and optimization system and method

    US20250047515A1

Cited By

  • Feed formula optimization and production line parameter adaptive control method based on machine learning

    CN120196077A

  • Feed formula optimization and production line parameter adaptive control method based on machine learning

    CN120196077B