Breeding cost prediction method and device and electronic equipment

By obtaining and analyzing real-time and historical data of the ranch, predicting the herd structure and food intake, combined with the monthly milk production, the problem of lack of prediction capabilities in traditional breeding cost management is solved, and accurate prediction of future breeding costs is achieved, and the ranch is supported. business decisions and resource optimization.

CN118886943AInactive Publication Date: 2024-11-01YIMU TECH (BEIJING CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411078396.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional breeding cost management method relies on empirical judgment, lacks the ability to predict and analyze future costs, is difficult to adapt to the management needs of modern ranches, and cannot provide effective support for optimizing breeding plans and resource allocation.

Method used

By obtaining the cattle herd structure and predicting indicators of the pasture, we predict the cattle herd structure at the end of the month; using feed trough images and preset feeding model, we obtain daily feeding and predict monthly feeding; combining monthly milk production and feeding, we predict breeding Cost, make full use of real-time and historical data, and adopt probabilistic statistics and timing analysis methods.

Benefits of technology

Accurate prediction of breeding costs in the future period has been achieved, providing an important basis for pasture management decisions, improving economic benefits and production management level, and enhancing the accuracy and reliability of cost prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886943A_ABST
    Figure CN118886943A_ABST
Patent Text Reader

Abstract

The invention discloses a breeding cost prediction method and device and electronic equipment, and relates to the field of pasture breeding. The method comprises the following steps: acquiring a first-month cattle herd structure of a pasture and a prediction index corresponding to the first-month cattle herd structure; predicting an end-of-month cattle herd structure according to the early-month cattle herd structure and the prediction index; according to an end-of-month cattle herd structure, the number of cattle in each different lactation stage and the monthly milk yield corresponding to the number of cattle are obtained; obtaining a feed trough image, and inputting the feed trough image into a preset food intake model to obtain a daily food intake corresponding to the structure of the cattle herd at the beginning of the month; predicting the monthly food intake according to the daily food intake; according to the monthly milk yield and the monthly food intake, the breeding cost corresponding to the cattle herd structure at the beginning of the month is predicted. By implementing the technical scheme provided by the invention, the breeding cost in a period of time in the future can be accurately predicted, and an important basis is provided for operation and management decisions of a pasture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and specifically to a breeding cost prediction method, device and electronic equipment. Background Art

[0002] With the continuous expansion of the scale of modern ranches and the increasing degree of intensification, breeding costs have become a key factor affecting the economic benefits and competitiveness of ranches. Scientifically and accurately predicting and controlling breeding costs is an important way to achieve sustainable development of ranches and improve profitability.

[0003] At present, the traditional breeding cost management method mainly relies on experience and judgment, and lacks the ability to predict and analyze future costs. This method is difficult to adapt to the management needs of modern ranches and cannot provide effective support for optimizing breeding plans and resource allocation.

[0004] Therefore, there is an urgent need for a breeding cost prediction method, device and electronic equipment. Summary of the invention

[0005] The present application provides a breeding cost prediction method, device and electronic equipment, which can more accurately predict the breeding cost in the future and provide an important basis for the management decision of the ranch.

[0006] In a first aspect of the present application, a breeding cost prediction method is provided, the method comprising: obtaining a herd structure of a pasture at the beginning of the month and a prediction index corresponding to the herd structure at the beginning of the month; predicting the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction index; obtaining the number of cows in different lactation stages and the monthly milk production corresponding to the number of cows based on the herd structure at the end of the month; obtaining a feed trough image, and inputting the feed trough image into a preset food intake model to obtain the daily food intake corresponding to the herd structure at the beginning of the month; predicting the monthly food intake based on the daily food intake; predicting the breeding cost corresponding to the herd structure at the beginning of the month based on the monthly milk production and the monthly food intake.

[0007] By adopting the above technical solution, by obtaining the herd structure of the ranch at the beginning of the month and obtaining the prediction index corresponding to the herd structure at the beginning of the month, the herd structure at the end of the month can be predicted. Then, according to the predicted herd structure at the end of the month, the number of cows in different lactation stages and the corresponding monthly milk production can be known. At the same time, by obtaining the feed trough image and inputting the preset feed intake model, the daily feed intake of the current herd can be obtained, and the monthly feed intake can be predicted accordingly. Finally, according to the predicted monthly milk production and monthly feed intake, the breeding cost under the herd structure at the beginning of the month can be predicted. This method makes full use of the real-time data of the ranch, including the herd structure, feed trough images, etc., and can more accurately predict the breeding cost in the future period, providing an important basis for the operation and management decision-making of the ranch, and helping to improve the economic benefits of the ranch.

[0008] Optionally, obtaining the prediction index corresponding to the herd structure at the beginning of the month specifically includes: obtaining historical production data of the ranch, the historical production data including multiple production events and the occurrence date and number of occurrences corresponding to each of the production events, the production events including cattle purchase, cattle culling, cattle death and cattle delivery; based on the historical production data, calculating the monthly occurrence probability of each of the production events, and using the monthly occurrence probability as the prediction index, the prediction index including the probability of cattle purchase, cattle culling, cattle death and cattle delivery.

[0009] By adopting the above technical solution, by obtaining the historical production data of the ranch, including the date and number of various production events (such as cattle purchase, culling, death and birth, etc.), the monthly probability of each production event can be calculated and used as a prediction indicator. These prediction indicators include key factors that affect the changes in the herd structure, such as the probability of cattle culling, the probability of cattle death and the probability of cattle birth. The prediction indicators obtained by this method based on statistical analysis of historical data can objectively and accurately reflect the actual situation of ranch production, provide important parameter basis for the subsequent end-of-month herd structure prediction, and lay the foundation for the prediction of breeding costs. This method fully taps the value of the historical production data accumulated by the ranch, obtains prediction indicators through probability statistics, has strong operability, and can improve the accuracy and reliability of breeding cost prediction.

[0010] Optionally, predicting the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction indicators specifically includes: obtaining the total number of cattle in the herd structure at the beginning of the month; predicting the number of cattle on hand based on the probability of cattle culling and the probability of cattle death; predicting the number of new cattle based on the probability of cattle purchase and the probability of cattle giving birth; and obtaining the herd structure at the end of the month based on the total number of cattle, the number of cattle on hand and the number of new cattle.

[0011] By adopting the above technical solution, the changes in the herd structure at the beginning of the month can be quantitatively predicted by probability calculation, and the herd structure after a period of time can be predicted more accurately. At the same time, this method takes into account the factors of both the reduction (elimination and death) and increase (purchase and delivery) of cattle. The prediction results can dynamically reflect the changes in the herd structure and provide an important basis for the subsequent prediction of milk production and feeding costs. The application of this method can grasp the changing trend of the herd structure, which is helpful to make production management plans in advance, allocate resources reasonably, and prevent possible problems.

[0012] Optionally, according to the herd structure at the end of the month, obtaining the number of cows in each different lactation stage and the milk production corresponding to the number of cows, specifically includes: obtaining the average daily single production of each lactation stage; multiplying the number of cows in each lactation stage in the herd structure at the end of the month by the corresponding average daily single production, to obtain the daily milk production of each lactation stage; adding the daily milk production of each lactation stage to obtain the total daily milk production of the ranch; multiplying the total daily milk production of each ranch by the future time period to obtain the monthly milk production, the future time period being the time from the current time to the end of the month.

[0013] By adopting the above technical solution, the daily milk production of each lactation stage can be obtained by obtaining the average daily single production of each lactation stage and multiplying it by the number of cows in the corresponding stage in the herd structure at the end of the month, and the total daily milk production of the ranch can be obtained by adding them up. Then, according to the future time period from the current time to the end of the month, the total daily production is multiplied by the predicted number of days to obtain the predicted monthly milk production. This method makes full use of the herd structure data at the end of the month to obtain the predicted value of monthly milk production in the future. This method is simple to calculate and easy to implement. It provides important data support for the prediction of breeding costs and business decisions, and helps to improve the production management level and economic benefits of the ranch.

[0014] Optionally, obtaining the monthly food intake based on the daily food intake specifically includes: inputting the daily food intake into a preset LSTM model to obtain a daily food intake prediction value for a future time period; and accumulating the daily food intake prediction values ​​according to the future time period to obtain the monthly food intake.

[0015] By adopting the above technical solution, the daily food intake can be input into the preset LSTM model to obtain the daily food intake forecast value in the future period, and then the daily food intake forecast value is accumulated according to the length of the future time period to obtain the total food intake forecast value (monthly food intake) in the future time period. This method takes advantage of the preset LSTM model in processing time series data and can more accurately predict the trend of food intake changes in the future period.

[0016] Optionally, predicting the breeding cost corresponding to the herd structure at the beginning of the month based on the monthly milk production and the monthly feed intake specifically includes: obtaining monthly milk income based on the monthly milk production and the predicted milk price; obtaining monthly feed cost based on the monthly feed intake and the predicted feed price; obtaining other monthly fixed costs and monthly variable costs; obtaining the breeding cost based on the monthly milk income, the monthly feed cost, the other monthly fixed costs and the monthly variable costs.

[0017] By adopting the above technical solution, various factors affecting the breeding cost are comprehensively considered, including monthly milk production income, monthly feed cost and other monthly fixed costs and monthly variable costs. By adding up various costs and incomes, the breeding cost in the future can be predicted more comprehensively and accurately. This method can be used to estimate the break-even point of breeding in advance, evaluate the economic benefits of breeding, and provide an important basis for production and operation decisions.

[0018] Optionally, before acquiring the feed trough image and inputting the feed trough image into a preset food intake model to obtain the daily food intake corresponding to the herd structure at the beginning of the month, the method also includes: acquiring historical feeding data, the historical feeding data including historical feed trough image data and feeding amount data corresponding to the historical feed trough image data; marking the historical feeding data to obtain training set data and test set data; constructing a convolutional neural network model; using the training set data to train the convolutional neural network model, and using the test set data to evaluate the convolutional neural network model to obtain accuracy; determining whether the accuracy is greater than or equal to a preset accuracy threshold; if it is determined that the accuracy is greater than or equal to the preset accuracy threshold, stopping the training to obtain the preset food intake model.

[0019] By adopting the above technical solution, a large amount of historical image data and historical feeding amount data are learned through a convolutional neural network model, image features can be automatically extracted and a mapping relationship between historical image data and historical feeding amount data can be established.

[0020] In a second aspect of the present application, a breeding cost prediction device is provided, which includes: an acquisition module and a processing module, wherein the acquisition module is used to acquire the herd structure of a ranch at the beginning of the month and the prediction index corresponding to the herd structure at the beginning of the month; the processing module is used to predict the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction index; the processing module is also used to acquire the number of cows in different lactation stages and the monthly milk production corresponding to the number of cows based on the herd structure at the end of the month; the acquisition module is also used to acquire a feed trough image, and input the feed trough image into a preset food intake model to obtain the daily food intake corresponding to the herd structure at the beginning of the month; the processing module is also used to predict the monthly food intake based on the daily food intake; the processing module is also used to predict the breeding cost corresponding to the herd structure at the beginning of the month based on the monthly milk production and the monthly food intake.

[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.

[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.

[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By obtaining the herd structure at the beginning of the month of the ranch and the prediction indicators corresponding to the herd structure at the beginning of the month, the herd structure at the end of the month can be predicted. Then, based on the predicted herd structure at the end of the month, the number of cows in different lactation stages and the corresponding monthly milk production can be known. At the same time, by obtaining the feed trough image and inputting the preset feed intake model, the daily feed intake of the current herd can be obtained, and the monthly feed intake can be predicted accordingly. Finally, based on the predicted monthly milk production and monthly feed intake, the breeding cost under the herd structure at the beginning of the month can be predicted. This method makes full use of the real-time data of the ranch, including herd structure, feed trough images, etc., and can more accurately predict the breeding cost in the future, providing an important basis for the management and decision-making of the ranch, and helping to improve the economic benefits of the ranch.

[0024] 2. By obtaining the historical production data of the ranch, including the date and number of various production events (such as cattle purchase, cattle culling, cattle death, and cattle delivery), the monthly probability of each production event can be calculated and used as a prediction indicator. These prediction indicators include key factors that affect the changes in the herd structure, such as the probability of cattle culling, the probability of cattle death, and the probability of cattle delivery. The prediction indicators obtained by this method based on statistical analysis of historical data can objectively and accurately reflect the actual situation of ranch production, provide important parameter basis for the subsequent prediction of the structure of the Yumo cattle herd, and lay the foundation for the prediction of breeding costs. This method fully taps the value of the historical production data accumulated by the ranch, obtains prediction indicators through probability statistics, has strong operability, and can improve the accuracy and reliability of breeding cost prediction.

[0025] 3. By obtaining the average daily single output of each lactation stage and multiplying it by the number of cows in the corresponding stage in the herd structure at the end of the month, the daily milk production of each lactation stage can be obtained, and the total daily milk production of the ranch can be obtained by adding them up. Then, according to the future time period from the current time to the end of the month, the total daily output is multiplied by the predicted number of days to get the predicted monthly milk production. This method makes full use of the herd structure data at the end of the month to obtain the predicted value of monthly milk production in the future. This method is simple to calculate and easy to implement. It provides important data support for the prediction of breeding costs and business decisions, and helps to improve the production management level and economic benefits of the ranch. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of a breeding cost prediction method disclosed in an embodiment of the present application; Figure 2 It is a module schematic diagram of a breeding cost prediction device disclosed in an embodiment of the present application; Figure 3 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0027] Explanation of the reference numerals: 201, acquisition module; 202, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION

[0028] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0029] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.

[0030] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0031] This application provides a method for predicting breeding costs. Figure 1 , Figure 1 1 is a flow chart of a method for predicting breeding costs provided in an embodiment of the present application. The method is applied to a server and includes steps S101 to S106, which are as follows: Step S101: Obtain the beginning of the month herd structure of the ranch and the prediction index corresponding to the beginning of the month herd structure. In step S101, the server establishes a communication connection with the data management system inside the ranch. After the connection is established, the server sends a data request instruction to the data management system, requesting to obtain the beginning of the month herd structure of the ranch. The data request instruction contains necessary identity authentication information, such as access tokens and digital signatures, to verify the access rights of the server. After receiving the request instruction, the data management system of the ranch first verifies the identity and authority of the server. After passing, the data management system queries the cattle database of the ranch to obtain the beginning of the month herd structure data. The beginning of the month herd structure includes the basic information of the cattle (such as cattle number, breed, age), production status (such as lactation period, dry period, pregnancy period), and the feeding area or cowshed where it is located. The data management system encapsulates the queried herd structure data in accordance with the agreed data format (such as JSON), and sends the beginning of the month herd structure data to the server through the previously established communication connection. The server receives the beginning of the month herd structure data. After the above steps, the server successfully obtains the beginning of the month herd structure data of the ranch.

[0032] Next, the server obtains the historical production data of the ranch. The historical production data includes multiple production events and the corresponding occurrence dates and numbers of each production event. Production events include cattle purchase, cattle culling, cattle death and cattle delivery. Based on the historical production data, the monthly occurrence probability of each production event is calculated, and the monthly occurrence probability is used as a prediction indicator. The prediction indicators include the probability of cattle purchase, cattle culling, cattle death and cattle delivery.

[0033] Specifically, the server sends a data request to the ranch's data management system to obtain historical production data within a certain time range of the ranch. Historical production data includes records of production events such as cattle purchase, cattle culling, cattle death, and cattle delivery, as well as the corresponding date and number of occurrences of each production event. The server calculates various prediction indicators based on historical production data. For production events such as cattle purchase, cattle culling, cattle death, and cattle delivery, the server calculates their probability of occurrence in each month. Furthermore, for each production event, the server calculates the proportion of the number of occurrences of the production event in each month to the total number of cattle in that month, and obtains the monthly frequency of occurrence.

[0034] Step S102: predicting the herd structure at the end of the month based on the herd structure at the beginning of the month and the forecast indicators.

[0035] In step S102, the total number of cattle in the herd structure at the beginning of the month is obtained; the number of cattle in stock is predicted based on the probability of cattle culling, the probability of cattle death and the probability of cattle abortion; the number of newly added cattle is predicted based on the probability of cattle purchase and the probability of cattle birth; the herd structure at the end of the month is obtained based on the total number of cattle, the number of cattle in stock and the number of newly added cattle.

[0036] Specifically, the server predicts the number of cattle in stock based on the probability of cattle culling and the probability of cattle death. These three probabilities are calculated in step S101 by analyzing historical production data. The number of cattle in stock indicates the number of cattle that are expected to continue to be raised after considering the factors of culling and death. The server multiplies the total number of cattle by the probability of stock (i.e., 1 minus the probability of culling, probability of death, and probability of abortion) to obtain the predicted number of cattle in stock. For example, if the current total number of cattle is 500, the probability of culling is 4%, and the probability of death is 1%, the predicted number of cattle in stock is 500×(1-4%-1%).

[0037] The server predicts the number of new cows based on the probability of purchasing cows and the probability of cow birthing. The probability of purchasing cows indicates the possibility of introducing new cows through external procurement, and the probability of cow birthing indicates the possibility of successful birthing of cows in the current herd. The server multiplies the total number of cows by the probability of purchase and the probability of birthing, respectively, to obtain the predicted number of externally purchased cows and the number of internally born cows, and adds the two to obtain the total number of new cows. For example, if the purchase probability is 2% and the probability of birthing is 5%, the predicted number of new cows is 500×2%+500×5%=35. The server obtains the end-of-month herd structure in each stage (dry period, lactation period, and pregnancy period) based on the total number of cows, the number of cows in stock, and the number of new cows. Specifically, the number of herds at the end of the month is equal to the sum of the number of cows in stock and the number of new cows.

[0038] Step S103: According to the herd structure at the end of the month, the number of cows in different lactation stages and the monthly milk production corresponding to the number of cows are obtained.

[0039] In step S103, the average daily single production in each lactation stage is obtained; the number of cows in each lactation stage in the herd structure at the end of the month is multiplied by the corresponding average daily single production to obtain the daily milk production in each lactation stage; the daily milk production in each lactation stage is added together to obtain the total daily milk production of the ranch; the total daily milk production of each ranch is multiplied by the future time period to obtain the monthly milk production, and the future time period is the time from the current time to the end of the month.

[0040] Specifically, the server obtains the average daily unit yield of each lactation stage. The lactation stage is usually divided into different stages of primiparity, second trimester, and third trimester, and the average daily milk production of cows in each stage is different. The server can query the average daily milk production records of each lactation stage by accessing the pasture history database, and calculate a comprehensive average daily unit yield. For example, the average daily unit yield of primiparous cows is 25 kg, that of second trimester cows is 30 kg, and that of third trimester cows is 28 kg. The server multiplies the number of cows in each lactation stage in the herd structure at the end of the month by the corresponding average daily unit yield to obtain the daily milk production of each lactation stage. The herd structure at the end of the month is predicted in step S103, which includes the distribution of the number of cows in each lactation stage. Based on this distribution, the server multiplies the number of cows in each stage by the corresponding average daily unit yield to obtain the total daily milk production of the stage. For example, the herd structure at the end of the month is predicted to be: 200 primiparous cows, 150 second trimester cows, and 100 third trimester cows. The daily milk production of a first-calf cow is 200×25=5000 kg, that of a second-calf cow is 150×30=4500 kg, and that of a third-calf cow is 100×28=2800 kg.

[0041] The server then adds up the daily milk production of each lactation stage to get the total daily milk production of the farm. This total reflects the farm's overall daily milk production capacity at the end of the predicted month. Continuing with the previous example, the total daily milk production of the farm is 5000+4500+2800=12300 kg. The server multiplies the total daily milk production of the farm by the future time period to get the monthly milk production. The future time period is the number of days from the current time to the end of the month. The server calculates the number of days in the future time period based on the current date and the end of the month date, and then multiplies it by the total daily milk production of the farm to get the predicted monthly milk production.

[0042] Step S104: Obtain a feed trough image, and input the feed trough image into a preset feed intake model to obtain the daily feed intake corresponding to the herd structure at the beginning of the month.

[0043] Before step S104, the method also includes: obtaining historical feeding data, the historical feeding data including historical feed trough image data and feeding amount data corresponding to the historical feed trough image data; marking the historical feeding data to obtain training set data and test set data; constructing a convolutional neural network model; using the training set data to train the convolutional neural network model, and using the test set data to evaluate the convolutional neural network model to obtain accuracy; determining whether the accuracy is greater than or equal to a preset accuracy threshold; if it is determined that the accuracy is greater than or equal to the preset accuracy threshold, stopping training to obtain a preset food intake model.

[0044] Specifically, the server obtains historical feeding data. The historical feeding data includes historical feed trough image data and corresponding feeding amount data. The feed trough image data can be regularly collected by the surveillance camera installed in the ranch, recording the filling status of the feed trough at different time points. The feeding amount data comes from the feeding records of the ranch, indicating the time, feed type and quantity of each feeding. The server accesses the ranch database, matches the image data and feeding amount data, and forms a complete historical feeding data set.

[0045] The server annotates the historical feeding data to obtain training set data and test set data. The annotation process also includes establishing a corresponding relationship between the feed trough image and the corresponding feeding amount, that is, assigning a feeding amount label to each image sample. After the annotation is completed, the server randomly divides the entire data set into a training set and a test set according to a certain ratio (such as 8:2). The training set is used for model training and parameter adjustment, and the test set is used to evaluate the performance and generalization ability of the model. The server builds a convolutional neural network model. The convolutional neural network model automatically extracts the key features of the image through multi-layer convolution and pooling operations, and establishes a mapping relationship between the image and the label. The server uses the training set data to train the convolutional neural network model. The training process optimizes the parameters of the model through continuous iterations so that it can map the feed trough image to the corresponding feeding amount as accurately as possible. The server inputs the training set data into the convolutional neural network model in batches, calculates the difference between the model's predicted results and the actual feeding amount, and adjusts the model's parameters according to the difference. This process is repeated until the performance of the convolutional neural network model on the training set reaches a certain saturation state. While training, the server uses the test set data to evaluate the model to obtain accuracy. Accuracy reflects the model's predictive ability on unknown data and is an important indicator for measuring model performance. The server inputs the test set data into the trained convolutional neural network model, compares the difference between the feeding amount predicted by the convolutional neural network model and the actual feeding amount, and calculates the accuracy. If the accuracy reaches the preset accuracy threshold (such as 90%), the convolutional neural network model is considered to have reached the ideal performance level, and training can be stopped and saved as the preset feeding amount model.

[0046] In step S104, the server obtains the feed trough image. The server automatically completes this through the surveillance camera installed in the ranch. The camera regularly captures images of the feed trough and transmits the image data to the server in real time. The server inputs the obtained feed trough image into the preset food intake model. The preset food intake model is obtained by training with historical feeding data before step S104, and the preset food intake model can automatically estimate the food intake of the cattle herd based on the feed trough image. The input feed trough image is first preprocessed and adjusted to the format and size required by the preset food intake model. Then, the server passes the preprocessed feed trough image into the preset food intake model and starts the prediction process. During the prediction process, the preset food intake model analyzes the input feed trough image through a convolutional neural network. Each layer of the preset food intake model extracts and abstracts the feed trough image, and gradually converts the feed trough image into a higher-level representation. In the last layer, the preset food intake model calculates the food intake prediction value corresponding to the feed trough image based on the extracted features. The server inputs each feed trough image into the preset food intake model to obtain a series of food intake prediction values. The server summarizes and analyzes these predicted values ​​to obtain the daily food intake corresponding to the herd structure at the beginning of the month.

[0047] Step S105: predicting the monthly food intake based on the daily food intake.

[0048] In step S105, the daily food intake is input into a preset LSTM model to obtain a predicted value of the daily food intake for a future time period; the predicted values ​​of the daily food intake are accumulated according to the future time period to obtain the monthly food intake.

[0049] In a possible implementation, the construction process of the preset LSTM model includes: the server obtains historical daily food intake data. This data can come from the food intake prediction result in step S105, or from the historical feeding records of the ranch. The server accesses the ranch database to extract the daily food intake data for a period of time (such as the past year) to form a time series data set. The time series data set contains the date of each day and the corresponding food intake value.

[0050] The server preprocesses the historical daily food intake data. The specific steps of preprocessing include: converting the date into a continuous timestamp; normalizing the food intake value and scaling it to between 0 and 1; constructing a time sliding window to divide the time series data into subsequences of fixed length. Each subsequence contains the food intake value within a certain time range, which is used to predict the food intake at the next moment. The time series data set is randomly divided into a training set and a validation set according to a certain ratio (such as 8:2), which are used for LSTM model training and performance evaluation respectively. The server designs and builds the network structure of the LSTM model. The LSTM model consists of an input layer, one or more LSTM layers, a fully connected layer, and an output layer. The server trains the LSTM model using the training set data. The server inputs the training set data into the LSTM model in chronological order, allowing the LSTM model to learn the time dependency and change law of food intake, and then obtains the preset LSTM model.

[0051] In step S105, the server inputs the daily food intake data into the preset LSTM model. The preset LSTM model predicts future trends by learning the input data. Specifically, the model first passes the daily food intake data to the LSTM layer, and the LSTM layer updates its own state based on the current input and previous state, and generates an output. This output represents the preset LSTM model's prediction of the food intake at the next moment. Then, the preset LSTM model passes the output of the LSTM layer to the fully connected layer, and the fully connected layer further adjusts and maps the predicted value, and finally obtains the daily food intake prediction value for each day in the future time period. The predicted time span can be set according to demand, and the next month is usually selected as the prediction range. The server will repeatedly call the preset LSTM model according to the set time span, and gradually generate the daily food intake prediction value for each day in the future time period until the entire target month is covered. For example, if the current date is June 1, 2023, and the prediction range is one month in the future, the server will call the preset LSTM model to predict the daily food intake for 29 days from June 2 to June 30, and obtain a time series of length 29, which represents the trend of the predicted daily food intake value for the next 29 days. Finally, the server sums the predicted daily food intake prediction value time series to obtain the monthly food intake for the entire month.

[0052] Step S106: predicting the breeding cost corresponding to the herd structure at the beginning of the month based on the monthly milk production and the monthly food intake.

[0053] In step S106, the monthly milk income is obtained according to the monthly milk production and milk price; the monthly feed cost is obtained according to the monthly food intake and feed price; other monthly fixed costs and monthly variable costs are obtained; the breeding cost is obtained according to the monthly milk income, monthly feed cost, other monthly fixed costs and monthly variable costs.

[0054] Specifically, the server calculates the monthly milk production income based on the monthly milk production and milk price. The monthly milk production is predicted in step S103, indicating the total milk production expected by the herd structure at the beginning of the month in the next month. The milk price can be obtained from the sales record of the ranch or the market data, indicating the average sales price of milk. The server multiplies the monthly milk production by the milk price to obtain the monthly milk production income. The server calculates the monthly feed cost based on the predicted monthly food intake and feed price. The monthly food intake is predicted in step S105, indicating the total food intake of the herd in the next month. The feed price can be obtained from the purchase record of the ranch or the supplier's quotation, indicating the average purchase cost of the feed. The server multiplies the monthly food intake by the feed price to obtain the monthly feed cost. At the same time, the server obtains other monthly fixed costs and monthly variable costs. Fixed costs refer to costs that are not related to production, such as ranch site rental and equipment depreciation. Variable costs refer to other costs related to production, such as veterinary expenses, labor costs, and water and electricity costs. These cost data can be extracted from the financial records or management system of the ranch. The server aggregates these costs on a monthly basis to obtain other monthly fixed costs and monthly variable costs.

[0055] The server calculates the breeding cost based on monthly milk production income, monthly feed costs, other monthly fixed costs, and monthly variable costs. Breeding cost = monthly feed cost + other monthly fixed costs + monthly variable costs - monthly milk production income. Breeding cost refers to the various costs invested by the ranch for breeding dairy cows within a month, including monthly feed costs, other monthly fixed costs, and monthly variable costs, and takes into account the offsetting effect of the monthly milk production income on the cost.

[0056] Reference Figure 2 The present application also provides a breeding cost prediction device, which is a server, and the server includes an acquisition module 201 and a processing module 202; the acquisition module 201 is used to obtain the herd structure of the pasture at the beginning of the month; the acquisition module 201 is also used to obtain the prediction index corresponding to the herd structure at the beginning of the month; the processing module 202 is used to predict the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction index; the processing module 202 is also used to obtain the number of cows in different lactation stages and the monthly milk production corresponding to the number of cows based on the herd structure at the end of the month; the acquisition module 201 is also used to obtain a feed trough image, and input the feed trough image into a preset food intake model to obtain the daily food intake corresponding to the herd structure at the beginning of the month; the processing module 202 is also used to predict the monthly food intake based on the daily food intake; the processing module 202 is also used to predict the breeding cost corresponding to the herd structure at the beginning of the month based on the monthly milk production and the monthly food intake.

[0057] In a possible implementation, the acquisition module 201 acquires the prediction index corresponding to the herd structure at the beginning of the month, specifically including: the acquisition module 201 acquires the historical production data of the ranch, the historical production data includes multiple production events and the occurrence date and occurrence quantity corresponding to each production event, and the production events include cattle purchase, cattle culling, cattle death and cattle delivery; the processing module 202 calculates the monthly occurrence probability of each production event based on the historical production data, and uses the monthly occurrence probability as a prediction index, and the prediction index includes the cattle purchase probability, cattle culling probability, cattle death probability and cattle delivery probability.

[0058] In a possible implementation, the processing module 202 predicts the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction indicators, specifically including: the acquisition module 201 acquires the total number of cattle in the herd structure at the beginning of the month; the processing module 202 predicts the number of cattle in stock based on the probability of cattle culling and the probability of cattle death; the processing module 202 predicts the number of new cattle based on the probability of cattle purchase and the probability of cattle giving birth; the processing module 202 obtains the herd structure at the end of the month based on the total number of cattle, the number of cattle in stock and the number of new cattle.

[0059] In a possible implementation, the processing module 202 obtains the number of cows in different lactation stages and the milk production corresponding to the number of cows based on the herd structure at the end of the month, specifically including: the acquisition module 201 obtains the average daily single production of each lactation stage; the processing module 202 multiplies the number of cows in each lactation stage in the herd structure at the end of the month by the corresponding average daily single production to obtain the daily milk production of each lactation stage; the processing module 202 adds the daily milk production of each lactation stage to obtain the total daily milk production of the ranch; the processing module 202 multiplies the total daily milk production of each ranch by the future time period to obtain the monthly milk production, where the future time period is the time from the current time to the end of the month.

[0060] In one possible implementation, the processing module 202 obtains the monthly food intake based on the daily food intake, specifically including: the processing module 202 inputs the daily food intake into a preset LSTM model to obtain a predicted value of the daily food intake for a future time period; the processing module 202 accumulates the predicted values ​​of the daily food intake according to the future time period to obtain the monthly food intake.

[0061] In a possible implementation, the processing module 202 predicts the breeding cost corresponding to the herd structure at the beginning of the month based on the monthly milk production and the monthly feed intake, specifically including: the processing module 202 obtains the monthly milk production income based on the monthly milk production and the predicted milk price; the processing module 202 obtains the monthly feed cost based on the monthly feed intake and the predicted feed price; the acquisition module 201 obtains other monthly fixed costs and monthly variable costs; the processing module 202 obtains the breeding cost based on the monthly milk production income, the monthly feed cost, other monthly fixed costs and the monthly variable costs.

[0062] In a possible embodiment, before the acquisition module 201 acquires the feed trough image and inputs the feed trough image into the preset food intake model to obtain the daily food intake corresponding to the herd structure at the beginning of the month, the method also includes: the acquisition module 201 acquires historical feeding data, the historical feeding data includes historical feed trough image data and feeding amount data corresponding to the historical feed trough image data; the processing module 202 marks the historical feeding data to obtain training set data and test set data; the processing module 202 constructs a convolutional neural network model; the processing module 202 uses the training set data to train the convolutional neural network model, and uses the test set data to evaluate the convolutional neural network model to obtain accuracy; the processing module 202 determines whether the accuracy is greater than or equal to a preset accuracy threshold; if the processing module 202 determines that the accuracy is greater than or equal to the preset accuracy threshold, the training is stopped to obtain the preset food intake model.

[0063] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0064] The present application also provides an electronic device. Figure 3 , Figure 3 The electronic device 300 may include: at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .

