A feed intelligent recommendation and precise feeding system based on multi-modal intelligent perception of live pigs
By combining a multimodal intelligent sensing system for pigs with reinforcement learning algorithms, the problems of multimodal data fusion and training difficulty have been solved, enabling pig health analysis and precise feeding, improving breeding efficiency and economic benefits, and reducing labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHANGJIAKOU HEFENG AGRICULTURE & ANIMAL HUSBANDRY CO LTD
- Filing Date
- 2025-03-23
- Publication Date
- 2026-06-26
AI Technical Summary
The challenges of multimodal data fusion and the difficulty of training reinforcement learning algorithms in pig farming result in insufficient data interoperability and adaptability, affecting feed utilization and pig health management.
A feed intelligent recommendation system based on multimodal intelligent perception of pigs is adopted, including a perception module, a data processing module, a decision-making module, and an execution module. Through multimodal fusion of visual, sound, behavioral, and physiological data, combined with reinforcement learning algorithms, feed feeding decisions are generated, and automated and precise feeding is achieved through the execution module.
It enables comprehensive analysis of pig health status and precise feeding, reduces feed waste and disease incidence, improves breeding efficiency and economic benefits, and reduces the need for human intervention.
Smart Images

Figure CN120167348B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and animal husbandry, specifically to a feed intelligent recommendation and precision feeding system based on multimodal intelligent perception of pigs. Background Technology
[0002] With global population growth and increasing demand for meat, traditional farming methods face problems such as inefficiency, resource waste, and difficulties in health management. Modern farming is beginning to rely on the Internet of Things (IoT), big data, artificial intelligence (AI), and sensor technology to drive intelligent development and achieve automated and precise management. However, despite the enormous potential of intelligent technologies in the farming industry, some technical challenges remain in practical applications.
[0003] First, there is the issue of multimodal data fusion. Data collected in pig farming typically comes from multiple different types of sensors, including visual images, sound, behavioral, and physiological data. These data have different characteristics and structures, and how to effectively clean, standardize, and fuse them to achieve data interoperability and accurate analysis is a major challenge in current technology.
[0004] Second, the training difficulty of reinforcement learning algorithms. Reinforcement learning requires a large amount of data and computing resources to be effectively trained in complex environments. Due to the dynamic changes in the breeding environment, the health status of pigs, feed requirements, and environmental conditions are all uncertain, resulting in insufficient adaptability and convergence speed of traditional reinforcement learning algorithms in real-world environments. In addition, the design of the reward function also needs to take into account multiple objectives, such as pig health, feed utilization, and cost, making the optimization of reinforcement learning models even more complex. Summary of the Invention
[0005] The purpose of this invention is to solve the above-mentioned problems. Therefore, the technical solution adopted by this invention is as follows: a feed intelligent recommendation and precision feeding system based on multimodal intelligent sensing of pigs, comprising a sensing module, a data processing module, a decision-making module, and an execution module.
[0006] The sensing module is responsible for collecting visual image data, sound data, physiological data, and behavioral data of pigs;
[0007] The data processing module is responsible for sequentially cleaning, standardizing, and fusing the data collected by the sensing module; different cleaning strategies are used for different modalities of data; different standardization strategies are used for different modalities of data; the data fusion operation generates fusion features; the fusion features are used to perform pig health analysis and output health status codes;
[0008] The decision-making module utilizes fused features and health status codes, combined with a policy network in a reinforcement learning algorithm, to generate feed feeding decisions; the policy network parameters are updated based on the reward function; the factors influencing the reward function include health status codes, feed utilization rate, and feed cost;
[0009] The execution module automatically controls the precision feeding equipment based on the feed feeding decision to perform feed distribution and feedback monitoring.
[0010] The sensing module's data acquisition devices include a visual sensor, a sound sensor, a behavior detection device, and a biosensor. The visual sensor is used to acquire visual image data of the pig's appearance and body shape in real time. The sound sensor is used to acquire sound data of the pig, including the frequency and pitch of its vocalizations, in real time. The behavior detection device is used to acquire behavioral data of the pig, including its movement speed and acceleration, in real time. The biosensor is used to acquire physiological data of the pig, including its body temperature, blood sugar level, and changes in its internal hormones, in real time.
[0011] Furthermore, the data cleaning requires different cleaning strategies for different modalities of data, as detailed below:
[0012] For visual image data, a Gaussian filtering algorithm is used to remove noise from the visual image, and the Sober operator is used to detect whether the visual image data is blurred. If the detection result is lower than a set first threshold, a blind deblurring algorithm is used to repair the visual image data. For sound data, a bandpass filter is designed to remove low-frequency and high-frequency noise while retaining the frequency band of pig grunts. For behavioral data, a low-pass filter is used to remove noise data caused by equipment vibration and signal interference. For physiological data, a threshold detection based on physiological common sense is used, that is, physiological data values outside the set physiological data range are eliminated.
[0013] Furthermore, the data standardization employs different standardization strategies for different modalities of data, as detailed below:
[0014] For visual image data X1, such that all pixel values fall within the range [0,1], it can be represented as follows: Where X g This represents standardized visual image data;
[0015] Z-score normalization was used for the sound data X2, behavioral data X3, and physiological data X4, with the following forms respectively: and Where μ2, μ3, and μ4 represent the means of the sound data X2, behavioral data X3, and physiological data X4, respectively, and σ2, σ3, and σ4 represent the variances of the sound data X2, behavioral data X3, and physiological data X4, respectively. v X sand X p These represent standardized sound data, behavioral data, and physiological data, respectively.
[0016] Furthermore, the data fusion is for integrating visual image data X g Sound data X v Behavioral data X s Physiological data X p The data features included, and the specific steps are as follows:
[0017] For visual image data, a convolutional neural network is used to extract visual features, including body size and pig morphology; these visual features are represented as F. g ;
[0018] For sound data, spectral analysis is used to extract sound features. From these sound features, it can be analyzed whether the newborn pigs are in a state of hunger or anxiety. These sound features are represented as a feature vector F. v ;
[0019] For behavioral data, a first LSTM neural network is used to extract behavioral features, which are represented as feature vectors F. s ;
[0020] For physiological data, a second LSTM neural network is used to extract physiological features X. p The second LSTM has a different structure than the first LSTM, and the physiological features are represented as feature vectors F. p ;
[0021] After obtaining the eigenvector F g F v F s and F p Then, feature fusion is performed on all the aforementioned feature vectors. Before feature fusion, F is... g F v F s and F p Perform dimension alignment operations.
[0022] Furthermore, the dimension alignment operation performs a linear transformation on all feature vectors, mapping them to the same dimension d. The linear transformation formula for each modality feature vector is as follows:
[0023] F' g =W g F g +b g
[0024] F' v =W v F v +b v
[0025] F' s =W s F s +b s
[0026] F' p =W p F p +b p
[0027] Among them, W g W v W s and W p It is the weight matrix, b g b v b s and b p It is the bias term parameter, F' g F' v F' s and F' p They are F g F v F s and F p The eigenvectors after linear transformation.
[0028] Furthermore, the feature fusion employs a self-attention mechanism, and incorporates a dynamic modality weighting mechanism within this mechanism; the dynamic modality weighting mechanism is expressed as follows:
[0029] ω i =σ(W w F' i +b w ), i∈{g,v,s,p}
[0030] Where, ω i F′ i The dynamic weights corresponding to the modalities, W w It is the weight matrix, b w These are bias term parameters;
[0031] After generating dynamic weights, all modal linearly transformed eigenvectors F' i Weighting is performed to generate And concatenate them into a single feature vector F all The formula is as follows:
[0032]
[0033] It is F' i The weighted eigenvectors.
[0034] Furthermore, the self-attention mechanism is implemented as follows:
[0035] First, calculate the query Q, key K, and value vector V, using the following formula:
[0036] Q = F all W Q K = F all W K V = F all W V
[0037] Among them, W Q W K and W V It is a weight matrix;
[0038] Next, calculate the attention score A:
[0039]
[0040] Finally, calculate the fusion feature F:
[0041] F = AV
[0042] The fusion feature F includes all visual image features, behavioral features, sound features, and physiological features, which are used to analyze pig health and input into the decision module;
[0043] The pig health analysis involves inputting the fused feature F into a Softmax classification network to predict the health status of pigs, which includes normal status and specific disease types.
[0044] The health status is encoded according to the following rules: disease types are encoded according to a preset severity level, with smaller encoding values for more severe disease types, and the lowest encoding value being 0, while the highest encoding value is for normal.
[0045] Furthermore, the decision-making module is constructed based on a reinforcement learning algorithm, and the construction steps are as follows:
[0046] Define the state space: The state space is represented as S, s t Let s be the fusion feature at time t in the state space S. t That is, the fusion feature F output by the data processing module;
[0047] Define the state space: The state space is represented as S, s t Let a be the fusion feature at time t in the state space S. t That is, the fusion feature F output by the data processing module;
[0048] Define the action space: The action space is denoted as A, a tLet A be the decision action at time t in action space A, and the decision action includes the choice of feed type, the amount of feed, and the timing of feeding.
[0049] Reward function design: The reward function needs to balance the health state encoding R. h Feed utilization rate R e and feed costs R c Three goals
[0050] The feed cost is the sum of the products of all feed types and their corresponding unit prices.
[0051] The feed utilization rate is the ratio of pig weight gain to feed consumption, defined as follows:
[0052]
[0053] The comprehensive representation of the reward function is as follows, r t Let the reward at time t in the reward function R be:
[0054]
[0055] Where α is a fixed weight; β t and γ t It is a dynamic weight, C max It is the maximum feed budget cost;
[0056] β t The dynamic update formula is: β t =1-e -λt λ is the exponential weight;
[0057] γ t The dynamic update formula is:
[0058] The reinforcement learning algorithm also includes a policy network; the input of the policy network is the fused feature F, and the output is the corresponding decision action;
[0059] The decision-making process of the reinforcement learning algorithm is as follows: set the current state s t Input into the policy network to select a decision action a t Execute action a t It then interacts with the environment output to the execution module to obtain the next state s. t+1 And calculate the reward r t+1 Using r t+1 Update the network parameters of the policy.
[0060] Furthermore, the execution module automatically and precisely feeds decisions based on the decisions generated by the decision-making module, and interacts with the environment to provide feedback on the execution effect of the decisions. This environmental interaction involves the control perception module and the data processing module generating new fusion features, which represent the next state 'a' in the decision-making module. t+1 .
[0061] Compared with the prior art, the advantages of the present invention are as follows:
[0062] (1) This invention utilizes multimodal intelligent sensing technology combined with reinforcement learning algorithms to optimize feed feeding decisions in real time. It can dynamically adjust the type, amount, and timing of feed feeding, thereby accurately meeting the physiological needs of pigs and avoiding feed waste. At the same time, by balancing feed costs and health status through a reward function, it reduces overall feed cost input and maximizes economic benefits.
[0063] (2) This invention uses multimodal fusion of visual, sound, behavioral and physiological data to comprehensively analyze the health status of pigs and predict possible health problems in advance, and accurately recommend functional feeds, which can effectively reduce the incidence of diseases and improve the overall health level of pigs in the farm.
[0064] (3) This invention achieves fully automated operation from sensing, pig health analysis, decision-making to feeding, significantly reducing the need for manual intervention and lowering labor costs. At the same time, by using reinforcement learning algorithms to achieve precise control and dynamic optimization of feeding equipment, it can carry out feeding management more efficiently and greatly improve the operating efficiency of farms. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1 This is a system framework diagram of the present invention;
[0067] Figure 2 This is a schematic diagram of the data processing module of the present invention;
[0068] Figure 3 This is a schematic diagram of the decision-making module of the present invention. Detailed Implementation
[0069] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0070] This embodiment provides a feed intelligent recommendation and precision feeding system based on multimodal intelligent sensing of pigs. This system is used in a large-scale pig farm that employs a "one farm, one meter" approach, equipping each pig with an independent sensing module to collect data. The goal of this embodiment is to improve feed utilization, optimize feeding management, enhance pig health, and reduce labor costs through intelligent means.
[0071] This embodiment includes a sensing module, a data processing module, a decision-making module, and an execution module. Its main functions are as follows: the sensing module is responsible for collecting physiological, behavioral, and environmental data of pigs; the data processing module is responsible for cleaning, standardizing, and fusing the data collected by the sensing module; the decision-making module generates feed feeding decisions based on the results of the data processing module using reinforcement learning algorithms; and the execution module automatically controls precision feeding equipment according to the feed feeding decisions, performing feed distribution and feedback monitoring.
[0072] The sensing module's data acquisition equipment includes at least a visual sensor, a sound sensor, a behavior detection device, and a biosensor; the visual sensor is used to acquire visual image data of the pig's appearance and body shape in real time; the sound sensor is used to acquire sound data of the pig, including the frequency and pitch of its vocalizations, in real time; the behavior detection device is used to acquire behavioral data of the pig, including its movement speed and acceleration, in real time; and the biosensor is used to acquire physiological data of the pig, including its body temperature, blood sugar level, and changes in its internal hormones, in real time.
[0073] The goal of data cleaning is to remove noise, outliers, and duplicate data from the data to ensure data quality and avoid affecting the system's analysis and decision-making. For example, during data transmission, issues may arise such as duplicate sampling or multiple uploads of the same data; malfunctions in the acquisition equipment may result in missing data or data exceeding normal thresholds; and visual image data acquired by a vision sensor may be unclear.
[0074] Because the multimodal data collected by the sensing module varies, different cleaning strategies are required for different modal data. Specifically:
[0075] For visual image data, Gaussian filtering algorithm is used to remove noise from the visual image, and Sober operator is used to detect whether the visual image data is blurred. If the detection result is lower than the set first threshold, blind deblurring algorithm is used to repair the visual image data.
[0076] For audio data, a bandpass filter is designed to remove low-frequency and high-frequency noise while preserving the frequency range of pig grunts; for example, since the frequency of pig grunts is 100Hz to 1kHz, noise below 100Hz and above 1kHz can be removed.
[0077] For behavioral data, a low-pass filter is used to remove noise data caused by device vibration and signal interference.
[0078] For physiological data, threshold detection based on common sense in physiology is used, that is, physiological data values outside the set physiological data range are removed; for example, the normal body temperature of pigs should be between 38℃ and 40℃. When the body temperature data exceeds or falls below this range, it is considered abnormal data and is removed.
[0079] In this embodiment, the goal of data standardization is to transform multimodal data from different sources into the same scale, eliminate data bias caused by differences in sensor range, data unit, etc., thereby ensuring the compatibility of different types of data and facilitating subsequent fusion, analysis and modeling.
[0080] Because multimodal data have their own characteristics, different standardization strategies are used for different modalities. The specific standardization methods for these different modalities are as follows:
[0081] For visual image data X1, since image data typically contains a large number of pixel values, and each pixel value ranges from 0 to 255, the pixel values are divided by 255 so that all pixel values fall within the range [0,1]; this can be represented as follows: Where X g This represents standardized visual image data;
[0082] Z-score normalization was used for the sound data X2, behavioral data X3, and physiological data X4, with the following forms respectively: and Where μ2, μ3, and μ4 represent the means of the sound data X2, behavioral data X3, and physiological data X4, respectively, and σ2, σ3, and σ4 represent the variances of the sound data X2, behavioral data X3, and physiological data X4, respectively. v X s and X p These represent standardized audio data, behavioral data, and physiological data, respectively. Z-score standardization is used because audio, behavioral, and physiological data typically fluctuate within a certain range.
[0083] The data fusion is to integrate visual image data X g Sound data X v Behavioral data X s Physiological data X p The data includes features used to analyze the health status and feed requirements of newborn pigs. The specific steps are as follows:
[0084] For visual image data, a convolutional neural network is used to extract visual features, including body size and morphology of the pig; if the body size is too small or the morphology is abnormal, there may be health problems; the visual features are represented as F. g ;
[0085] For sound data, spectral analysis is used to extract sound features, including frequency distribution and pitch fluctuations. These sound features can be used to analyze whether newborn pigs are experiencing hunger or anxiety. The sound features are represented as a feature vector F. v ;
[0086] For behavioral data, a first LSTM neural network is used to extract behavioral features. These features allow for the analysis of movement patterns and activity levels in newborn pigs. The reason for using LSTM to extract behavioral features is that the behavioral data is a time series, and LSTM neural networks have proven particularly effective in extracting time series features. These behavioral features are represented as feature vectors F. s ;
[0087] For physiological data, a second LSTM neural network is used to extract physiological features X. p Physiological data can be used to analyze whether the physiological indicators of newborn pigs are normal. While physiological data is also a time series, its dimensions differ from behavioral data; therefore, the structure of the second LSTM differs from the first LSTM. The physiological features are represented as feature vectors F. p .
[0088] After obtaining the eigenvector F g F v F s and F p Then, feature fusion is performed on all the aforementioned feature vectors. Before feature fusion, F is... g F v F s and F p Perform dimension alignment operations;
[0089] The dimension alignment operation involves linearly transforming all feature vectors to the same target dimension d. The linear transformation formula for each modality feature vector is as follows:
[0090] F' g =W g F g +b g
[0091] F' v =W v F v +b v
[0092] F's =W s F s +b s
[0093] F' p =W p F p +b p
[0094] Among them, W g W v W s and W p It is the weight matrix, b g b v b s and b p It is the bias term parameter, F' g 、F' v 、F' s and F' p They are F g F v F s and F p The eigenvectors after linear transformation.
[0095] The feature fusion uses a self-attention mechanism, and a dynamic modality weighting mechanism is added to the self-attention mechanism; the dynamic modality weighting mechanism is expressed as follows:
[0096] ω i =σ(W w F' i +b w ), i∈{g,v,s,p}
[0097] Where, ω i Indicates F' i The dynamic weights W corresponding to the modal w It is the weight matrix, b w It is the bias term parameter.
[0098] After generating dynamic weights, all modal linearly transformed eigenvectors F' i Weighting is performed to generate And concatenate them into a single feature vector F all The formula is as follows:
[0099]
[0100] It is F' i The weighted eigenvectors.
[0101] The self-attention mechanism is implemented as follows:
[0102] First, calculate the query Q, key K, and value vector V, using the following formula:
[0103] Q = F all W Q K = F all W K V = F all W V
[0104] Among them, W Q W K and W V It is a weight matrix;
[0105] Next, calculate the attention score A:
[0106]
[0107] Finally, calculate the fusion feature F:
[0108] F = AV
[0109] The fusion feature F includes all visual image features, behavioral features, sound features, and physiological features, which are used to analyze pig health and for the decision-making module to generate feed feeding decisions.
[0110] The pig health analysis involves inputting the fused feature F into a Softmax classification network to predict the health status of pigs, which includes normal status and specific disease types.
[0111] The health status is encoded according to the following rule: disease types are coded according to a preset severity level, with more severe disease types corresponding to smaller code values, the lowest being 0, and normal being the highest. This encoding method results in greater rewards for feed feeding decisions that improve the health status of pigs, and smaller rewards for feed feeding decisions that do not improve the health status of pigs.
[0112] In this embodiment, the decision-making module generates feed feeding decisions using the results of pig health analysis and fused features. The decision-making module is constructed based on a reinforcement learning algorithm, comprehensively considering information on pig health status, feed cost, and feed utilization rate. The construction steps are as follows:
[0113] Define the state space: The state space is represented as S, s t Let be the fusion feature at time t in the state space S. t This refers to the fusion feature F output by the data processing module.
[0114] Define the action space: The action space is denoted as A, a tLet A be the decision action at time t in the action space A. The decision action includes the selection of feed type, the amount of feed, and the timing of feeding.
[0115] Types of feed include: protein feed, green fodder, silage, energy feed, roughage, mineral feed, and health feed, etc. Health feed is used to treat corresponding diseases.
[0116] Reward function design: The reward function needs to balance the health state R. h Feed utilization rate R e and feed costs R c Three goals
[0117] The feed cost is the sum of the products of all feed types and their corresponding unit prices.
[0118] The feed utilization rate is defined as follows:
[0119]
[0120] The comprehensive representation of the reward function R is as follows, r t Let the reward at time t in the reward function R be:
[0121]
[0122] Where α is a fixed weight; β t and γ t It is a dynamic weight, C max It is the maximum budget cost;
[0123] β t The dynamic update formula is: β t =1-e -λt ,
[0124] γ t The dynamic update formula is:
[0125] The reinforcement learning algorithm outputs feed feeding decisions through a policy network. In this embodiment, the type of policy network is not limited; it can be the policy network in Deep Deterministic Policy Gradient (DDPG) or the policy network in Actor-Critic.
[0126] The decision-making process of the reinforcement learning algorithm is as follows: set the current state s t Input into the policy network to select a decision action a t Execute action a t It then interacts with the output to the execution module environment to obtain the next state s. t+1 And calculate the reward r t+1 Using r t+1 Update the network parameters of the policy.
[0127] When the reward function value r t+1 When the value is larger, the policy network will consider the current action 'a' to be larger. t This approach is beneficial to pig health, resulting in significant weight gain, reasonable feed costs and utilization rates, and generally healthy pigs. Therefore, the strategy network will gradually come to consider the current action a as... t For the current state s t The number of pigs raised is reasonable. When the reward function value r... t+1 The smaller the size, the opposite is true.
[0128] By using a reward function to guide the optimization of policy network parameters, the policy network can make more reasonable decisions.
[0129] In this embodiment, the execution module automatically and precisely feeds decisions based on the actions generated by the decision module, and interacts with the environment to provide feedback on the effectiveness of the actions. This environmental interaction involves the control perception module and the data processing module generating new fusion features, which represent the next state s in the decision module. t+1 .
[0130] By applying multimodal intelligent sensing technology and using reinforcement learning algorithms to optimize feed feeding decisions in real time, the system can significantly improve feed utilization and effectively reduce feeding costs in farms. The multimodal sensing module collects physiological, behavioral, and environmental data of pigs, providing comprehensive information support to the system. Combined with reinforcement learning algorithms, it dynamically adjusts feed type, amount, and timing, ensuring that feed delivery accurately meets the physiological needs of pigs and avoids feed waste caused by overfeeding or improper feeding. Furthermore, through the scientific design of the reward function, the system can balance feed costs and pig health. While ensuring pig health, it dynamically optimizes feed type and amount, thereby significantly reducing overall feed costs and ultimately maximizing the economic benefits of the farm.
[0131] The system's multimodal data fusion function significantly improves the health of pigs. By collecting body size and appearance data through visual sensors, vocal frequency and pitch data through sound sensors, movement behavior data through behavioral detection devices, and physiological data such as body temperature and blood glucose through biosensors, the system can comprehensively analyze the health status of pigs and identify potential health problems. The fused multimodal features are input into the health analysis module, accurately determining whether pigs are in a healthy state. Based on the health analysis results, the system can intelligently recommend supplementary feed or medicated feed to precisely meet the nutritional needs of pigs, intervene in health problems in a timely manner, and reduce the incidence of disease. This intelligent health management approach not only improves the growth of individual pigs but also enhances the overall health of the farm, thereby achieving higher farming efficiency.
[0132] Furthermore, the system automates the entire process from data perception to intelligent decision-making and precise feeding, significantly reducing the need for manual intervention and substantially lowering labor costs. Feeding tasks that previously relied on manual labor, such as monitoring pig health and adjusting feeding strategies, are now fully automated. Simultaneously, the application of reinforcement learning algorithms in the feeding equipment dynamically optimizes feeding strategies, ensuring both accuracy and flexibility in feed distribution.
[0133] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A feed intelligent recommendation and precision feeding system based on multimodal intelligent sensing of pigs, comprising a sensing module, a data processing module, a decision-making module, and an execution module, characterized in that, The sensing module is responsible for collecting visual image data, sound data, physiological data, and behavioral data of pigs; The data processing module is responsible for sequentially cleaning, standardizing, and fusing the data collected by the sensing module; different cleaning strategies are used for different modalities of data; different standardization strategies are used for different modalities of data; the data fusion operation generates fusion features; the fusion features are used to perform pig health analysis and output health status codes; The decision-making module utilizes fused features and health status codes, combined with a policy network in a reinforcement learning algorithm, to generate feed feeding decisions; the policy network parameters are updated based on the reward function; the factors influencing the reward function include health status codes, feed utilization rate, and feed cost; The execution module automatically controls the precision feeding equipment based on the feed feeding decision to perform feed distribution and feedback monitoring; The decision-making module is constructed based on a reinforcement learning algorithm, and the construction steps are as follows: Define the state space: The state space is denoted as S. For the fusion feature at time t in the state space S, the That is, the fusion feature F output by the data processing module; Define the action space: The action space is represented as , Let A be the decision action at time t in action space A, and the decision action includes the choice of feed type, the amount of feed, and the timing of feeding. Reward function design: The reward function needs to balance the health state encoding. Feed utilization rate and feed costs Three goals The feed cost is the sum of the products of all feed types and their corresponding unit prices. The feed utilization rate is the ratio of pig weight gain to feed consumption, defined as follows: The comprehensive representation of the reward function is as follows: Let the reward at time t in the reward function R be: in, For fixed weights; and It is a dynamic weight. It is the maximum feed budget cost; The dynamic update formula is: , For index weights; The dynamic update formula is: ; The policy network takes fused features F as input and outputs corresponding decision actions. The decision-making process of the reinforcement learning algorithm is as follows: [The algorithm then proceeds to] setting the current state... Input into the policy network to select a decision action Execution of decision-making actions The output is then sent to the execution module for environmental interaction to obtain the next state. And calculate the reward ,use Update the network parameters of the policy.
2. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 1, characterized in that, The sensing module's data acquisition devices include a visual sensor, a sound sensor, a behavior detection device, and a biosensor. The visual sensor is used to acquire visual image data of the pig's appearance and body shape in real time. The sound sensor is used to acquire sound data of the pig, including the frequency and pitch of its vocalizations, in real time. The behavior detection device is used to acquire behavioral data of the pig, including its movement speed and acceleration, in real time. The biosensor is used to acquire physiological data of the pig, including its body temperature, blood sugar level, and changes in its internal hormones, in real time.
3. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 1, wherein the cleaning strategy is as follows: For visual image data, Gaussian filtering algorithm is used to remove noise from the visual image, and Sober operator is used to detect whether the visual image data is blurred. If the detection result is lower than the set first threshold, blind deblurring algorithm is used to repair the visual image data. For the audio data, a bandpass filter was designed to remove low-frequency and high-frequency noise while preserving the frequency band of the pig's squeal. For behavioral data, a low-pass filter is used to remove noise data caused by device vibration and signal interference. For physiological data, a threshold detection based on common sense in physiology is used, that is, physiological data values outside the set range of physiological data are excluded.
4. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 1, characterized in that, The data standardization employs different standardization strategies for different modal data, as detailed below: For visual image data This ensures that all pixel values fall within the range [0, 1]; expressed in the form of... ,in This represents standardized visual image data; For sound data Behavioral data and physiological data Using Z-score standardization, the forms are as follows: , and ,in , and Representing sound data Behavioral data and physiological data The mean, , and Representing sound data Behavioral data and physiological data variance , and These represent standardized sound data, behavioral data, and physiological data, respectively.
5. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 1, wherein the data fusion is to integrate visual image data. Sound data Behavioral data Physiological data The data features included, and the specific steps are as follows: For visual image data, a convolutional neural network is used to extract visual features, including body size and pig morphology; these visual features are represented as follows: ; For sound data, spectral analysis is used to extract sound features. From these sound features, it can be analyzed whether the newborn pigs are in a state of hunger or anxiety. These sound features are represented as feature vectors. ; For behavioral data, a first LSTM neural network is used to extract behavioral features, which are represented as feature vectors. ; For physiological data, a second LSTM neural network is used to extract physiological features. The second LSTM has a different structure than the first LSTM, and the physiological features are represented as feature vectors. ; After obtaining the feature vector , , and Then, feature fusion is performed on all the aforementioned feature vectors. Before feature fusion, the following steps are taken: , , and Perform dimension alignment operations.
6. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 5, wherein the dimension alignment operation linearly transforms all the feature vectors to the same dimension d, and the linear transformation formula for each modal feature vector is as follows: in, , , and It is a weight matrix. , , and It is a bias term parameter. , , and They are , , and The eigenvectors after linear transformation.
7. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 6, wherein the feature fusion uses a self-attention mechanism, and a dynamic modality weighting mechanism is added to the self-attention mechanism; the dynamic modality weighting mechanism is expressed as follows: in, express Dynamic weights corresponding to the modalities, It is a weight matrix. These are bias term parameters; After generating dynamic weights, all modal linearly transformed feature vectors are... Weighting is performed to generate And concatenate them into a single feature vector. The formula is as follows: yes The weighted eigenvectors.
8. The intelligent feed recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 7, wherein the self-attention mechanism is implemented as follows: First, calculate the query Q, key K, and value vector V, using the following formula: in, , and It is a weight matrix; Next, calculate the attention score A: Finally, calculate the fusion feature F: The fusion feature F includes all visual image features, behavioral features, sound features, and physiological features, which are used to analyze pig health and input into the decision module; The pig health analysis involves inputting the fused feature F into a Softmax classification network to predict the health status of pigs, which includes normal status and specific disease types. The health status is encoded according to the following rules: disease types are encoded according to a preset severity level, with smaller encoding values for more severe disease types, and the lowest encoding value being 0, while the highest encoding value is for normal.
9. A feed intelligent recommendation and precision feeding system based on multimodal intelligent perception of pigs according to claim 1, wherein the execution module automatically performs precision feeding according to the decision action generated by the decision module, and interacts with the environment to provide feedback on the execution effect of the decision action, wherein the environmental interaction is to control the perception module and the data processing module to generate new fusion features, and the new fusion features are the next step state in the decision module. .