A method and apparatus for the optimum breeding of livestock
By using a graph neural network model to intelligently select male and female livestock, the problem of low selection accuracy in existing technologies has been solved, the efficiency of genetic progress has been improved, and the cost has been reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN NEW HOPE ANIMAL NUTRITION TECH CO LTD
- Filing Date
- 2022-02-15
- Publication Date
- 2026-05-22
AI Technical Summary
Current technology cannot automatically match the best male animal to the female animal based on the selection criteria, resulting in low accuracy of eugenic selection and low efficiency of genetic progress.
A graph neural network model is used to generate comprehensive index values by acquiring breeding information of male and female livestock, establish a training set and train the model until convergence, and then intelligently select and match male and female livestock based on preset conditions.
It enables intelligent mating of male and female livestock, improves the efficiency of genetic progress, and reduces human and material costs.
Smart Images

Figure CN114511068B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of individual animal breeding, and more particularly to a method and apparatus for eugenic breeding of livestock. Background Technology
[0002] Selective mating of breeding stock is a crucial step in livestock breeding, promoting herd improvement and increasing farming efficiency. Finding the optimal sire for a breeding female ensures a better genetic makeup for offspring, allowing superior genes to combine more effectively for better results. Current technologies primarily rely on assessing physical characteristics, growth and development, reproductive performance, and age to select breeding stock. With advancements in information technology, breeding values, kinship coefficients, and inbreeding coefficients have been added as reference indicators for mating. While the number of reference indicators has increased, related technological developments in mating remain focused on calculating these indicators. For example, Bluf90, Asreml, and Dmu calculation models are only used for estimating breeding values, paternity testing, PCA analysis, and anomaly detection. The selection of the optimal sire for a breeding female still relies on ranking and filtering different indicators, lacking intelligent algorithm-based mating models or technologies. These technologies can only provide computational capabilities for selection indicators, but cannot clearly match the male animal with the best reproductive ability to mate with the breeding female. Therefore, it is still necessary to rely on manual selection based on the calculated indicators and experience to select suitable male animals, resulting in low selection accuracy and low efficiency of genetic progress. Summary of the Invention
[0003] This invention provides a method and apparatus for eugenic breeding of livestock, in order to solve the technical problem that the prior art cannot automatically match female livestock with male livestock with good breeding performance based on breeding indicators.
[0004] To address the aforementioned technical problems, embodiments of the present invention provide a method for eugenic breeding of livestock, comprising:
[0005] The breeding information of several groups of male and female livestock is obtained. The breeding information of each group of male and female livestock is used as the node feature of the male and female livestock node, and several comprehensive index values corresponding to each group of male and female livestock are generated.
[0006] According to a preset ratio, several groups of male and female livestock node characteristics and comprehensive index values are extracted, and a training set is established by combining the pedigree data in the breeding information of the extracted groups of male and female livestock.
[0007] A graph neural network model is established using the training set until the graph neural network model converges under the first preset condition.
[0008] The breeding information of the female and male livestock to be selected is input into a convergent graph neural network model to obtain the comprehensive index value of the input male and female livestock. Combined with the second preset conditions, the male livestock to be selected are mated.
[0009] As a preferred option, the selection of male livestock from the pool of potential breeding animals, in conjunction with the second preset condition, specifically involves:
[0010] When there is only one female animal to be selected for breeding, the male animal with the highest comprehensive index value corresponding to the female animal is selected for mating. Specifically:
[0011] For female animal x, the comprehensive index value of the selected male animal is:
[0012] max(f(x,y i )), y i ∈Y;
[0013] Where x is the female animal, y i Let i be the male animal, Y be the male animal to be selected for breeding, and f(x, y) i () represents the combined index value of the male and female livestock.
[0014] Simultaneously, the following conditions must be met:
[0015] 0.5·A(x, yi)≤a;
[0016] A(x, p) i )≤β;
[0017] T(x, y) i ) = 1;
[0018] p i ∈P[y i ];
[0019] Where A is the kinship correlation coefficient matrix, a is the inbreeding coefficient of the offspring of the selected male and female animals, β is the kinship correlation coefficient between the female animal and the mated female animals of the selected male, and p i For the selected male animal numbered i, P[y i [ ] represents all female animals assigned to the selected male animals, and T is the matrix relating the expected estrus time of the female animals to the time when semen can be collected from the male animals;
[0020] Among them, when T 采精 ≤T 发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 1;
[0021] When T is not met 采精 ≤T 发情 ≤T 采精 +T 精液保存期At that time, T(x, y) = 0.
[0022] As a preferred embodiment, the step of selecting mates from the male livestock to be bred, in conjunction with the second preset conditions, further includes:
[0023] When there are two or more female animals to be selected for breeding, for any one of them, a male animal that meets the third preset condition is selected for mating. The third preset condition is as follows:
[0024] For all female livestock X and male livestock Y to be selected for breeding, the comprehensive index values corresponding to the selected female and male livestock are as follows:
[0025] max(∑f(x,y)),x∈X,y∈Y;
[0026] Where x represents female livestock, y represents male livestock, and f(x, y) is the combined index value of male and female livestock input;
[0027] Simultaneously, the following conditions must be met:
[0028] 0.5·A(x,y)≤a;
[0029] A(x, P) y )≤β;
[0030] T(x, y) = 1;
[0031] U y >0, M x =1;
[0032] Where A is the kinship correlation coefficient matrix, a is the inbreeding coefficient of the offspring of the selected male and female animals, β is the kinship correlation coefficient between the female animal and the mated female animals of the selected male, and P y Let P be a list of all female animals that have been mated with each male animal y corresponding to each element of the list, T be a matrix showing the relationship between the expected estrus time of the female animals and the time when semen can be collected from the male animals, and U be a list of female animals that have been mated with each male animal. y For each element in list U, M represents the remaining allocable quota for the male animal y. x For each element in list M, represent the breeding status of the female animal;
[0033] Where, when M x =1, then the female animal can breed;
[0034] When M x =0, then the female animal cannot breed;
[0035] When T 采精 ≤T 发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 1;
[0036] When T is not met 采精 ≤T发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 0.
[0037] As a preferred embodiment, the generation of several comprehensive index values corresponding one-to-one with each group of male and female livestock is specifically as follows:
[0038] Based on the preset business standards and combined with the breeding information of each group of male and female livestock, a weighted sum of the first breeding indicators corresponding to each group of male and female livestock is generated, and the weighted sum is used as the comprehensive indicator value; wherein, the first breeding indicator includes the number of breeding litters, the number of healthy breeding piglets, the number of weaned piglets, and the weaning litter weight.
[0039] As a preferred embodiment, the step of establishing a graph neural network model using the training set specifically involves: extracting several groups of male and female animal nodes from the training set, obtaining the corresponding neighbor nodes at a predetermined number of upward layers and the corresponding breeding information, and establishing a graph neural network model.
[0040] As a preferred embodiment, the first preset condition is: the loss function of the graph neural network model is less than a first preset value, or the change in the loss function of the graph neural network model is less than a second preset value.
[0041] As a preferred embodiment, before establishing the graph neural network model using the training set, the method further includes: establishing a test set using pedigree data, node features, and comprehensive index values from the breeding information of unextracted male and female livestock; the test set is used to repeatedly test the test accuracy of the converged graph neural network model after the graph neural network model has converged under preset conditions, and the tested graph neural network model ends training when the test accuracy meets the preset business standard.
[0042] As a preferred embodiment, before establishing the training set, the method further includes: converting the pedigree data into a directed graph and generating a corresponding adjacency matrix; cleaning and normalizing the node features of the extracted groups of male and female livestock; concatenating the adjacency matrix and the normalized node features as data input; and using the comprehensive index values of the extracted groups of male and female livestock as data labels.
[0043] As a preferred embodiment, the breeding information includes pedigree tables, records, breeding index tables, breeding value tables, semen collection tables, strains, breeding index tables, breeding value tables, number of breeding litters, number of healthy breeding piglets, number of weaned piglets, and weaning litter weight.
[0044] Accordingly, the present invention also provides a livestock eugenics and mating device, comprising a generation module, a training set establishment module, a model establishment module, and a mating module; wherein,
[0045] The generation module is used to obtain the breeding information of several groups of male and female livestock, take the breeding information of each group of male and female livestock as the node feature of the male and female livestock node, and generate several comprehensive index values that correspond one-to-one with each group of male and female livestock.
[0046] The training set establishment module is used to extract the node features and comprehensive index values of several groups of male and female livestock according to a preset ratio, and combine them with the pedigree data in the breeding information of the extracted groups of male and female livestock to establish a training set.
[0047] The model building module is used to build a graph neural network model using the training set until the graph neural network model converges under the first preset condition.
[0048] The selection module is used to input the breeding information of the female and male livestock to be selected into a convergent graph neural network model to obtain the comprehensive index value of the input male and female livestock, and select and mate them from the male livestock to be selected in combination with the second preset conditions.
[0049] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0050] This invention provides a method and apparatus for eugenic selection and mating of livestock. The method includes: acquiring breeding information of several groups of male and female livestock; using the breeding information of each group of male and female livestock as node features of male and female livestock nodes; generating several comprehensive index values corresponding one-to-one with each group of male and female livestock; extracting node features and comprehensive index values of several groups of male and female livestock according to a preset ratio; and establishing a training set by combining the pedigree data in the extracted breeding information of several groups of male and female livestock; establishing a graph neural network model through the training set until the graph neural network model converges under a first preset condition; inputting the breeding information of female livestock and male livestock to be selected into the converged graph neural network model to obtain the input comprehensive index values of male and female livestock; and selecting and mating from the male livestock to be selected under a second preset condition. Compared with existing technologies, this invention inputs the breeding information of male and female livestock into a trained graph neural network model to intelligently obtain the optimal mating results of male and female livestock, rather than being limited to the calculation of breeding indicators. It replaces the step of manually selecting and mating based on breeding indicators and experience, and has higher genetic progress efficiency and lower human and material costs. Attached Figure Description
[0051] Figure 1 : A schematic flowchart of an embodiment of a method for eugenic breeding of livestock provided by the present invention.
[0052] Figure 2 : A schematic diagram of one embodiment of a livestock eugenics and mating device provided by the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] Example 1:
[0055] Please refer to Figure 1 , Figure 1 A method for eugenic breeding of livestock provided in an embodiment of the present invention includes steps S1 to S4; wherein,
[0056] Step S1: Obtain the breeding information of several groups of male and female livestock, use the breeding information of each group of male and female livestock as the node feature of the male and female livestock node, and generate several comprehensive index values that correspond one-to-one with each group of male and female livestock.
[0057] In this embodiment, raw data such as pedigree tables, records, breeding index tables, breeding value tables, and semen collection tables of female and male livestock are obtained from the company's big data system. Breeding information is extracted from this data, including breeding information for both male and female livestock (including but not limited to breeds, breeding index tables, breeding value tables, litter size, number of healthy piglets, number of weaned piglets, and weaning litter weight).
[0058] Based on the preset business standards and combined with the breeding information of each group of male and female livestock, a weighted sum of the first breeding indicators corresponding to each group of male and female livestock is generated, and the weighted sum is used as the comprehensive indicator value; wherein, the first breeding indicators include, but are not limited to, the number of breeding litters, the number of healthy breeding piglets, the number of weaned piglets, and the weaning litter weight.
[0059] Step S2: Extract node characteristics and comprehensive index values of several groups of male and female livestock according to a preset ratio, and combine them with pedigree data from the breeding information of the extracted groups of male and female livestock to establish a training set.
[0060] In this embodiment, pedigree data of female and male animals, node characteristics of male and female animals, and comprehensive breeding indicators are read and preprocessed. The data is then divided into training and testing sets according to a preset ratio.
[0061] Specifically, the pedigree table is converted into a directed graph, and a corresponding adjacency matrix (v nodes, adjacency matrix size v*v) is established based on the directed graph; the breeding node characteristics and breeding results of the nodes are cleaned and normalized; the adjacency matrix and breeding node characteristics are concatenated together and loaded as data input, and the comprehensive index values of several groups of male and female livestock are used as labels.
[0062] Step S3: Using the training set, establish a graph neural network model until the graph neural network model converges under the first preset condition.
[0063] In this embodiment, the following steps are first defined: the number of layers in the input, hidden, and output modes of the model, and the number of attention heads, among other hyperparameters. A neural network model is then established based on this definition. The batch size of the model is set, and batches of breeding male and female livestock nodes are randomly sampled from the training set. The corresponding neighbor nodes at a predetermined upward layer and their corresponding breeding information (i.e., the parents, grandparents, and great-grandparents of the livestock) are obtained, along with the corresponding breeding information, and input into the model. The loss function for the model is MSE, which is the mean squared error of the predicted breeding comprehensive index and the breeding comprehensive index label for each pair of male and female livestock nodes within the batch. When the loss function of the graph neural network model is less than a first predetermined value, or when the change in the loss function of the graph neural network model is less than a second predetermined value, the graph neural network model converges, and the model parameters are saved. The accuracy of the model is tested using the test set, and training ends when the test accuracy meets the business standards.
[0064] Step S4: Input the breeding information of the female and male livestock to be bred into the converged graph neural network model to obtain the comprehensive index value of the male and female livestock. Combined with the second preset conditions, select and mate from the male livestock to be bred.
[0065] In this embodiment, as an example:
[0066] Let P be a dictionary, where each element in P corresponds to a male animal y and all the female animals that have been assigned to it are P[y] = {x}. i x j , ...}, x i x j For female animals on the selection list.
[0067] When there is only one female animal to be selected for breeding, the male animal with the highest comprehensive index value corresponding to the female animal is selected for mating. Specifically:
[0068] For female animal x, the comprehensive index value of the selected male animal is:
[0069] max(f(x,y i )), y i ∈Y;
[0070] Where x is the female animal, y i Let i be the male animal, Y be the male animal to be selected for breeding, and f(x, y) i () represents the combined index value of the male and female livestock.
[0071] Simultaneously, the following conditions must be met:
[0072] 0.5·A(x, yi)≤a;
[0073] A(x, p) i )≤β;
[0074] T(x, y) i ) = 1;
[0075] p i ∈P[y i ];
[0076] Where A is the kinship correlation coefficient matrix, a is the inbreeding coefficient of the offspring of the selected male and female animals, β is the kinship correlation coefficient between the female animal and the mated female animals of the selected male, and p i For the selected male animal numbered i, P[y i [ ] represents all female animals assigned to the selected male animals, and T is the matrix relating the expected estrus time of the female animals to the time when semen can be collected from the male animals; where a is usually constrained to 0.125 in business operations, and β is 0.25. The offspring nearest neighbor coefficient = 0.5 * A[father, mother], that is, the offspring nearest neighbor coefficient is 0.5 * the kinship correlation coefficient of the breeding parents.
[0077] Among them, when T 采精 ≤T 发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 1;
[0078] When T is not met 采精 ≤T 发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 0;
[0079] Therefore, this is a problem of finding the maximum value with constraints, and the optimal male animal to match the female animal x can be found using existing techniques such as genetic algorithms and particle swarm optimization.
[0080] As another example of this embodiment:
[0081] When there are two or more female animals to be selected for breeding, for any one of them, a male animal that meets the third preset condition is selected for mating. The third preset condition is as follows:
[0082] Let the maximum allocation quota of breeding male livestock be parameter k (k is a historical average, representing the total number of female livestock whose semen can be allocated from one male livestock. Usually k=3, a male livestock can produce about 10 units of semen per collection, and each female livestock will consume 3 units of semen, k=10 / 3=3, that is, it can be allocated to a maximum of 3 female livestock for breeding).
[0083] Given a list P, where each element in P corresponds to a male animal y and all female animals P that have been assigned to it.y ={x i x j , ...}, xi, xj∈X.
[0084] For all candidate breeding females X(x1, x2, ..., x...) n All male livestock to be selected for breeding, Y(y1, y2, ..., y2), are considered. m The comprehensive index values for the selected female and male livestock are:
[0085] max(∑f(x,y)),x∈X,y∈Y;
[0086] Where x represents female livestock, y represents male livestock, and f(x, y) is the combined index value of male and female livestock input;
[0087] Simultaneously, the following conditions must be met:
[0088] 0.5·A(x,y)≤a;
[0089] A(x, P) y )≤β;
[0090] T(x, y) = 1;
[0091] U y >0, M x =1;
[0092] Where A is the kinship correlation coefficient matrix, a is the inbreeding coefficient of the offspring of the selected male and female animals, β is the kinship correlation coefficient between the female animal and the mated female animals of the selected male, and P y Let P be a list of all female animals that have been mated with each male animal y corresponding to each element of the list, T be a matrix showing the relationship between the expected estrus time of the female animals and the time when semen can be collected from the male animals, and U be a list of female animals that have been mated with each male animal. y Let M be the remaining allocable quota for each male animal y corresponding to each element in list U, ∑U represent the total number of times all male animals can be allocated, and M be the remaining allocable quota for each male animal. x Let M represent the breeding status of the female animal corresponding to each element in the list M, and ∑M represent the total number of female animals that can be bred; where a is usually constrained to 0.125 in business operations, and β is 0.25.
[0093] Where, when M x =1 means the female animal is capable of breeding;
[0094] When M x =0 means that the female animal cannot breed;
[0095] When T 采精 ≤T 发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 1;
[0096] When T is not met采精 ≤T 发情 ≤T 采精 +T 精液保存期 At that time, T(x, y) = 0.
[0097] A global eugenics selection scheme can be obtained using a greedy algorithm. Specifically, as one implementation method:
[0098] Let s and s_ele store the results of each greedy strategy, X and Y be the candidate sets, and M and U represent the number of times each element in the candidate set can be bred.
[0099] Input the matrix R calculated by the graph neural network model, read breeding-related data such as the kinship correlation coefficient matrix A, female animal status, estrus time, male animal semen collection time, breeding status, etc., and transform the read data to initialize U, M, P, T.
[0100] Initialize element U by subtracting the number of females already allocated from the maximum allocable quota per male animal, then U... y =k - len(P y ), y∈Y; M elements are initialized to 0, and the corresponding female animals in the breeding list are set to 1, then M x =1; Read the female animals that have been bred by each male animal and complete the initialization of P; Read the status of the female animals, estrus time, and the semen collection table of the male animals and initialize T; According to the greedy selection strategy, select the male and female animals x and y with the largest breeding result in R; Determine the feasibility and whether the second preset condition is met. If it is met, update the breeding result to s and add the breeding strategy x and y to s_ele; Update the breeding counts U and M of the candidate set elements; Update the breeding female animal P corresponding to the male animal y; If it is not met, update R[x, y] to a minimum value and re-select the greedy strategy; The iteration ends when the number of mates available in either the candidate sets X and Y is 0 (∑U=0 or ∑M=0); Finally, return the results s and s_ele. s_ele represents the list of livestock breeding allocations for the optimal mating scheme, and s represents the breeding result according to this scheme.
[0101] It should be noted that the first example in this embodiment refers to the case of a single female animal, that is, selecting the optimal male animal based on a single female animal. The second example refers to the global selection and mating of the livestock population, achieving a global selection and mating optimization effect and improving the efficiency of genetic progress.
[0102] Accordingly, the present invention also provides a livestock eugenics and mating device, comprising a generation module 101, a training set establishment module 102, a model establishment module 103, and a mating selection module 104; wherein,
[0103] The generation module 101 is used to obtain the breeding information of several groups of male and female livestock, take the breeding information of each group of male and female livestock as the node feature of the male and female livestock node, and generate several comprehensive index values that correspond one-to-one with each group of male and female livestock.
[0104] The training set establishment module 102 is used to extract the node features and comprehensive index values of several groups of male and female livestock according to a preset ratio, and combine them with the pedigree data in the breeding information of the extracted groups of male and female livestock to establish a training set.
[0105] The model building module 103 is used to build a graph neural network model using the training set until the graph neural network model converges under the first preset condition.
[0106] The selection module 104 is used to input the breeding information of the female livestock to be selected and the breeding information of the male livestock to be selected into a converged graph neural network model, obtain the comprehensive index value of the input male and female livestock, and select and mate from the male livestock to be selected in combination with the second preset conditions.
[0107] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0108] This invention provides a method and apparatus for eugenic selection and mating of livestock. The method includes: acquiring breeding information of several groups of male and female livestock; using the breeding information of each group of male and female livestock as node features of male and female livestock nodes; generating several comprehensive index values corresponding one-to-one with each group of male and female livestock; extracting node features and comprehensive index values of several groups of male and female livestock according to a preset ratio; and establishing a training set by combining the pedigree data in the extracted breeding information of several groups of male and female livestock; establishing a graph neural network model through the training set until the graph neural network model converges under a first preset condition; inputting the breeding information of female livestock and male livestock to be selected into the converged graph neural network model to obtain the input comprehensive index values of male and female livestock; and selecting and mating from the male livestock to be selected under a second preset condition. Compared with existing technologies, this invention inputs the breeding information of male and female livestock into a trained graph neural network model to intelligently obtain the optimal mating results of male and female livestock, rather than being limited to the calculation of breeding indicators. It replaces the step of manually selecting and mating based on breeding indicators and experience, and has higher genetic progress efficiency and lower human and material costs.
[0109] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for eugenic breeding of livestock, characterized in that, include: The breeding information of several groups of male and female livestock is obtained. The breeding information of each group of male and female livestock is used as the node feature of the male and female livestock node, and several comprehensive index values corresponding to each group of male and female livestock are generated. According to a preset ratio, several groups of male and female livestock node characteristics and comprehensive index values are extracted, and a training set is established by combining the pedigree data in the breeding information of the extracted groups of male and female livestock. A graph neural network model is established using the training set until the graph neural network model converges under the first preset condition. The breeding information of the female and male livestock to be selected is input into a convergent graph neural network model to obtain the comprehensive index value of the input male and female livestock. Combined with the second preset conditions, the male livestock to be selected are mated.
2. The method for eugenic breeding of livestock as described in claim 1, characterized in that, The selection of male livestock from the pool of potential breeding animals, in conjunction with the second preset condition, specifically involves: When there is only one female animal to be selected for breeding, the male animal with the highest comprehensive index value corresponding to the female animal is selected for mating. Specifically: For female animal x, the comprehensive index value of the selected male animal is: max(f(x,y i )),y i ∈Y; Where x is the female animal, y i Let i be the male animal, Y be the male animal to be selected for breeding, and f(x,y) i () represents the combined index value of the male and female livestock. Simultaneously, the following conditions must be met: 0.5·A(x,y i )≤a; A(x,p i )≤β; T(x,y i )=1; p i ∈P[y i ]; Where A is the kinship correlation coefficient matrix, a is the inbreeding coefficient of the offspring of the selected male and female animals, β is the kinship correlation coefficient between the female animal and the mated female animals of the selected male, and p i For the selected female animal numbered i, P[y] i [ ] represents all female animals assigned to the selected male animals, and T is the matrix relating the expected estrus time of the female animals to the time when semen can be collected from the male animals; Among them, when T 采精 ≤T 发情 ≤T 采精 +T 精液保存期 When T(x,y)=1; When T does not meet 采精 ≤T 发情 ≤T 采精 +T 精液保存期 When T(x,y)=0.
3. The method for eugenic breeding of livestock as described in claim 2, characterized in that, The step of selecting mates from the male livestock to be bred, in conjunction with the second preset condition, further includes: When there are two or more female animals to be selected for breeding, for any one of them, a male animal that meets the third preset condition is selected for mating. The third preset condition is as follows: For all female livestock X and male livestock Y to be selected for breeding, the comprehensive index values corresponding to the selected female and male livestock are as follows: max(∑f(x,y)), x∈X,y∈Y; Where x represents female livestock, y represents male livestock, and f(x,y) is the combined index value of male and female livestock input; Simultaneously, the following conditions must be met: 0.5·A(x,y)≤a; A(x,P y )≤β; T(x,y)=1; U y >0,M x =1; Where A is the kinship correlation coefficient matrix, a is the inbreeding coefficient of the offspring of the selected male and female animals, β is the kinship correlation coefficient between the female animal and the mated female animals of the selected male, and P y Let P be a list of all female animals that have been mated with each male animal y corresponding to each element of the list, T be a matrix showing the relationship between the expected estrus time of the female animals and the time when semen can be collected from the male animals, and U be a list of female animals that have been mated with each male animal. y For each element in list U, M represents the remaining allocable quota for the male animal y. x For each element in list M, represent the breeding status of the female animal; Where, when M x =1, then the female animal can breed; When M x If the value is 0, then the female animal cannot breed. When T 采精 ≤T 发情 ≤T 采精 +T 精液保存期 When T(x,y)=1; When T is not met 采精 ≤T 发情 ≤T 采精 +T 精液保存期 When T(x,y)=0.
4. The method for eugenic breeding of livestock as described in claim 1, characterized in that, The generation of several comprehensive index values corresponding one-to-one with each group of male and female livestock is specifically as follows: Based on the preset business standards and combined with the breeding information of each group of male and female livestock, a weighted sum of the first breeding indicators corresponding to each group of male and female livestock is generated. The weighted sum is used as a comprehensive indicator value to obtain several comprehensive indicator values corresponding to each group of male and female livestock. Among them, the first breeding indicators include the number of breeding litters, the number of healthy breeding piglets, the number of weaned piglets, and the weaning litter weight.
5. The method for eugenic breeding of livestock as described in claim 1, characterized in that, The step of establishing a graph neural network model using the training set specifically involves: extracting several groups of male and female animal nodes from the training set, obtaining the corresponding neighbor nodes at a predetermined number of upward layers and the corresponding breeding information, and establishing a graph neural network model.
6. The method for eugenic breeding of livestock as described in claim 5, characterized in that, The first preset condition is: the loss function of the graph neural network model is less than a first preset value, or the change in the loss function of the graph neural network model is less than a second preset value.
7. The method for eugenic breeding of livestock as described in claim 6, characterized in that, Before establishing the graph neural network model using the training set, the method further includes: establishing a test set using pedigree data, node features, and comprehensive index values from the breeding information of unextracted male and female livestock; the test set is used to repeatedly test the test accuracy of the converged graph neural network model after the graph neural network model reaches convergence under preset conditions, and the tested graph neural network model ends training when the test accuracy meets the preset business standard.
8. The method for eugenic breeding of livestock as described in claim 1, characterized in that, Before establishing the training set, the method further includes: converting the pedigree data into a directed graph and generating a corresponding adjacency matrix; cleaning and normalizing the node features of the extracted groups of male and female livestock; concatenating the adjacency matrix and the normalized node features as data input; and using the comprehensive index values of the extracted groups of male and female livestock as data labels.
9. The method for eugenic breeding of livestock as described in claim 1, characterized in that, The breeding information includes pedigree tables, records, breeding index tables, breeding value tables, semen collection tables, strains, breeding index tables, breeding value tables, number of breeding litters, number of healthy breeding piglets, number of weaned piglets, and weaning litter weight.
10. A livestock eugenics selection device, characterized in that, It includes a generation module, a training set creation module, a model building module, and an optional module; among which, The generation module is used to obtain the breeding information of several groups of male and female livestock, take the breeding information of each group of male and female livestock as the node feature of the male and female livestock node, and generate several comprehensive index values that correspond one-to-one with each group of male and female livestock. The training set establishment module is used to extract the node features and comprehensive index values of several groups of male and female livestock according to a preset ratio, and combine them with the pedigree data in the breeding information of the extracted groups of male and female livestock to establish a training set. The model building module is used to build a graph neural network model using the training set until the graph neural network model converges under the first preset condition. The selection module is used to input the breeding information of the female and male livestock to be selected into a convergent graph neural network model to obtain the comprehensive index value of the input male and female livestock, and select and mate them from the male livestock to be selected in combination with the second preset conditions.