[0065] The communication bus 302 is used to realize the connection and communication between these components.

[0066] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.

[0067] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0068] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.

[0069] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally also be at least one storage device located away from the aforementioned processor 301. Refer to Figure 3 , the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program of a breeding cost prediction method.

[0070] exist Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call an application program storing a breeding cost prediction method in the memory 305, and when executed by one or more processors 301, the electronic device 300 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

[0071] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors 301, the electronic device 300 executes one or more of the methods described in the above embodiments.

[0072] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0073] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0074] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0075] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0076] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0077] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0078] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for predicting breeding costs, characterized in that: The method comprises: Obtaining the beginning-of-month herd structure of the ranch and the prediction index corresponding to the beginning-of-month herd structure; Predicting the herd structure at the end of the month based on the herd structure at the beginning of the month and the forecast indicators; According to the herd structure at the end of the month, the number of cows in different lactation stages and the monthly milk production corresponding to the number of cows are obtained; Obtaining a feed trough image, and inputting the feed trough image into a preset food intake model to obtain a daily food intake corresponding to the herd structure at the beginning of the month; predicting monthly food intake based on the daily food intake; The breeding cost corresponding to the herd structure at the beginning of the month is predicted based on the monthly milk production and the monthly food intake.

2. The method according to claim 1, characterized in that The obtaining of the beginning of the month herd structure of the ranch and the prediction index corresponding to the beginning of the month herd structure specifically includes: Acquire historical production data of the ranch, the historical production data including multiple production events and the occurrence date and occurrence quantity of each production event, the production events including cattle purchase, cattle culling, cattle death and cattle delivery; Based on the historical production data, the monthly occurrence probability of each production event is calculated, and the monthly occurrence probability is used as the prediction index, which includes the probability of cattle purchase, the probability of cattle culling, the probability of cattle death and the probability of cattle giving birth.

