Dairy cow abortion prediction method based on big data analysis
By using big data analysis and neural network model optimization, a dairy cow abortion prediction model was constructed, which solved the problem of human judgment errors, enabled efficient identification and timely adjustment of dairy cow abortions, and improved the scientific management level of dairy cow farming.
Patent Information
- Application Number
- CN202311147775.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-09-06
AI Technical Summary
In existing technologies, the judgment of abortion in dairy cows relies on human experience, which leads to a high error rate and makes it impossible to detect abortion in a timely manner, thus affecting the breeding effect of dairy cows.
By employing a big data analytics approach, a neural network model is constructed through the collection and preprocessing of big data on dairy cow abortions. Hyperparameters are initialized using convolutional neural networks and chaotic sequence mechanisms, and the model parameters are optimized by combining greedy algorithms and guided search algorithms. This process trains a dairy cow abortion prediction model, enabling the identification of factors influencing real-time dairy cow abortion.
It reduces reliance on staff experience, improves the accuracy and timeliness of dairy cow abortion prediction, enables timely adjustments to feeding programs, and reduces the risk of breeding failure.
Smart Images

Figure CN117171644B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of cow breeding, and particularly relates to a cow abortion prediction method based on big data analysis. BACKGROUND
[0002] Economical and efficient cow breeding is an important part of modern agriculture. With the increasing output of the breeding industry year by year, consumers have increasingly high quality requirements. For large-scale breeding, scientific feeding management and reasonable nutrition regulation of cows not only can reduce the occurrence of diseases, but also can promote the healthy growth of cows. However, due to the limitations of feeding management technology and conditions, symptoms such as anorexia or malnutrition often occur in cow breeding, resulting in low milk production and high disease incidence.
[0003] In the process of cow breeding, the breeding process is often involved. In order to ensure that cows can produce smoothly, artificial medication and adjustment of cow feeding schemes are often required. However, the feeding personnel need to have rich experience to judge whether the cow is in an abortion state or a normal pregnancy state, so as to accurately adjust the feeding scheme. However, artificial judgment has very high requirements for the working personnel. If the experience is weak or supervision is not careful, it may lead to judgment errors, so that the abortion state of the cow cannot be discovered in time, and finally the cow breeding fails. SUMMARY
[0004] The application provides a cow abortion prediction method based on big data analysis, which solves the problems of high experience requirement and high error rate in the prior art for judging the state of cows by artificial means.
[0005] A cow abortion prediction method based on big data analysis, comprising:
[0006] Collecting cow abortion big data, and preprocessing the cow abortion big data to obtain training data; the cow abortion big data includes cow abortion influencing factors and historical cow abortion states;
[0007] A neural network model is used to construct a cow abortion prediction model, and the hyperparameters of the cow abortion prediction model are initialized to obtain a parameter vector. Multiple parameter vectors of the cow abortion prediction model are repeatedly generated, and the fitness value of each parameter vector is obtained according to the training data;
[0008] All the parameter vectors are randomly grouped according to the initial set number to obtain multiple parameter groups, and the global optimal vector in all the parameter vectors and the group optimal vector in each parameter group are determined according to the fitness value of each parameter vector;
[0009] On the basis of the global optimal vector and the group optimal vector in each parameter group, the parameter vectors in each parameter group are updated to obtain updated parameter groups;
[0010] For the group worst vector in the updated parameter group, a guided search algorithm is used to update the group worst vector again to obtain a second updated parameter group;
[0011] When the second updated parameter group does not meet the preset condition, the step of random grouping is returned; when the second updated parameter group meets the preset condition, the global optimal vector is reacquired, and the global optimal vector is taken as the final hyperparameter of the dairy cow abortion prediction model to obtain the trained dairy cow abortion prediction model;
[0012] Real-time dairy cow abortion influencing factors are collected and preprocessed to obtain input data, and the trained dairy cow abortion prediction model is used to identify the input data to obtain a dairy cow abortion prediction result.
[0013] Further, dairy cow abortion big data is collected and preprocessed to obtain training data, including:
[0014] The dairy cow abortion big data includes dairy cow abortion influencing factors and historical dairy cow abortion states, and the dairy cow abortion influencing factors at least include a time series of the feeding amount of the dairy cow, a time series of the number of times the dairy cow gets up and lies down, a time series of the number of times the dairy cow estrus, a time series of the dairy cow movement data, a time series of the dairy cow respiratory data, and a time series of the dairy cow pulse; the historical dairy cow abortion states include dairy cow abortion states and normal states of the dairy cow; the dairy cow abortion states are used to represent that the dairy cow has aborted under the action of the dairy cow abortion influencing factors.
[0015] The dairy cow abortion big data is normalized to obtain normalized dairy cow abortion influencing factors, and the normalized dairy cow abortion influencing factors and historical dairy cow abortion states are collectively used as training data.
[0016] Further, a neural network model is used to construct a dairy cow abortion prediction model, and the hyperparameters of the dairy cow abortion prediction model are initialized to obtain a parameter vector, including:
[0017] A convolutional neural network is used to construct a dairy cow abortion prediction model, and a chaotic sequence mechanism is used to initialize the hyperparameters of the dairy cow abortion prediction model to obtain a parameter vector.
[0018] Further, multiple parameter vectors of the dairy cow abortion prediction model are repeatedly generated, and the fitness values of each parameter vector are obtained according to the training data, including:
[0019] Multiple parameter vectors of the dairy cow abortion prediction model are repeatedly generated;
[0020] For each parameter vector, the parameters contained in the parameter vector are applied to the dairy cow abortion prediction model, and the normalized dairy cow abortion influencing factors are taken as the input of the dairy cow abortion prediction model, and the historical dairy cow abortion state corresponding to the dairy cow abortion influencing factors is taken as the expected output of the dairy cow abortion prediction model, to obtain the error function value of the dairy cow abortion prediction model.
[0021] After the error function value is added to a constant less than 0.001 and then taken as an inverse, the fitness value corresponding to the parameter vector is obtained.
[0022] Further, based on the global optimal vector and the group optimal vector in each parameter group, the parameter vectors in each parameter group are updated to obtain the updated parameter group, including:
[0023] For each parameter group, the first influencing parameter is obtained based on the global optimal vector and the group optimal vector in the parameter group.
[0024] A first target parameter vector is randomly selected from the parameter group, and the second influencing parameter is obtained according to the first target parameter vector.
[0025] According to the first influencing parameter and the second influencing parameter, each parameter vector in the parameter group is updated to obtain the updated parameter group.
[0026] Further, the first influencing parameter obtained based on the global optimal vector and the group optimal vector in the parameter group is:
[0027] α=ω1*X g +(1-ω1)*X b
[0028] Wherein, α represents the first influencing parameter, ω1 represents a random number between (0, 1), X g represents the global optimal vector, X b represents the group optimal vector in the parameter group.
[0029] Further, the first target parameter vector is randomly selected from the parameter group, and the second influencing parameter is obtained according to the first target parameter vector:
[0030] β=ω2*γ+(1-ω2)*X r1
[0031]
[0032] Wherein, β represents the second influencing parameter, ω2 represents a random number between (0, 1), γ represents an intermediate parameter, X r1 represents the first target parameter vector randomly selected from the parameter group, represents a vector composed of the median array of each dimension parameter.
[0033] Further, according to the first influence parameter and the second influence parameter, each parameter vector in the parameter group is updated to obtain an updated parameter group, including:
[0034] randomly selecting a second target parameter vector and a third target parameter vector from the parameter group;
[0035] According to the second target parameter vector and the first influence parameter, a first updated parameter vector is obtained as:
[0036] δ1 = α - X r2
[0037] wherein, δ1 represents the first updated parameter vector, X r2 represents the second target parameter vector;
[0038] According to the third target parameter vector and the second influence parameter, a second updated parameter vector is obtained as:
[0039] δ2 = β - X r3
[0040] wherein, δ2 represents the second updated parameter vector, X r3 represents the third target parameter vector;
[0041] According to the first updated parameter vector and the second updated parameter vector, each parameter vector in the parameter group is updated as:
[0042] X c_new = X c + R1 * δ1 + R2 * δ2
[0043] wherein, X c represents the parameter vector to be updated in the parameter group, X c_new represents the updated X c , R1 represents a random number between 0 and 1, and R2 represents a random number between 0 and 1.
[0044] The parameter vector X c_new and the parameter vector X c are selected by using a greedy algorithm to obtain an updated parameter group.
[0045] Further, for the group worst vector in the updated parameter group, a guided search algorithm is used to update the group worst vector again to obtain a twice-updated parameter group, including:
[0046] reacquiring the global optimal vector and the group optimal vector in the parameter group;
[0047] For the group worst vector in the updated parameter group, the group optimal vector is used to guide the update of the group worst vector as follows:
[0048] X w_new = X w + R3*(X b - X w )
[0049] wherein X w represents the group worst vector, R3 represents a random number between 0 and 1, X w_new represents the updated X w ;
[0050] It is judged whether the fitness value of the parameter vector X w new is greater than the fitness value of the group worst vector X w , if yes, the update is received, and a twice-updated parameter group is obtained, otherwise the update is rejected, and the group worst vector is guided to update by using the global optimal vector;
[0051] The group worst vector is guided to update by using the global optimal vector as follows:
[0052] X w_new = X w + R3*(X g - X w )
[0053] It is judged whether the fitness value of the parameter vector X w_new is greater than the fitness value of the group worst vector X w , if yes, the update is received, and a twice-updated parameter group is obtained, otherwise the update is rejected, and a new parameter vector is randomly generated, the group worst vector X w is replaced by the new parameter vector, and a twice-updated parameter group is obtained.
[0054] Further, when the twice-updated parameter group meets a preset condition, the global optimal vector is reacquired, and the global optimal vector is taken as the final hyperparameter of the dairy cow abortion prediction model, and a trained dairy cow abortion prediction model is obtained, including:
[0055] It is judged whether there is a parameter vector whose fitness value is greater than a set threshold or whether the training number reaches a maximum number, if yes, the global optimal vector is reacquired, and the global optimal vector is taken as the final hyperparameter of the dairy cow abortion prediction model, and a trained dairy cow abortion prediction model is obtained, otherwise the training is continued.
[0056] The milk cow abortion prediction method based on big data analysis provided by the application collects milk cow big data, uses the fact behaviors that have occurred as training data, trains a machine learning model, and thus obtains a milk cow abortion prediction model with recognition ability, so that subsequent staff can directly collect real-time milk cow abortion influencing factors, identify the real-time milk cow abortion influencing factors through the milk cow abortion prediction model, and thus obtain a milk cow abortion prediction result, so that the staff can diagnose or adjust the feeding scheme in a timely manner according to the milk cow abortion prediction result, and the experience requirement for the staff is effectively reduced. BRIEF DESCRIPTION OF DRAWINGS
[0057] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0058] Figure 1 A flowchart of a milk cow abortion prediction method based on big data analysis provided by the embodiment of the application.
[0059] Through the above drawings, the specific embodiments of the application have been shown, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0060] The exemplary embodiments will be described in detail hereinbelow with reference to the drawings. Where the description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise noted. The embodiments described in the following exemplary embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0061] Embodiments of the application will be described below in detail with reference to the drawings.
[0062] As Figure 1 shown, a milk cow abortion prediction method based on big data analysis comprises:
[0063] S101, collect milk cow abortion big data, and pre-process the milk cow abortion big data to obtain training data; the milk cow abortion big data comprises milk cow abortion influencing factors and historical milk cow abortion states.
[0064] The milk cow abortion big data can be historical data pre-stored in a database. By collecting historical data and learning potential relationships in the historical data, accurate prediction of milk cow abortion can be achieved.
[0065] Optionally, the large data of cow abortion can be preprocessed, such as deduplication processing, normalization processing, and the like. The influencing factors of cow abortion can include the food intake, exercise amount, or other parameters to be detected.
[0066] In S102, a neural network model is used to construct a cow abortion prediction model, and hyperparameters of the cow abortion prediction model are initialized to obtain a parameter vector. Multiple parameter vectors of the cow abortion prediction model are repeatedly generated, and fitness values of each parameter vector are obtained according to training data. The parameter vector represents a vector composed of all hyperparameters of the cow abortion prediction model.
[0067] The influencing factors of cow abortion include various factors and data of each factor at continuous time points, so the influencing factors of cow abortion can be regarded as a matrix. Therefore, a convolutional neural network can be used to construct a cow abortion prediction model. It should be noted that the convolutional neural network is only a preferred solution of the embodiment, and other classification neural networks can also be used as the cow abortion prediction model to identify the influencing factors of cow abortion.
[0068] In S103, all parameter vectors are randomly grouped according to an initial setting number to obtain multiple parameter groups. According to the fitness values of each parameter vector, a global optimal vector in all parameter vectors and a group optimal vector in each parameter group are determined.
[0069] When all parameter vectors are updated in a group, it is easy to fall into local optimization. Therefore, the grouping strategy is used in the embodiment to divide all parameter vectors into multiple parameter groups, and each parameter group is updated respectively. The overall position of each parameter group is different, which is more conducive to global search while maintaining local search, thereby achieving better training effect than the prior art.
[0070] In S104, the parameter vectors in each parameter group are updated based on the global optimal vector and the group optimal vector in each parameter group to obtain updated parameter groups.
[0071] The global optimal vector and the group optimal vector are both relatively optimal positions in the current training process. Through guided updating of the two, each parameter group can be updated as a whole to a better position.
[0072] Optionally, to ensure the training effect, a greedy algorithm or an elite selection strategy can be used for training to ensure that the position is advanced to a better position.
[0073] In S105, a guided search algorithm is used to perform secondary updating on the group worst vector in the updated parameter group to obtain a secondary updated parameter group.
[0074] By updating the worst vector of the group, the influence of the long-term non-evolutionary poor solution on the overall update can be avoided, the training speed can be improved, and there is a certain probability that the local optimum can be jumped out.
[0075] S106, when the second updated parameter group does not meet the preset condition, return to the random grouping step, that is, step S103;When the second updated parameter group meets the preset condition, the global optimal vector is reacquired, and the global optimal vector is used as the final hyperparameter of the dairy cow abortion prediction model, and the trained dairy cow abortion prediction model is obtained.
[0076] Optionally, the preset condition can be an adaptability threshold, when the adaptability corresponding to a certain parameter vector is greater than the adaptability threshold, it can be considered that the training is completed, thereby obtaining the trained dairy cow abortion prediction model. Of course, the preset condition can also be set as other conditions.
[0077] S107, collecting real-time dairy cow abortion influencing factors, preprocessing the real-time dairy cow abortion influencing factors, obtaining input data, and using the trained dairy cow abortion prediction model to identify the input data, obtaining the dairy cow abortion prediction result.
[0078] It is worth noting that the format and data length of the real-time dairy cow abortion influencing factors need to be the same as the dairy cow abortion big data, to ensure the consistency of the input data, thereby realizing accurate identification.
[0079] The dairy cow abortion prediction method based on big data analysis provided by the present application collects dairy cow big data, uses the fact behavior that has occurred as training data, trains the machine learning model, and obtains a dairy cow abortion prediction model with identification ability, so that the staff can subsequently collect real-time dairy cow abortion influencing factors, and identify the real-time dairy cow abortion influencing factors through the dairy cow abortion prediction model, thereby obtaining the dairy cow abortion prediction result, so that the staff can diagnose or adjust the feeding scheme according to the dairy cow abortion prediction result, effectively reducing the experience requirement of the staff.
[0080] In the present embodiment, the dairy cow abortion big data is collected and preprocessed, and the training data is obtained, including:
[0081] Collecting cow abortion big data, the cow abortion big data including cow abortion influencing factors and historical cow abortion states, the cow abortion influencing factors at least including a feeding amount time sequence of the cow, a lying and standing number time sequence of the cow, a heat number time sequence of the cow, a motion data time sequence of the cow, a breathing data time sequence of the cow and a pulse time sequence of the cow; the historical cow abortion states including a cow abortion state and a cow normal state; the cow abortion state is used to represent that the cow has aborted under the action of the cow abortion influencing factors.
[0082] The time sequence represents a data sequence collected at a plurality of continuous time points, and the interval between any two adjacent time points is the same.
[0083] The feeding amount time sequence, the lying and standing number time sequence of the cow, the heat number time sequence of the cow, the motion data time sequence of the cow, the breathing data time sequence of the cow and the pulse time sequence of the cow can each be taken as a row of data, and then zero is filled behind to form a fixed-size matrix, so as to be recognized by the convolutional neural network.
[0084] For example, four hours can be taken as a collection period, the feeding amount within each four hours as the feeding amount of a time point, the lying and standing number within each four hours as the lying and standing number of a time point, the heat number within each four hours as the heat number of a time point, the motion amount (such as the step number or the motion time) within each four hours as the heat number of a time point, the breathing number within each four hours as the breathing number of a time point, and the pulse number within each four hours as the pulse number of a time point. It can be seen that the parameters collected in the embodiment are all related to the physiological characteristics and behavior characteristics of the cow when the cow aborts or is about to abort, so the cow abortion can be predicted based on these data.
[0085] Optionally, except that the heat number of the cow needs to be monitored by a person, the others can be measured by a sensor, if the person cannot realize regular monitoring, the data can be removed, although the prediction effect is reduced, but does not affect the prediction.
[0086] The cow abortion big data is normalized to obtain normalized cow abortion influencing factors, and the normalized cow abortion influencing factors and the historical cow abortion states are collectively used as training data.
[0087] In the embodiment, a neural network model is used to construct a cow abortion prediction model, and the hyperparameters of the cow abortion prediction model are initialized to obtain a parameter vector, including:
[0088] A convolutional neural network is used to construct a cow abortion prediction model, and the hyperparameters of the cow abortion prediction model are initialized by using a chaotic sequence mechanism to obtain a parameter vector.
[0089] In the embodiment, the trained hyperparameters are mainly weight parameters and bias parameters. In addition to initializing the hyperparameters of the cow abortion prediction model by using the chaotic sequence mechanism, the hyperparameters can also be generated by using the random initialization method.
[0090] In the embodiment, the parameter vectors of the plurality of cow abortion prediction models are repeatedly generated, and the fitness values of each parameter vector are obtained according to the training data, including:
[0091] The parameter vectors of the plurality of cow abortion prediction models are repeatedly generated.
[0092] For each parameter vector, the parameters contained in the parameter vector are applied to the cow abortion prediction model, the normalized cow abortion influencing factors are taken as the input of the cow abortion prediction model, and the historical cow abortion states corresponding to the cow abortion influencing factors are taken as the expected output of the cow abortion prediction model, so as to obtain the error function value of the cow abortion prediction model.
[0093] After the error function value is added to a constant less than 0.001 and then taken as the reciprocal, the fitness value corresponding to the parameter vector is obtained.
[0094] It should be noted that the fitness value is mainly used to measure the advantages and disadvantages of the parameter vector, and therefore other methods can also be used to obtain the fitness value.
[0095] In the embodiment, the parameters in each parameter group are updated based on the global optimal vector and the group optimal vector in each parameter group, to obtain an updated parameter group, including:
[0096] For each parameter group, the first influence parameter is obtained based on the global optimal vector and the group optimal vector in the parameter group.
[0097] The first target parameter vector is randomly selected from the parameter group, and the second influence parameter is obtained according to the first target parameter vector.
[0098] Each parameter vector in the parameter group is updated according to the first influence parameter and the second influence parameter, to obtain an updated parameter group.
[0099] In the embodiment, the first influence parameter is obtained based on the global optimal vector and the group optimal vector in the parameter group.
[0100] α = ω1 * X g + (1-ω1) * X b
[0101] wherein, α represents the first influence parameter, ω1 represents a random number between 0 and 1, X grepresents a global optimal vector, X b represents a group optimal vector in the parameter group.
[0102] In this embodiment, the first influence parameter has a global guiding effect and a local guiding effect, so that the algorithm tends to the global optimal solution faster, and the convergence speed of the algorithm is improved. In the updating process of the parameter vector, the optimal ability can be ensured, and the characteristics of generating new solutions can be maintained.
[0103] In this embodiment, a first target parameter vector is randomly selected from the parameter group, and a second influence parameter is obtained according to the first target parameter vector.
[0104] β = ω2 * γ + (1- ω2) * X r1
[0105]
[0106] Wherein, β represents the second influence parameter, ω2 represents a random number between 0 and 1, γ represents the intermediate parameter, X r1 represents a first target parameter vector randomly selected from the parameter group, represents a vector composed of the median array of each dimension parameter.
[0107] The second influence parameter is obtained through the group overall position and the random parameter vector, which can effectively enhance the global search ability of the algorithm.
[0108] In this embodiment, according to the first influence parameter and the second influence parameter, each parameter vector in the parameter group is updated to obtain an updated parameter group, including:
[0109] A second target parameter vector and a third target parameter vector are randomly selected from the parameter group;
[0110] According to the second target parameter vector and the first influence parameter, a first updated parameter vector is obtained as:
[0111] δ1 = α - X r2
[0112] Wherein, δ1 represents the first updated parameter vector, X r2 represents the second target parameter vector;
[0113] According to the third target parameter vector and the second influence parameter, a second updated parameter vector is obtained as:
[0114] δ2 = β - X r3
[0115] Wherein, δ2 represents the second updated parameter vector, X r3 represents the third target parameter vector;
[0116] According to the first update parameter vector and the second update parameter vector, each parameter vector in the parameter group is updated as:
[0117] X c_new = X c + R1*delta1 + R2*delta2
[0118] wherein, X c represents a parameter vector to be updated in the parameter group, X c_new represents the updated X c , R1 represents a random number between (0, 1), and R2 represents a random number between (0, 1).
[0119] In the embodiment, each parameter vector in the parameter group is updated by the first influence parameter and the second influence parameter, which can take into account local search and global search, and produce better training effect.
[0120] The greedy algorithm is used to select the parameter vector X c_new and the parameter vector X c , and obtain the updated parameter group. That is, the parameter vector with large fitness is retained.
[0121] In the embodiment, the guided search algorithm is used to update the group worst vector in the updated parameter group, and the twice updated parameter group is obtained, including:
[0122] The global optimal vector and the group optimal vector in the parameter group are reacquired;
[0123] The group optimal vector is used to guide the update of the group worst vector in the updated parameter group as:
[0124] X w_new = X w + R3*(X b -X w )
[0125] wherein, X w represents the group worst vector, R3 represents a random number between (0, 1), and X w new represents the updated X w ;
[0126] It is judged whether the fitness value of the parameter vector X w_new is greater than the fitness value of the group worst vector X w , if yes, the update is received, and the twice updated parameter group is obtained, otherwise, the update is rejected, and the group worst vector is guided to update by the global optimal vector;
[0127] The global optimal vector is used to guide the update of the group worst vector as follows:
[0128] X w_new = X w + R3*(X g - X w )
[0129] It is determined whether the fitness value of the parameter vector X w_new is greater than the fitness value of the group worst vector X w . If yes, the update is received, and a twice-updated parameter group is obtained. Otherwise, the update is rejected, a new parameter vector is randomly generated, the new parameter vector is used to replace the group worst vector X w , and a twice-updated parameter group is obtained.
[0130] In this embodiment, when the twice-updated parameter group meets a preset condition, the global optimal vector is reacquired, and the global optimal vector is used as the final hyperparameter of the dairy cow abortion prediction model, so that the trained dairy cow abortion prediction model is obtained, including:
[0131] It is determined whether there is a parameter vector whose fitness value is greater than a set threshold or whether the number of training times reaches a maximum number. If yes, the global optimal vector is reacquired, and the global optimal vector is used as the final hyperparameter of the dairy cow abortion prediction model, so that the trained dairy cow abortion prediction model is obtained. Otherwise, the training is continued.
[0132] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The application is intended to cover any variations, uses or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains.
[0133] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the application is limited only by the claims that follow.
Claims
1. A method for predicting abortion in dairy cows based on big data analysis, characterized in that, include: Collect big data on cow abortion and preprocess it to obtain training data; the big data on cow abortion includes factors influencing cow abortion and historical abortion status of cows. A neural network model was used to construct a cow abortion prediction model, and the hyperparameters of the cow abortion prediction model were initialized to obtain a parameter vector. Multiple parameter vectors of the cow abortion prediction model were generated repeatedly, and the fitness value of each parameter vector was obtained based on the training data. All parameter vectors are randomly grouped according to the initial set number to obtain multiple parameter groups. Based on the fitness value of each parameter vector, the global optimal vector among all parameter vectors and the group optimal vector in each parameter group are determined. Based on the global optimal vector and the group optimal vector in each parameter group, the parameter vector in each parameter group is updated to obtain the updated parameter group; For the worst-case vector in the updated parameter set, a guided search algorithm is used to update the worst-case vector a second time to obtain the parameter set after the second update. If the parameter group after the second update does not meet the preset conditions, then return to the random grouping step; When the parameter set after the second update meets the preset conditions, the global optimal vector is obtained again, and the global optimal vector is used as the final hyperparameter of the cow abortion prediction model to obtain the trained cow abortion prediction model. Real-time factors influencing abortion in dairy cows were collected and preprocessed to obtain input data. The trained abortion prediction model was then used to identify the input data and obtain the abortion prediction results. Based on the global optimal vector and the group optimal vector in each parameter group, the parameter vectors in each parameter group are updated to obtain the updated parameter groups, including: For each parameter group, the first influencing parameter is obtained based on the global optimal vector and the group optimal vector in the parameter group; Randomly select a first target parameter vector from the parameter set, and obtain the second influencing parameter based on the first target parameter vector; Based on the first and second influencing parameters, each parameter vector in the parameter group is updated to obtain the updated parameter group. Based on the global optimal vector and the group optimal vector in the parameter set, the first influencing parameter is obtained as follows: α=ω1*X g +(1-ω1)*X b Where α represents the first influencing parameter, ω1 represents a random number between (0,1), and X g Let X represent the globally optimal vector. b This represents the optimal vector of the group in the parameter set; A first target parameter vector is randomly selected from the parameter set, and based on the first target parameter vector, the second influencing parameter is obtained as follows: β=ω2*γ+(1-ω2)*X r1 Where β represents the second influencing parameter, ω2 represents a random number between (0,1), γ represents the intermediate parameter, and X r1 This represents the first target parameter vector randomly selected from the parameter set. A vector representing the median of each dimension parameter; Based on the first and second influencing parameters, each parameter vector in the parameter set is updated to obtain the updated parameter set, including: Randomly select the second and third target parameter vectors from the parameter set; Based on the second target parameter vector and the first influence parameter, the first update parameter vector is obtained as follows: δ1=α-X r2 Where δ1 represents the first update parameter vector, X r2 Represents the second objective parameter vector; Based on the third objective parameter vector and the second influence parameter, the second update parameter vector is obtained as follows: δ2=β-X r3 Where δ2 represents the second update parameter vector, X r3 Represents the third objective parameter vector; Based on the first and second updated parameter vectors, each parameter vector in the parameter group is updated as follows: X c_new =X c +R1*δ1+R2*δ2 Among them, X c X represents the parameter vector to be updated in the parameter set. c_new Indicates the updated X c R1 represents a random number between (0,1), and R2 represents a random number between (0,1). A greedy algorithm is used to process the parameter vector X. c_new and parameter vector X c Make a selection and obtain the updated parameter set.
2. The method for predicting abortion in dairy cows based on big data analysis according to claim 1, characterized in that, Collect big data on cow abortions and preprocess the big data to obtain training data, including: Big data on cow abortion is collected, including factors influencing cow abortion and historical cow abortion status. The factors influencing cow abortion include time series data on cow feed intake, frequency of standing and lying down, frequency of estrus, movement, respiration, and pulse. The historical cow abortion status includes both abortion status and normal status. The abortion status is used to characterize whether a cow has aborted under the influence of these factors. The big data on dairy cow abortion was normalized to obtain the normalized factors influencing dairy cow abortion. The normalized factors influencing dairy cow abortion, together with the historical abortion status of dairy cows, were used as training data.
3. The method for predicting abortion in dairy cows based on big data analysis according to claim 2, characterized in that, A neural network model was used to construct a cow abortion prediction model, and the hyperparameters of the cow abortion prediction model were initialized to obtain a parameter vector, including: A convolutional neural network was used to construct a cow abortion prediction model, and a chaotic sequence mechanism was used to initialize the hyperparameters of the cow abortion prediction model to obtain the parameter vector.
4. The method for predicting abortion in dairy cows based on big data analysis according to claim 3, characterized in that, Multiple parameter vectors for cow abortion prediction models are repeatedly generated, and the fitness value of each parameter vector is obtained based on the training data, including: Repeatedly generate parameter vectors for multiple dairy cow abortion prediction models; For each parameter vector, the parameters contained in the parameter vector are applied to the dairy cow abortion prediction model. The normalized dairy cow abortion influencing factors are used as the input of the dairy cow abortion prediction model, and the historical dairy cow abortion status corresponding to the dairy cow abortion influencing factors is used as the expected output of the dairy cow abortion prediction model to obtain the error function value of the dairy cow abortion prediction model. Add the error function value to a constant less than 0.001, and take the reciprocal to obtain the fitness value corresponding to the parameter vector.
5. The method for predicting abortion in dairy cows based on big data analysis according to claim 1, characterized in that, For the worst-case vector in the updated parameter set, a guided search algorithm is used to perform a second update on the worst-case vector, resulting in the updated parameter set, including: Reacquire the globally optimal vector and the group optimal vector in the parameter set; For the worst-case vector in the updated parameter set, the best-case vector is used to guide the update of the worst-case vector as follows: X w_new =X w +R3*(X b -X w ) Among them, X w Let X represent the worst-case vector, R3 represent random numbers between (0,1), and X represent the worst-case vector. w_new Indicates the updated X w ; Determine the parameter vector X w_new Is the fitness value greater than the worst-case vector X of the group? w If the fitness value is positive, the update is accepted and the parameter set is updated twice; otherwise, the update is rejected and the worst vector in the set is guided to be updated using the globally optimal vector. The worst vector in the group is updated by using the globally optimal vector as a guide: X w_new =X w +R3*(X g -X w ) Determine the parameter vector X w_new Is the fitness value greater than the worst-case vector X of the group? w If the fitness value is positive, the update is accepted, and the parameter set is updated twice; otherwise, the update is rejected, and a new parameter vector is randomly generated to replace the worst-case vector X in the set. w This yields the parameter set after the second update.
6. The method for predicting abortion in dairy cows based on big data analysis according to claim 5, characterized in that, When the updated parameter set meets the preset conditions, the globally optimal vector is re-obtained and used as the final hyperparameter of the cow abortion prediction model, resulting in the trained cow abortion prediction model, including: Determine whether the fitness value of the parameter vector is greater than the set threshold or whether the training count has reached the maximum. If so, re-obtain the global optimal vector and use it as the final hyperparameter of the cow abortion prediction model to obtain the trained cow abortion prediction model; otherwise, continue training.
Citation Information
Patent Citations
Short-term power load prediction method and device based on chaos sparrow search algorithm
CN114372408A
Sheep reproductive health early warning system and method
CN116071783A
Patient safety monitoring system based on Internet hospital
CN116649904A