Method and system for recording, judging and correcting abnormal data of daily milk yield of dairy cow and application of method and system in breeding
By constructing a multivariate linear regression model to predict the daily milk production of dairy cows adjacent to each other, and comparing the original data for abnormal data determination and correction, the shortcomings of abnormal data processing in the existing technology for dairy cows to measure daily milk production are solved, and accurate correction of abnormal data and improvement of data science applications are achieved.
Patent Information
- Application Number
- CN202411727745.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
It is difficult to accurately determine and correct abnormal data for dairy cows to determine daily milk production, which affects the accuracy of data reports and related research applications.
By constructing a multivariate linear regression model, the relationship between the lactation days and the milk production volume of the previous or the next measurement day and the current measurement day is predicted, and the original data is compared for abnormal data determination and correction.
Accurate determination and correction of abnormal measurement of daily milk production is achieved, and data that does not conform to the lactation rules of dairy cows have an impact on DHI reports and related research, which improves the scientificity and application value of the data.
Smart Images

Figure CN119669778A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of dairy cow breeding, and in particular relates to a method and system for recording, determining and correcting abnormal data of daily milk production of dairy cows and their application in breeding. Background Art
[0002] Dairy cow production performance measurement (DHI) is becoming more and more important in actual production. However, in actual production, there will be abnormally high or low recorded data of individual daily milk production, which is obviously inconsistent with the lactation law of dairy cows, affecting the accuracy of data reporting and related research applications based on daily milk production measurement. How to accurately judge and correct these abnormal recorded data is the premise for determining the accuracy of related research.
[0003] Previously, researchers had two main methods for dealing with such abnormal data: one was to remove the data, which resulted in data waste; the other was to replace it with the group average data, which lacked scientificity. With the continuous expansion of dairy cow production performance measurement work, more accurate and practical abnormal record data processing methods will play an important role in the scientific application of data. Summary of the invention
[0004] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a method and system for recording, determining and correcting abnormal data of daily milk production of dairy cows and their application in breeding. By considering the relationship between the number of lactation days and milk production of the previous or next measurement day and the number of lactation days and milk production of the current measurement day, a multivariate linear regression model is used to predict the milk production of adjacent measurement days. By comparing with the original measurement day milk production data, the original data is evaluated, abnormal data is determined, and the determined abnormal data is further corrected, thereby achieving accurate determination and scientific correction of abnormal daily milk production.
[0005] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0006] A first aspect of the present invention provides a method for determining and correcting abnormal data records of daily milk production of dairy cows.
[0007] A method for determining and correcting abnormal data records of daily milk production of dairy cows, comprising the following steps:
[0008] Obtaining the lactation history data of dairy cows, including the measured lactation days and the measured daily milk production corresponding to the measured lactation days;
[0009] Construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days;
[0010] Based on the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days, the milk production data on the original measurement days are compared to determine the abnormal data in the original measurement day milk production data and correct the abnormal data.
[0011] A second aspect of the present invention provides a system for recording, determining and correcting abnormal data of daily milk production of dairy cows.
[0012] A system for recording, judging and correcting abnormal data of daily milk production of dairy cows, comprising:
[0013] The data acquisition module is configured to: acquire the historical lactation data of the dairy cow, including the measured daily lactation days and the measured daily milk production corresponding to the measured daily lactation days;
[0014] The prediction module is configured to: construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days;
[0015] The correction module is configured to: compare the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days with the original measurement day milk production data, determine abnormal data in the original measurement day milk production data, and correct the abnormal data.
[0016] The third aspect of the present invention provides an application of the method for recording, determining and correcting abnormal data of daily milk production of dairy cows described in the first aspect in breeding.
[0017] One or more of the above technical solutions have the following beneficial effects:
[0018] The present invention provides a method and system for determining and correcting abnormal data records of daily milk production of dairy cows and their application in breeding. The method considers the relationship between the number of lactation days and milk production of the previous or next measurement day and the number of lactation days and milk production of the current measurement day, uses a multivariate linear regression model to predict the milk production of adjacent measurement days, and evaluates the original data by comparing them with the original measurement day milk production data, and corrects the abnormal data, thereby realizing the correction of abnormal measurement day milk production, avoiding the influence of abnormal data that does not conform to the lactation law of dairy cows on the accuracy of DHI reports, or on other studies related to the measurement day milk production.
[0019] After obtaining the regression coefficient of the multivariate linear regression model, the present invention combines the recorded data of the second measurement day to obtain the slope of the milk production change on the first measurement day, and combines the recorded data of the previous measurement day to obtain the slope of the milk production change on the second and subsequent measurement days, thereby realizing the prediction of milk production, and the prediction result is relatively accurate.
[0020] The present invention combines the lactation law of dairy cows and divides the lactation stage into two stages, namely, an ascending stage and a descending stage, according to the number of lactation days. The lactation days less than or equal to 50 days are defined as the ascending stage, and more than 50 days are defined as the descending stage. A set of regression coefficients are estimated for each lactation stage, so that more scientific regression coefficients of the multivariate linear regression model can be obtained, which is convenient for the subsequent accurate prediction of milk production.
[0021] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0023] Figure 1 This is a flow chart of the method of the first embodiment. DETAILED DESCRIPTION
[0024] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0025] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0026] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0027] Embodiment 1
[0028] As mentioned above, the daily milk production may be abnormally high or low. If such data is not corrected, the data that does not conform to the lactation rules of dairy cows may affect the accuracy of DHI reports or other studies based on daily milk production.
[0029] In order to evaluate and correct the measured daily milk production data, a specific embodiment of the present invention provides a method for determining and correcting abnormal data records of the measured daily milk production of dairy cows. By considering the relationship between the lactation days and milk production of the previous or next measured day and the lactation days and milk production of the current measured day, a multivariate linear regression model is used to predict the milk production of adjacent measured days. By comparing with the original measured daily milk production data, the original data is evaluated and the abnormal data is corrected, thereby realizing the correction of abnormal measured daily milk production.
[0030] like Figure 1 As shown, the method for determining and correcting abnormal data records of daily milk production of dairy cows disclosed in this embodiment may include the following steps:
[0031] Obtaining the lactation history data of dairy cows, including the measured lactation days and the measured daily milk production corresponding to the measured lactation days;
[0032] Construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days;
[0033] Based on the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days, the milk production data on the original measurement days are compared to determine the abnormal data in the original measurement day milk production data and correct the abnormal data.
[0034] Furthermore, this embodiment predicts milk production by a multivariate linear regression model and corrects abnormal data to ensure data accuracy and consistency, including the following steps:
[0035] S1. Obtain the phenotypic record values of dairy cow production traits including lactation days and milk production, and perform quality control to exclude abnormal daily milk production as much as possible, and obtain milk production record data that conforms to the lactation curve for parameter estimation of the multivariate linear regression model.
[0036] It can be understood that the method for obtaining the milk production record data that conforms to the lactation curve in this embodiment can be specifically:
[0037] The phenotypic recorded values of dairy cow production traits are quality controlled to exclude abnormal daily milk production as much as possible. The determination of abnormal milk production is shown in the following Table 1 as an example:
[0038] Table 1 Data quality control process
[0039]
[0040] From Table 1, we can see that the original data is 8,048,135 measurement records;
[0041] The quality control standard was established by measuring the daily milk production, and the values of the daily milk production range of ≥18.1kg and ≤57.6kg were screened and measured, and 6,157,793 measurement records were obtained;
[0042] Quality control standards were established based on the number of days of lactation, and values in the range of ≥5 days and ≤330 days of lactation were screened, resulting in 5,530,807 measurement records;
[0043] The quality control standard was established by the number of measurement records during the lactation period, and the values with ≥3 measurement records during the lactation period were screened, resulting in 5,303,980 measurement record data;
[0044] Quality control standards were established by parity, and values of parity ≤ 3 were screened, resulting in 4,474,035 measurement record data;
[0045] Quality control standards were established based on the measurement intervals, and values in the range of measurement intervals ≥25d and ≤39d were screened, ultimately obtaining 3,733,845 measurement record data.
[0046] S2. Combined with the lactation law of dairy cows, the lactation stage is divided into two stages: rising and falling according to the number of lactation days. The lactation days less than or equal to 50 days are defined as the rising stage (before the peak of lactation), and more than 50 days are defined as the falling stage (after the peak of lactation). A set of regression coefficients are estimated for each lactation stage.
[0047] Since there was no record of milk yield on the first measurement day, a separate set of regression coefficients was estimated using milk yield on subsequent measurement days to predict milk yield on the first measurement day.
[0048] S3. Construct a multivariate linear regression model to measure the relationship between daily milk production and lactation days, and obtain the regression coefficients b at different lactation stages. 0...4 ;
[0049] The multivariate linear regression model is shown in formula (1):
[0050]
[0051] Among them, y i represents the milk production on the i-th measurement day; y u-1 Indicates the milk production on the i-1th measurement day; DIM i represents the number of lactation days on the ith measurement day; DIM i-1 represents the lactation days of the i-1th measurement day; (DIM i-1 )y i-1 represents the interaction term between the number of lactation days on the i-1th measurement day and the milk production on the i-1th measurement day; i = 2, 3, ... N; b 0...4 represents the regression coefficient; e represents the random error of regression.
[0052] S4, according to the estimated regression coefficient b of different lactation stages 0....4 , combined with the data recorded on the next measurement day, the slope of milk production change on the first measurement day is calculated according to formula (2-1): Combined with the recorded data of the previous measurement day, the slope of milk production change on the second and subsequent measurement days is calculated according to formula (2-2) The value of .
[0053] The first measured daily milk production change slope and the second and subsequent measured daily milk production change slopes are as follows:
[0054]
[0055] In the formula, The first one is to determine the slope of daily milk production change; is the slope of milk production change on the ith measured day; b 0...4 is the regression coefficient estimated according to different lactation stages; DIM 2 DIM is the lactation day of the second measurement day; i-1 is the number of lactation days on the i-1th measurement day; y 2 is the milk production on the second measurement day; i-1 is the milk production on the i-1th measurement day; i=2,3,…N.
[0056] After obtaining the first measured daily milk production change slope and the second and subsequent measured daily milk production change slopes, subsequent milk production predictions can be facilitated.
[0057] S5. Use formula (3-1) to predict milk production on the first measurement day And use formula (3-2) to predict milk production on the second and subsequent measurement days
[0058] Specifically:
[0059]
[0060] Where: It is the predicted milk production on the first measurement day within the parity; is the predicted milk production on the ith measurement day within the parity; u-1 y is the original milk production on the i-1 measurement day within the parity; 2 DIM is the original milk production on the second and subsequent measurement days within the parity; 2 -DIM 1 is the interval between the first and second measurement days; DIM i -DIM i-1 is the measurement interval between two adjacent measurement days; i=2,3,…N.
[0061] S6. It also includes evaluating the original milk production on the measurement day, where the original milk production on the measurement day is the true value of the milk production on the measurement day.
[0062] In this embodiment, based on the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days, the milk production data on the original measurement day are compared to determine abnormal data in the original measurement day milk production data, specifically including:
[0063] If the ratio of the original measured daily milk production to the predicted milk production on the measured day is greater than a first set value or less than a second set value, the original measured daily milk production is identified as abnormal data;
[0064] or,
[0065] Correct abnormal data, including:
[0066] If the ratio of the original measured daily milk production to the predicted milk production on the measured day is less than the second set value, the original measured daily milk production is adjusted to the product of the predicted milk production on the measured day and the second set value;
[0067] If the ratio of the original measured daily milk production to the predicted milk production on the measured day is greater than the first set value, the original measured daily milk production is adjusted to the product of the predicted milk production on the measured day and the first set value.
[0068] It can be understood that the first set value and the second set value can be specifically set manually. The first set value is a value greater than 1, and the second set value is a value less than 1.
[0069] Furthermore, in this embodiment:
[0070] If the raw milk yield on the measurement day is greater than 150% of the predicted milk yield or less than 60% of the predicted milk yield, the record is identified as an abnormal measurement day milk yield and an adjustment is made:
[0071] If the original milk production on the measurement day is less than 60% of the predicted milk production, the milk production on the measurement day is adjusted to 60% of the predicted milk production;
[0072] If the original milk yield on the measurement day was greater than 150% of the predicted milk yield, the milk yield on the measurement day was adjusted to 150% of the predicted milk yield.
[0073] In this embodiment, the estimated values of regression coefficients for different lactation stages are obtained based on the multivariate linear regression model, that is, the estimated values of regression coefficients for different lactation stages, as shown in Table 2.
[0074] Table 2 Estimated regression coefficients for different lactation stages
[0075]
[0076]
[0077] Note: P<0.01 represents extremely significant, P<0.05 represents significant; b0...4 represents the regression coefficient.
[0078] Among them, B1 represents the regression coefficient obtained by using the next DHI measurement record to estimate the previous DHI measurement record before the peak of lactation; B2 represents the regression coefficient obtained by using the next DHI measurement record to estimate the previous DHI measurement record after the peak of lactation; B3 represents the regression coefficient obtained by using the previous DHI measurement record to estimate the next DHI measurement record before the peak of lactation; B4 represents the regression coefficient obtained by using the previous DHI measurement record to estimate the next DHI measurement record after the peak of lactation.
[0079] The effect of the application of 438,973 measurement records in the DHI database of the Institute of Animal Husbandry and Veterinary Medicine of Shandong Academy of Agricultural Sciences before and after correction was evaluated. The relevant descriptive statistics are shown in Table 3. The average milk production of each parity increased after correction and the difference was significant (P<0.05). The variance analysis of the measured daily milk production before and after correction showed that the difference before and after correction was extremely significant (P<0.01). At the same time, the coefficient of variation (CV) generally decreased after correction, indicating that the stability of the data has been improved.
[0080] Table 3 Descriptive statistics of daily milk production data before and after correction
[0081]
[0082]
[0083] Note: P < 0.01 represents extremely significant, P < 0.05 represents significant.
[0084] Embodiment 2
[0085] This embodiment discloses a system for recording, determining and correcting abnormal data of daily milk production of dairy cows.
[0086] A system for recording, judging and correcting abnormal data of daily milk production of dairy cows, comprising:
[0087] The data acquisition module is configured to: acquire the historical lactation data of the dairy cow, including the measured daily lactation days and the measured daily milk production corresponding to the measured daily lactation days;
[0088] The prediction module is configured to: construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days;
[0089] The correction module is configured to: compare the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days with the original measurement day milk production data, determine abnormal data in the original measurement day milk production data, and correct the abnormal data.
[0090] Embodiment 3
[0091] This embodiment provides an application of the abnormal data record determination and correction method for daily milk production of dairy cows described in Embodiment 1 in breeding.
[0092] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0093] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for determining and correcting abnormal data records of daily milk production of dairy cows, characterized in that: The following steps are involved: Obtaining the lactation history data of dairy cows, including the measured lactation days and the measured daily milk production corresponding to the measured lactation days; Construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days; Based on the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days, the milk production data on the original measurement days are compared to determine the abnormal data in the original measurement day milk production data and correct the abnormal data.
2. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 1, characterized in that: Construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days, specifically including: The historical data of dairy cow lactation was used for fitting and the regression coefficients of the multivariate linear regression model were solved; Based on the regression coefficient of the multivariate linear regression model, combined with the recorded data of the second measurement day, the slope of the change in milk production on the first measurement day is obtained; and combined with the recorded data of the previous measurement day, the slope of the change in milk production on the second and subsequent measurement days is obtained; The milk yield on the first measurement day and the milk yield on the second and subsequent measurement days are predicted based on the milk yield change slope on the first measurement day and the milk yield change slope on the second and subsequent measurement days, respectively.
3. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 2, characterized in that: The multivariate linear regression model is: Among them, y i represents the milk production on the i-th measurement day; y i-1 Indicates the milk production on the i-1th measurement day; DIM i represents the number of lactation days on the ith measurement day; DIM i-1 represents the lactation days of the i-1th measurement day; (DIM i-1 )y i-1 represents the interaction term between the number of lactation days on the i-1th measurement day and the milk production on the i-1th measurement day; i = 2, 3, ... N; b 0...4 represents the regression coefficient; e represents the random error of regression.
4. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 2, characterized in that: The recorded data of the measurement day include the number of lactation days and the milk production on the measurement day.
5. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 2, characterized in that: The first determination of the daily milk production change slope is specifically calculated as follows: in, is the first measurement of the daily milk production change slope; b 0...4 is the regression coefficient; DIM2 is the number of lactation days on the second measurement day; y2 is the milk production on the second measurement day; The second and subsequent determinations of the daily milk production change slope are specifically calculated as follows: in, is the slope of milk production on the ith measured day, i = 2, 3, ... N; DIM i-1 is the number of lactation days on the i-1th measurement day; y i-1 is the milk production on the i-1th measurement day.
6. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 5, characterized in that: The specific calculation method of the milk production on the first measurement day is: in, is the predicted milk production on the first measurement day within the parity; y2 is the original milk production on the second and subsequent measurement days within the parity; DIM2-DIM1 is the interval between the first and second measurement days; The specific calculation method for the milk production on the second and subsequent measurement days is: in, is the predicted milk production on the i-th measurement day within the parity, i = 2, 3, ... N; y i-1 DIM is the original milk production on the i-1 measurement day within the parity; i -DIM i-1 It is the measurement interval between two adjacent measurement days.
7. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 1, characterized in that: Also includes: The lactation stage is divided into two stages, the rising stage and the falling stage, according to the number of lactation days; A separate set of regression coefficients was estimated for each lactation stage.
8. The method for determining and correcting abnormal data records of daily milk production of dairy cows according to claim 1, characterized in that: Based on the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days, the milk production data on the original measurement day are compared to determine the abnormal data in the original measurement day milk production data, including: If the ratio of the original measured daily milk production to the predicted milk production on the measured day is greater than a first set value or less than a second set value, the original measured daily milk production is identified as abnormal data; or, Correct abnormal data, including: If the ratio of the original measured daily milk production to the predicted milk production on the measured day is less than the second set value, the original measured daily milk production is adjusted to the product of the predicted milk production on the measured day and the second set value; If the ratio of the original measured daily milk production to the predicted milk production on the measured day is greater than the first set value, the original measured daily milk production is adjusted to the product of the predicted milk production on the measured day and the first set value.
9. A system for recording, judging and correcting abnormal data of daily milk production of dairy cows, characterized in that: include: The data acquisition module is configured to: acquire the historical lactation data of the dairy cow, including the measured daily lactation days and the measured daily milk production corresponding to the measured daily lactation days; The prediction module is configured to: construct a multiple linear regression model between the milk production on the measurement day and the number of lactation days on the measurement day, determine the coefficients of the multiple linear regression model, and predict the milk production on the first measurement day and the milk production on the second and subsequent measurement days; The correction module is configured to: compare the predicted milk production on the first measurement day and the milk production on the second and subsequent measurement days with the original measurement day milk production data, determine abnormal data in the original measurement day milk production data, and correct the abnormal data.
10. Application of the method for recording, determining and correcting abnormal data of daily milk production of dairy cows according to any one of claims 1 to 8 in breeding.