3. The method according to claim 2, characterized in that The step of predicting the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction index specifically includes: Get the total number of cattle in the herd structure at the beginning of the month; Predicting the number of cattle on hand based on the cattle culling probability and the cattle death probability; According to the probability of purchasing cattle and the probability of giving birth of cattle, the number of new cattle is predicted; The herd structure at the end of the month is obtained based on the total number of cattle, the number of cattle on hand and the number of newly added cattle.

4. The method according to claim 1, characterized in that The obtaining, according to the herd structure at the end of the month, the number of cows in different lactation stages and the milk production corresponding to the number of cows, specifically includes: Obtain the average daily yield of each lactation stage; Multiplying the number of cows in each lactation stage in the herd structure at the end of the month by the corresponding average daily milk production to obtain the daily milk production in each lactation stage; Adding up the daily milk production in each lactation stage to obtain the total daily milk production of the pasture; The monthly milk production is obtained by multiplying the total daily milk production of each pasture by a future time period, where the future time period is the time from the current time to the end of the month.

5. The method according to claim 4, characterized in that The obtaining of the monthly food intake according to the daily food intake specifically includes: The daily food intake is input into a preset LSTM model to obtain a predicted value of the daily food intake in a future time period, where the future time period is a time period from the beginning of the month to the end of the month; According to the future time period, the daily food intake prediction values ​​are accumulated to obtain the monthly food intake.

