Beef cattle breeding decision-making method and device based on environmental factor analysis and medium
By analyzing environmental factors and using the LSTM-Transformer model to predict beef cattle growth, combined with the heat stress index and multi-objective optimization algorithm, the problem of insufficient quantification of the interaction effects of environmental factors in traditional beef cattle breeding decisions is solved, and accurate growth prediction and scientific breeding strategies are achieved.
Patent Information
- Application Number
- CN202510701877.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
AI Technical Summary
Traditional beef cattle breeding decision-making methods fail to effectively quantify the interactive effects of environmental factors, resulting in deviations between growth predictions and actual needs. Existing models make it difficult to accurately assess the comprehensive impact of environmental combinations on beef cattle growth.
By collecting environmental data for sliding window time series analysis, the time series characteristics of environmental factors are extracted and weights are assigned, an interaction matrix is constructed, and the growth of beef cattle is predicted by combining the LSTM-Transformer model. The breeding strategy is constructed by combining the heat stress index and multi-objective optimization algorithm.
It achieves dynamic quantification of environmental factors, improves growth prediction accuracy, provides comprehensive breeding strategy support, and improves beef cattle growth performance and breeding efficiency.
Smart Images

Figure CN120634301A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart farming technology, and specifically to a beef cattle farming decision-making method, equipment and medium based on environmental factor analysis. Background Art
[0002] In large-scale beef cattle farming, environmental factors such as temperature and humidity, air quality, and light cycle have a crucial impact on the growth efficiency, health status, and breeding costs of beef cattle. Accurately capturing the relationship between environmental dynamics and the growth process is the core of making scientific breeding decisions.
[0003] Traditional breeding decision-making methods mostly treat environmental factors as fixed parameters or mean values, ignoring the real-time impact of their dynamic fluctuations on beef cattle growth, resulting in deviations between growth forecasts and actual needs. At the same time, due to the nonlinear interactive relationship between environmental factors and beef cattle growth, existing decision-making models lack quantitative analysis of the interactive effects of environmental factors, making it difficult to accurately evaluate the comprehensive impact of environmental combinations on beef cattle growth. Summary of the Invention
[0004] In order to solve the above problems, this application proposes a beef cattle breeding decision-making method based on environmental factor analysis, including:
[0005] Collecting environmental data that affects beef cattle breeding conditions, performing sliding window time series analysis on the environmental data to extract environmental factor time series characteristics, and assigning corresponding environmental factor weights to the environmental factor time series characteristics;
[0006] For each environmental factor corresponding to each environmental data, determining the interaction term corresponding to the environmental factor, and the effect value of the interaction term and the environmental factor on the growth of beef cattle, and constructing an interaction matrix based on the effect value;
[0007] Collecting growth data of the beef cattle, inputting the environmental data and the growth data into an LSTM-Transformer model, and outputting a predicted weight of the beef cattle within a future preset time period based on the environmental factor weights and the interaction matrix;
[0008] Calculating the heat stress index of the beef cattle according to the growth data, and calculating the weight gain benefit of the beef cattle according to the predicted weight;
[0009] According to the heat stress index, the weight gain benefit and the carbon emissions, an objective function for deciding the beef cattle breeding strategy is constructed, and based on the NSGA-II algorithm, the beef cattle breeding strategy is output according to the objective function.
[0010] In one implementation of the present application, determining the interaction term corresponding to the environmental factor, and the effect value of the interaction term and the environmental factor on the growth of beef cattle specifically includes:
[0011] determining interaction terms corresponding to the environmental factors;
[0012] Inputting the environmental factors and the interaction terms into a preset random forest model, and outputting the feature importances corresponding to the environmental factors and the interaction terms respectively;
[0013] Determining an interaction coefficient of the interaction term for the environmental factor according to a ratio between the feature importance corresponding to the interaction term and the feature importance corresponding to the environmental factor;
[0014] The characteristic importance corresponding to the environmental factor is used as the effect value of the environmental factor on the growth of beef cattle, and the interaction coefficient is used as the effect value of the interaction term on the growth of beef cattle.
[0015] In one implementation of the present application, an interaction matrix is constructed based on the impact effect value, specifically including:
[0016] Determine an environmental factor pair consisting of any two environmental factors, use the environmental factors contained in the environmental factor pair as rows and columns of a matrix, and construct an interaction matrix;
[0017] For the diagonal elements in the interaction matrix, the impact effect value corresponding to the environmental factor is used as the element value corresponding to the diagonal element;
[0018] For the non-diagonal elements in the interaction matrix, the influence effect value corresponding to the interaction term is used as the element value of the non-diagonal element.
[0019] In one implementation of the present application, the environmental data and the growth data are input into an LSTM-Transformer model, and the predicted weight of the beef cattle in a future preset time period is output based on the environmental factor weights and the interaction matrix, specifically including:
[0020] Inputting the environmental data and the growth data into the LSTM network in the LSTM-Transformer model, and outputting the growth time series features corresponding to the growth data;
[0021] Assigning corresponding feature weights to the environmental data according to the feature association constraints generated by the environmental factor weights and the interaction matrix;
[0022] The growth time series features and the environmental data are fused through the Transformer encoder in the LSTM-Transformer model to obtain fused features. The attention weights corresponding to each fused feature are calculated through the self-attention mechanism, and a feature matrix composed of multiple attention weights is output;
[0023] The feature matrix is input into the fully connected layer, and the predicted weight of the beef cattle in the future period is output.
[0024] In one implementation of the present application, calculating the heat stress index of the beef cattle according to the growth data specifically includes:
[0025] The growth data include body temperature, activity level, and feed intake;
[0026] Preprocessing the growth data, and calculating an indicator value corresponding to a preset growth indicator based on the preprocessed growth data; wherein the preset growth indicator includes at least a continuous body temperature average, an activity level decrease rate, and a feed intake decrease rate;
[0027] Standardizing the index value by using the standardization function corresponding to the preset growth index to obtain a standard index value;
[0028] According to the weight coefficient corresponding to each preset growth indicator, the standard indicator values corresponding to the preset growth indicators are weighted and summed to obtain the heat stress index of the beef cattle.
[0029] In one implementation of the present application, an objective function for deciding a beef cattle breeding strategy is constructed based on the heat stress index, the weight gain benefit, and the carbon emissions, specifically including:
[0030] constructing an economic benefit objective function according to the ratio between the weight gain benefit and the feed cost;
[0031] constructing an animal welfare objective function according to the heat stress index;
[0032] A carbon emission objective function is constructed based on the carbon emissions.
[0033] In one implementation of the present application, an objective function for deciding a beef cattle breeding strategy is constructed based on the heat stress index, the weight gain benefit, and the carbon emissions, specifically including:
[0034] constructing an economic benefit objective function according to the ratio between the weight gain benefit and the feed cost;
[0035] constructing an animal welfare objective function according to the heat stress index;
[0036] A carbon emission objective function is constructed based on the carbon emissions.
[0037] In one implementation of the present application, after calculating the heat stress index of the beef cattle according to the growth data, the method further includes:
[0038] Determining a state interval corresponding to the beef cattle according to the numerical range of the heat stress index; wherein the state interval is divided into a safe zone, a warning zone, and a danger zone according to the stress level of the beef cattle;
[0039] Based on a single indicator warning rule, when any indicator value exceeds its corresponding standard indicator value, a status warning for the beef cattle is triggered;
[0040] Based on the comprehensive indicator warning rule, when the heat stress index is located in the danger zone for a continuous period of time, a status warning for the beef cattle is triggered.
[0041] The present application provides a beef cattle breeding decision-making device based on environmental factor analysis, the device comprising:
[0042] at least one processor;
[0043] and, a memory communicatively coupled to the at least one processor;
[0044] Wherein, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a beef cattle breeding decision-making method based on environmental factor analysis as described in any of the above items.
[0045] An embodiment of the present application provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to:
[0046] A beef cattle breeding decision-making method based on environmental factor analysis as described in any of the above items.
[0047] The beef cattle breeding decision-making method based on environmental factor analysis proposed in this application can bring the following beneficial effects:
[0048] Through sliding window time series analysis and dynamic weight assignment, the impact of environmental factors is dynamically quantified, accurately identifying the real-time impact of environmental factors over time. Furthermore, an environmental factor interaction matrix is constructed to quantify the nonlinear superposition effects of multi-factor coupling. Integrating the dynamic weights and interaction matrix into the LSTM-Transformer model allows growth predictions to better reflect the actual environmental conditions during the farming process, improving prediction accuracy. Combining the heat stress index with a multi-objective optimization algorithm provides a more comprehensive farming strategy, providing decision support for scientific beef cattle farming. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0050] Figure 1 A schematic diagram of a process for beef cattle breeding decision-making based on environmental factor analysis provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of the structure of a beef cattle breeding decision-making device based on environmental factor analysis provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0053] The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0054] like Figure 1 As shown, the embodiment of the present application provides a beef cattle breeding decision-making method based on environmental factor analysis, including:
[0055] S101: Collect environmental data that affects beef cattle breeding conditions, perform sliding window time series analysis on the environmental data to extract the time series characteristics of environmental factors, and assign corresponding environmental factor weights to the time series characteristics of environmental factors.
[0056] Environmental sensing terminals deployed at farms, transport vehicles, and processing lines collect environmental data affecting beef cattle production at a fixed frequency. These data include temperature, humidity, light intensity, and ammonia concentration. Each piece of environmental data corresponds to an environmental factor, which refers to various environmental factors that influence the growth, development, and reproduction of beef cattle. Sliding window time series analysis is performed on the environmental data to extract temporal characteristics that represent their temporal variations. Different environmental factors often have varying degrees of impact on beef cattle production. By assigning corresponding environmental weights to their temporal characteristics, the relative importance of each environmental factor to beef cattle production can be quantified. The stronger the correlation between an environmental factor and key indicators such as feed intake, weight gain, and reproductive performance, the higher its weight.
[0057] S102: For the environmental factors corresponding to each environmental data, determine the interaction terms corresponding to the environmental factors, and the effect values of the interaction terms and the environmental factors on the growth of beef cattle, and construct an interaction matrix based on the effect values.
[0058] In the beef cattle breeding environment, each environmental factor does not exist in isolation, and they interact with each other to produce an interactive effect on the growth of beef cattle. For example, there is an interaction term between temperature and humidity. The effect of a high temperature and high humidity environment on the growth of beef cattle is very different from that of a high temperature or high humidity alone. Similarly, air quality (such as ammonia concentration) and temperature also interact. High temperature may aggravate the irritation of ammonia to the respiratory tract of beef cattle. These interaction terms reflect the complex environmental conditions under the joint action of multiple environmental factors, which have a comprehensive impact on the growth of beef cattle. Therefore, after collecting the environmental data, it is also necessary to perform standardized calculations on the environmental data according to a sliding window of a preset time length to eliminate dimensional differences. In general, the mean and standard deviation of the calculated environmental data are selected to standardize the data. The sliding window can be adaptively set according to the growth requirements of beef cattle. It can be set to 7 days, 10 days, etc., and this application does not impose any restrictions on this. After completing the standardization of the data, the correlation of the environmental factors is analyzed according to the knowledge base to determine the interaction terms corresponding to the environmental factors. Both the individual effects and interactions of environmental factors will have an impact on the growth of beef cattle. By quantifying their impact effects, we can identify which environmental factors in the beef cattle breeding environment need to be focused on and optimized. Therefore, it is necessary to determine the effect values of interaction terms and environmental factors on beef cattle growth, and then construct an interaction matrix based on the impact effect values.
[0059] In one embodiment, before determining the impact effects corresponding to each environmental factor and the interaction term, it is necessary to fill in the missing time series features of the environmental factors, and use the linear interpolation method to fill in the missing features, so as to provide complete data support for the subsequent quantification of the interaction between environmental factors. After clarifying the interaction terms corresponding to the environmental factors, the environmental factors and their interaction terms are used as input features, and the growth indicators of beef cattle (such as feed intake, etc.) are used as target variables to train the preset random forest model. The random forest model calculates and outputs the feature importance of each feature based on factors such as the number of splits of each input feature in the decision tree and its contribution to the results. The feature importance reflects the importance of the feature in predicting beef cattle growth indicators. The higher the value, the greater the impact of the feature on beef cattle growth.
[0060] Interaction terms can suppress or enhance the effects of environmental factors. Calculating the interaction coefficient can measure the degree to which the interaction term suppresses or enhances the environmental factor's influence. Therefore, after calculating the feature importances for the environmental factor and the interaction term, the interaction coefficient for the environmental factor is determined based on the ratio of the feature importance of the interaction term to the feature importance of the environmental factor. Interaction coefficients can be positive or negative. A positive interaction coefficient indicates that the interaction term has a synergistic effect on the effects of a single environmental factor; conversely, a negative interaction coefficient indicates a synergistic inhibition. For example, high temperature and high humidity will further exacerbate the decline in feed intake in beef cattle compared to either high temperature or high humidity alone.
[0061] The characteristic importance of an environmental factor is directly used as the effect value of the environmental factor on beef cattle growth, reflecting the extent of the impact of the environmental factor alone on beef cattle growth. The inhibition coefficient is used as the effect value of the interaction term on beef cattle growth, reflecting the combined effect of the interaction term on beef cattle growth under the combined action of environmental factors, that is, the inhibitory or enhancing effect of the individual environmental factors. This method can comprehensively assess the combined impact of environmental factors and their interactions on beef cattle growth, providing a more accurate basis for optimizing beef cattle breeding environments. It helps farmers understand which environmental factors and interactions are key to beef cattle growth, allowing them to adjust and control the breeding environment in a targeted manner to improve beef cattle growth performance and breeding efficiency.
[0062] After determining the impact effect values corresponding to the single environmental factors and the interaction terms, in order to more intuitively quantify the impact of the interaction between any two environmental factors on the growth of beef cattle, it is necessary to determine the environmental factor pairs composed of any two environmental factors, and then use the environmental factors contained in the environmental factor pairs as the rows and columns of the matrix to construct the interaction matrix. The environmental factor pairs can be composed of different environmental factors or the same environmental factors. For example, temperature-humidity and temperature-temperature are both environmental factor pairs. After constructing the interaction matrix, it is necessary to fill the matrix element values according to the impact effect values calculated previously. For the diagonal elements in the interaction matrix, the corresponding environmental factor pairs are single environmental factors. Therefore, the impact effect values corresponding to the environmental factors are used as the element values of the diagonal elements. For the non-diagonal elements, the matrix rows and columns correspond to different environmental factors, and the impact effect values corresponding to the interaction terms need to be used as their corresponding element values. In one example, the interaction matrix is shown in Table 1:
[0063] Table 1
[0064] temperature humidity wind speed temperature 1.00 -0.35 0.12 humidity -0.35 1.00 0.08 wind speed 0.12 0.08 1.00
[0065] As shown in Table 1, the element value corresponding to the diagonal element is the impact effect value corresponding to a single environmental factor, which is 1. The element values of other non-diagonal elements are the impact effect values corresponding to the interaction terms. The positive or negative impact effect value indicates whether the interaction between environmental factors has an inhibitory effect or a promoting effect on a single environmental factor.
[0066] S103: Collect growth data of beef cattle, input the environmental data and growth data into the LSTM-Transformer model, and output the predicted weight of the beef cattle in the future preset time period based on the environmental factor weights and the interaction matrix.
[0067] Beef cattle growth data is collected using beef cattle monitoring equipment, such as integrated temperature sensors, triaxial accelerometers, RFID chips, dynamic weighing platforms, and cameras. Growth data includes body temperature, activity level, and feed intake. Body temperature can be collected using smart ear tags or implantable sensors, activity level can be calculated using collar-mounted accelerometers, and feed intake can be derived from feed consumption recorded in feeding records. After determining the environmental factor weights corresponding to the environmental data and the interaction matrix corresponding to each environmental factor, the growth and environmental data are preprocessed and input into an LSTM-Transformer model. Based on the environmental factor weights and interaction matrix, the model learns the constraints between the environmental and growth data, as well as the temporal changes in growth data. This model then predicts the growth of the beef cattle and outputs the predicted weight for a preset future time period.
[0068] In one embodiment, the environmental data and growth data are input into the LSTM network of the LSTM-Transformer model. The LSTM network is used to process time series data and can capture the time dependency in the data. Through the LSTM network, the growth time series features of the growth data are extracted, that is, the changing patterns and trends of the growth data over time are analyzed, and the growth information in the time dimension is provided for subsequent fusion and prediction. According to the feature association constraints generated by the environmental factor weights and the interaction matrix, the environmental data are given corresponding feature weights. The environmental dynamic weights can be adjusted in real time according to the changes in the environmental data. The interaction matrix is used to describe the interactions between different environmental factors. Under the joint action of the environmental dynamic weights and the interaction matrix, the environmental feature matrix can be obtained. Through the Transformer encoder in the LSTM-Transformer model, the growth time series features output by the LSTM network and the enhanced environmental feature matrix (i.e., environmental data) are fused to obtain fused features. In the Transformer encoder, the self-attention mechanism captures dependencies between features. It then maps the fused features to a query (Q), key (K), and value (V) matrix through a linear transformation. The attention weights corresponding to the fused features are then calculated. This process requires parallel computation across multiple heads, ultimately concatenating the attention weights from these heads to form a feature matrix. The fully connected layers of the Transformer encoder can output the predicted weight of beef cattle for the future. The predicted weight is the aggregate weight corresponding to each day within a continuous period.
[0069] S104: Calculate the heat stress index of the beef cattle based on the growth data, and calculate the weight gain benefit of the beef cattle based on the predicted weight.
[0070] Predicted weights can support decisions by breeders, such as adjusting feed formulations and optimizing the breeding environment, to improve cattle growth performance and profitability. Based on the predicted weights, the expected weight gain of cattle over a future period can be calculated. This weight gain can be calculated by multiplying the difference between the final and initial weights of the cattle over the future period by the market price. Furthermore, when setting breeding strategies for cattle, the heat stress status of the cattle also needs to be considered. By calculating the heat stress index for cattle, the current state of heat stress can be monitored, allowing appropriate breeding strategies to mitigate the effects of heat stress on growth performance.
[0071] In one embodiment, when calculating the heat stress index, the collected growth data is first preprocessed to eliminate abnormal values of body temperature that exceeds the physiological range, eliminate extreme activity caused by equipment failure, and eliminate feed intake fluctuation data caused by feed waste or measurement errors. Then, the preprocessed growth data is normalized to convert body temperature into a temperature difference from a baseline value, convert activity into a percentage change from a historical average value, and convert feed intake into a percentage change from a historical average value. For the preprocessed growth data, the index values corresponding to the preset growth indicators are calculated. The preset growth indicators here include at least the continuous body temperature average, the activity decrease rate, and the feed intake decrease rate. The continuous body temperature average refers to the average body temperature of beef cattle over several consecutive hours. The activity decrease rate can be calculated based on the difference between the average activity in the current period and the historical period, and the ratio between the difference and the average activity in the historical period. The lengths of the current period and the historical period can be set according to actual needs. The feed intake decline rate is calculated in the same way as the activity decline rate, which is also based on the ratio of the activity difference between the average feed intake in the current period and the average feed intake in the historical period to the average feed intake in the historical period.
[0072] The indicator value dimensions and numerical ranges corresponding to different preset growth indicators may vary greatly. Therefore, it is also necessary to standardize the indicator values using the standardization function corresponding to the preset growth indicators to obtain standard indicator values.
[0073] Normalized function corresponding to body temperature: In general, T min Take 38.5℃, T max Take 39.5℃.
[0074] Normalized function corresponding to activity level: Generally speaking, A min Take 10%, A max Take 30%, A0 is 20%.
[0075] The standardized function corresponding to feed intake is: In general, F min Take 5%, F max Take 15% and F0 is 10%.
[0076] The above normalization function normalizes the index values to a standard index value in the range (0, 1). Based on the weight coefficients corresponding to each preset growth indicator, the standard index values are weighted and summed to ultimately obtain the heat stress index for beef cattle. The weight coefficients can be optimized based on historical data and logistic regression.
[0077] In one embodiment, the above process enables real-time monitoring of beef cattle growth. If a potential growth anomaly is detected, a status alert can be issued based on pre-set warning rules. This allows farmers to promptly understand the cattle's growth status and take appropriate countermeasures to ensure their growth performance. Based on this, after calculating the heat stress index of the beef cattle, the corresponding state range of the beef cattle is determined based on the numerical range of the index. The state range is divided into a safe zone, a warning zone, and a danger zone, according to the cattle's stress level, from low to high.
[0078] The present embodiment provides two types of early warning rules: a single-indicator-based early warning rule and a comprehensive-indicator-based early warning rule. Based on the single-indicator early warning rule, if any preset growth indicator value exceeds its corresponding standard indicator value range, a status early warning for the beef cattle will be triggered. Based on the comprehensive-indicator early warning rule, if the heat stress index remains in the danger zone for a continuous period of time, a status early warning for the beef cattle will also be triggered.
[0079] S105: Based on the heat stress index, weight gain, and carbon emissions, an objective function is constructed for determining the beef cattle breeding strategy. Based on the objective function, the beef cattle breeding strategy is outputted using the NSGA-II algorithm. The preset growth indicators include at least the continuous mean body temperature, the activity level reduction rate, and the feed intake reduction rate.
[0080] The heat stress index provides data support for animal welfare goals, and predicted weight can be used to calculate weight gain benefits, thereby providing data for economic benefit goals. The digital twin is used to simulate the impact of different feed ratios on methane emissions. Taking into account the heat stress index, weight gain benefits, and carbon emissions, an objective function is constructed to determine the beef cattle breeding strategy. A multi-objective optimization decision engine, based on the NSGA-II algorithm, outputs the beef cattle breeding strategy based on the objective function. It should be noted that when constructing the objective function, the economic benefit objective function is constructed based on the ratio between weight gain benefits and feed costs; the animal welfare objective function is constructed based on the heat stress index; and the carbon emissions objective function is constructed based on carbon emissions.
[0081] In one embodiment, the multi-objective optimization engine uses the NSGA-II algorithm to output a Pareto optimal solution set, which is the beef cattle breeding strategy that is ultimately applied to breeding decisions.
[0082] First, random beef cattle breeding strategies are generated as the initial population. Each individual in the population represents a possible beef cattle breeding strategy. The beef cattle breeding strategy includes at least one or more of the following decision variables: feed formula, feeding plan, and transportation arrangement.
[0083] Then, after generating the initial population, the population needs to be iterated until the optimal solution is found.
[0084] Specifically, for each individual in the initial population, the objective function value corresponding to the individual is calculated according to the objective function, so as to determine the performance of each individual on each objective.
[0085] Furthermore, the dominance relationship between individuals is determined. For example, the conditions for individual A to dominate B are: A's economic benefits are not less than B's economic benefits, A's carbon emissions are not greater than B's carbon emissions, A's stress index is not greater than B's stress index, and A is strictly superior to B in at least one goal. According to the non-dominance relationship between individuals, the non-dominated individuals in the initial population are divided into different levels. First, all solutions that are not dominated by other individuals are screened, and then non-dominated solutions are screened again from the remaining individuals. The stratification process is repeated until all individuals are divided into different levels.
[0086] Furthermore, for individuals at the same level, the crowding degree between individuals is calculated based on the difference between the objective function values. The crowding degree measures the distribution density of individuals in the target space to avoid excessive population aggregation in local areas.
[0087] Furthermore, methods such as tournament selection are used to select target individuals from the initial population based on crowding. For example, two individuals are randomly selected: individual A (first layer, crowding = 15) and individual B (second layer, crowding = 50). Then, individual A with a higher level is selected. If both are on the same layer, the individual with a higher crowding is selected as the target individual. The initial population is then subjected to population evolution using the target individuals to obtain the target population. When evolving the population, crossover and mutation operations are performed on the parent individuals to generate new offspring individuals. Crossover is equivalent to combining the parameters of different breeding strategies, while mutation is to randomly change some parameter values within a certain range, introduce new decision variables, and thus generate new breeding strategies.
[0088] Repeat these iterative steps until the target population converges. The final optimal solution set is the cattle breeding strategy for cattle farming. Implementing this strategy optimizes feed formulation, environmental requirements, and herding density, helping farmers achieve efficient and sustainable cattle farming while meeting multiple needs and improving cattle growth performance.
[0089] The above are embodiments of the method proposed in this application. Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0090] Figure 2 This is a schematic diagram of the structure of a beef cattle breeding decision-making device based on environmental factor analysis provided in an embodiment of the present application. Figure 2 Shown, including:
[0091] at least one processor; and,
[0092] at least one processor communicatively connected to a memory; wherein,
[0093] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute a beef cattle breeding decision-making method based on environmental factor analysis as described in any one of the above items.
[0094] An embodiment of the present application provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0095] A beef cattle breeding decision-making method based on environmental factor analysis as described in any of the above items.
[0096] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.
[0097] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0098] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0099] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0100] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0101] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0102] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0103] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0104] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0105] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0106] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A beef cattle breeding decision-making method based on environmental factor analysis, characterized in that: The method comprises: Collecting environmental data that affects beef cattle breeding conditions, performing sliding window time series analysis on the environmental data to extract environmental factor time series characteristics, and assigning corresponding environmental factor weights to the environmental factor time series characteristics; For each environmental factor corresponding to each environmental data, determining the interaction term corresponding to the environmental factor, and the effect value of the interaction term and the environmental factor on the growth of beef cattle, and constructing an interaction matrix based on the effect value; Collecting growth data of the beef cattle, inputting the environmental data and the growth data into an LSTM-Transformer model, and outputting a predicted weight of the beef cattle within a future preset time period based on the environmental factor weights and the interaction matrix; Calculating the heat stress index of the beef cattle according to the growth data, and calculating the weight gain benefit of the beef cattle according to the predicted weight; According to the heat stress index, the weight gain benefit and the carbon emissions, an objective function for deciding the beef cattle breeding strategy is constructed, and based on the NSGA-II algorithm, the beef cattle breeding strategy is output according to the objective function.
2. A beef cattle breeding decision-making method based on environmental factor analysis according to claim 1, characterized in that: Determining the interaction term corresponding to the environmental factor, and the effect value of the interaction term and the environmental factor on the growth of beef cattle, specifically includes: determining interaction terms corresponding to the environmental factors; Inputting the environmental factors and the interaction terms into a preset random forest model, and outputting the feature importances corresponding to the environmental factors and the interaction terms respectively; Determining an interaction coefficient of the interaction term for the environmental factor according to a ratio between the feature importance corresponding to the interaction term and the feature importance corresponding to the environmental factor; The characteristic importance corresponding to the environmental factor is used as the effect value of the environmental factor on the growth of beef cattle, and the interaction coefficient is used as the effect value of the interaction term on the growth of beef cattle.
3. A beef cattle breeding decision-making method based on environmental factor analysis according to claim 2, characterized in that: According to the impact effect value, an interaction matrix is constructed, specifically including: Determine an environmental factor pair consisting of any two environmental factors, use the environmental factors contained in the environmental factor pair as rows and columns of a matrix, and construct an interaction matrix; For the diagonal elements in the interaction matrix, the impact effect value corresponding to the environmental factor is used as the element value corresponding to the diagonal element; For the non-diagonal elements in the interaction matrix, the influence effect value corresponding to the interaction term is used as the element value of the non-diagonal element.
4. The beef cattle breeding decision-making method based on environmental factor analysis according to claim 1, characterized in that: The environmental data and the growth data are input into the LSTM-Transformer model, and the predicted weight of the beef cattle in a future preset time period is output based on the environmental factor weights and the interaction matrix, specifically including: Inputting the environmental data and the growth data into the LSTM network in the LSTM-Transformer model, and outputting the growth time series features corresponding to the growth data; Assigning corresponding feature weights to the environmental data according to the feature association constraints generated by the environmental factor weights and the interaction matrix; The growth time series features and the environmental data are fused through the Transformer encoder in the LSTM-Transformer model to obtain fused features. The attention weights corresponding to each fused feature are calculated through the self-attention mechanism, and a feature matrix composed of multiple attention weights is output; The feature matrix is input into the fully connected layer, and the predicted weight of the beef cattle in the future period is output.
5. The beef cattle breeding decision-making method based on environmental factor analysis according to claim 1, characterized in that: Calculating the heat stress index of the beef cattle according to the growth data specifically includes: The growth data include body temperature, activity level, and feed intake; Preprocessing the growth data, and calculating an indicator value corresponding to a preset growth indicator based on the preprocessed growth data; wherein the preset growth indicator includes at least a continuous body temperature average, an activity level decrease rate, and a feed intake decrease rate; Standardizing the index value by using the standardization function corresponding to the preset growth index to obtain a standard index value; According to the weight coefficient corresponding to each preset growth indicator, the standard indicator values corresponding to the preset growth indicators are weighted and summed to obtain the heat stress index of the beef cattle.
6. The beef cattle breeding decision-making method based on environmental factor analysis according to claim 1, characterized in that: Based on the heat stress index, the weight gain benefit, and the carbon emissions, an objective function for deciding a beef cattle breeding strategy is constructed, specifically including: constructing an economic benefit objective function according to the ratio between the weight gain benefit and the feed cost; constructing an animal welfare objective function according to the heat stress index; A carbon emission objective function is constructed based on the carbon emissions.
7. The beef cattle breeding decision-making method based on environmental factor analysis according to claim 1, characterized in that: Based on the NSGA-II algorithm and the objective function, a beef cattle breeding strategy is output, which specifically includes: Generating a random beef cattle breeding strategy as an initial population; wherein the beef cattle breeding strategy includes at least one or more of the following decision variables: feed formula, feeding plan, and transportation arrangement; An iterative operation is performed on the initial population, wherein the steps of the iterative operation are: For each individual in the initial population, calculating the objective function value corresponding to the individual according to the objective function; According to the non-dominance relationship between the individuals, the non-dominated individuals in the initial population are divided into different levels; For individuals at the same level, the crowding degree between the individuals is calculated according to the difference between the objective function values; selecting a target individual from the initial population according to the crowding degree, and performing population evolution on the initial population using the target individual to obtain a target population; The iterative operation is repeated until the target population converges, and a beef cattle breeding strategy is output.
8. The beef cattle breeding decision-making method based on environmental factor analysis according to claim 5, characterized in that: After calculating the heat stress index of the beef cattle according to the growth data, the method further includes: Determining a state interval corresponding to the beef cattle according to the numerical range of the heat stress index; wherein the state interval is divided into a safe zone, a warning zone, and a danger zone according to the stress level of the beef cattle; Based on a single indicator warning rule, when any indicator value exceeds its corresponding standard indicator value, a status warning for the beef cattle is triggered; Based on the comprehensive indicator warning rule, when the heat stress index is located in the danger zone for a continuous period of time, a status warning for the beef cattle is triggered.
9. A beef cattle breeding decision-making device based on environmental factor analysis, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a beef cattle breeding decision-making method based on environmental factor analysis as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: A beef cattle breeding decision-making method based on environmental factor analysis as described in any one of claims 1 to 8.
Citation Information
Cited By
Cow growth trend prediction method based on multi-source data fusion
CN121303484A