6. The method according to claim 5, characterized in that The predicting of the breeding cost corresponding to the herd structure at the beginning of the month according to the monthly milk production and the monthly food intake specifically includes: According to the monthly milk production and milk price, the monthly milk production income is obtained; According to the monthly food intake and feed price, the monthly feed cost is obtained; Obtain other monthly fixed costs and monthly variable costs; The breeding cost is obtained according to the monthly milk production income, the monthly feed cost, the other monthly fixed costs and the monthly variable costs.

7. The method according to claim 6, characterized in that Before obtaining the feed trough image and inputting the feed trough image into a preset food intake model to obtain the daily food intake corresponding to the herd structure at the beginning of the month, the method further includes: Acquire historical feeding data, wherein the historical feeding data includes historical feed trough image data and feeding amount data corresponding to the historical feed trough image data; Annotating the historical feeding data to obtain training set data and test set data; Build a convolutional neural network model; The convolutional neural network model is trained using the training set data, and the convolutional neural network model is evaluated using the test set data to obtain accuracy; Determining whether the accuracy is greater than or equal to a preset accuracy threshold; If it is determined that the accuracy is greater than or equal to the preset accuracy threshold, the training is stopped to obtain the preset food intake model.

8. A breeding cost prediction device, characterized in that: The device comprises an acquisition module (201) and a processing module (202), wherein: The acquisition module (201) is used to acquire the cattle herd structure at the beginning of the month of the ranch and the prediction index corresponding to the cattle herd structure at the beginning of the month of the ranch; The processing module (202) is used to predict the herd structure at the end of the month based on the herd structure at the beginning of the month and the prediction index; The processing module (202) is further used to obtain the number of cows in different lactation stages and the monthly milk production corresponding to the number of cows according to the herd structure at the end of the month; The acquisition module (201) is further used to acquire a feed trough image, and input the feed trough image into a preset food intake model to obtain a daily food intake corresponding to the herd structure at the beginning of the month; The processing module (202) is further used to predict the monthly food intake based on the daily food intake; The processing module (202) is further used to predict the breeding cost corresponding to the herd structure at the beginning of the month according to the monthly milk production and the monthly food intake.

9. An electronic device, characterized in that: The electronic device (300) comprises a processor (301), a memory (305), a user interface (303) and a network interface (304), wherein the memory (305) is used to store instructions, the user interface (303) and the network interface (304) are used to communicate with other devices, and the processor (301) is used to execute the instructions stored in the memory (305) so that the electronic device (300) executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Cow inventory structure prediction method

    CN108171368A

  • Cattle flock structure determination method and device and computer readable storage medium

    CN112488403A

  • Cattle herd feeding management method and system

    CN112750049A

  • Dairy cow forage feeding state monitoring and early warning system and method based on deep learning

    CN117528038A

  • System for calculating individual total estimated milk production for designated period

    JP2024065370A