Deep learning-based boar breeding screening method, electronic device, computer-readable storage medium, and program product
Patent Information
- Application Number
- CN202611054766.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2046-07-16
AI Technical Summary
[0003]然而猪的胴体性能中的部分关键性状需要在猪只屠宰后通过样品检测获得,拟留作种用的候选猪无法直接进行屠宰测定,导致现有选育方式通常只能依据活体阶段的间接指标推断其肉质潜力
[0039]采用上述技术方案的发明,具有如下优点:
Smart Images

Figure CN122575500B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of breed selection and breeding technology, and more specifically, to a deep learning-based method for screening breeding pigs, electronic devices, computer-readable storage media, and program products. Background Technology
[0002] In pig breeding, selection is typically based on a comprehensive evaluation of candidate pigs' appearance, body type, growth and development, reproductive performance, in vivo indicators, and pedigree information. For pig herds with higher breeding requirements, genetic assessment can also be conducted using genotyping information. These selection methods can evaluate some production performance and genetic background of candidate pigs without affecting their subsequent breeding. Different pig breeds possess different desirable traits; some breeds have excellent carcass performance but a long growth cycle, while others have a short growth cycle but poor carcass performance. Therefore, it is necessary to crossbreed two pig breeds to breed varieties with good carcass performance and a shorter growth cycle.
[0003] However, some key traits in pig carcass performance need to be obtained through sampling after slaughter. Candidate pigs intended for breeding cannot be directly tested after slaughter, leading to current breeding methods typically relying on indirect indicators from the live stage to infer meat quality potential. Due to differences in genetic background, body composition, and physiological metabolism among different pigs, relying solely on uniform live indicator evaluation rules or general pedigree relationships for selection is prone to prediction bias. This bias can manifest in different directions and to varying degrees, especially between different crosses or families, thus affecting breeding stability. Therefore, there is an urgent need for a method that can predict carcass performance based on live characteristics of pigs without slaughter, enabling the selection of target pigs. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a deep learning-based method for screening breeding pigs, electronic devices, computer-readable storage media, and program products, which can screen out target pigs that meet the requirements for breeding pigs without slaughtering pigs, thereby improving the efficiency of breeding superior breeds of pigs through crossbreeding combinations.
[0005] To achieve the above technical objectives, the technical solution adopted in this application is as follows:
[0006] In a first aspect, embodiments of this application provide a deep learning-based method for selecting breeding pigs, including:
[0007] The candidate first feature of the candidate pig, the reference first feature and reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig are obtained. The candidate pig and the reference pig belong to the offspring of the same hybrid combination. The candidate first feature includes the live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the candidate pig. The reference first feature includes the live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the reference pig. The reference second feature includes the actual chemical intramuscular fat content of the longissimus dorsi muscle and the droplet water loss rate of the longissimus dorsi muscle of the reference pig. The SNP genotyping data are single nucleotide polymorphism SNP genotyping data.
[0008] The candidate first feature is input into the first model. Through the first model, the hidden features of the candidate first feature are extracted, and the candidate prediction features of the candidate pig are obtained based on the hidden features. The candidate prediction features include the predicted chemical intramuscular fat content of the longissimus dorsi muscle and the predicted water loss rate of the longissimus dorsi muscle of the candidate pig.
[0009] The reference first feature is input into the first model, and the reference prediction feature of the reference pig is obtained through the first model. The reference prediction feature includes the predicted chemical intramuscular fat content of the longissimus dorsi muscle and the predicted water loss rate of the longissimus dorsi muscle of the reference pig.
[0010] The genomic affinity coefficient is calculated using the SNP genotyping data. The genomic affinity coefficient is used to characterize the degree of genetic association between the candidate pig and each of the reference pigs.
[0011] The candidate first feature, the reference first feature, and the genomic kinship coefficient are input into the second model. The attention weight of the candidate pig to the reference pig is obtained through the cross-attention network of the second model, and a first coefficient is obtained based on the attention weight. The first coefficient is used to characterize the similarity between the candidate pig and the reference pig.
[0012] Based on the first coefficient, the reference second feature, the reference prediction feature, and the candidate prediction feature, a modified second feature for the candidate pig is obtained, which is obtained by modifying the candidate prediction feature.
[0013] Based on the modified second feature and the candidate first feature, all candidate pigs are traversed, and candidate pigs that meet the preset conditions are determined as breeding pigs for breeding.
[0014] According to the first aspect, the first model includes an input layer, a hidden layer, and an output layer. The candidate first feature is input into the first model, and through the first model, hidden features of the candidate first feature are extracted. Based on the hidden features, candidate predicted features of the candidate pig are obtained, including:
[0015] The candidate first feature is input into the first hidden layer, and feature extraction is performed through the first hidden layer to obtain the first hidden feature. The feature dimension of the first hidden feature is higher than that of the candidate first feature.
[0016] The first hidden feature is input into the second hidden layer, and the second hidden layer is used to extract features to obtain the second hidden feature. The feature dimension of the second hidden feature is lower than that of the first hidden feature.
[0017] The second hidden feature is input into the output layer, and the candidate predicted feature is obtained through the output layer.
[0018] According to the first aspect, the second model includes a cross-attention network, which comprises a linear projection layer, an attention layer, and a normalization layer. The candidate first feature, the reference first feature, and the genomic kinship coefficient are input into the second model. The attention weights of the candidate pig to the reference pig are obtained through the cross-attention network of the second model, and a first coefficient is obtained based on the attention weights, including:
[0019] The candidate first feature and the reference first feature are input into the linear projection layer. Based on the candidate first feature and the reference first feature, the linear projection layer obtains the query vector of the candidate pig and the key vector of the reference pig.
[0020] The query vector of the candidate pig, the key vector of the reference pig, the candidate first feature, the reference first feature, and the genomic kinship coefficient are input into the attention layer. Through the attention layer, the attention score of the candidate pig to the reference pig is obtained.
[0021] The attention score is input into the normalization layer, and the attention weight of the candidate pig to the reference pig is obtained through the normalization layer. The attention weight of the candidate pig to the reference pig is then determined as the first coefficient.
[0022] According to the first aspect, obtaining the modified second feature of the candidate pig based on the first coefficient, the reference second feature, the reference prediction feature, and the candidate prediction feature includes:
[0023] Based on the reference second feature, the reference prediction feature, and the first coefficient, a prediction compensation feature is obtained, which is used to correct the candidate prediction feature.
[0024] Based on the predicted compensation features, the candidate predicted features are corrected to obtain the corrected second features of the candidate pig.
[0025] According to the first aspect, before obtaining the candidate first feature of the candidate pig, the reference first feature and the reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig, the method further includes:
[0026] Obtain the historical candidate first features and the actual candidate second features of multiple historical candidate pigs, wherein the historical candidate pigs and the candidate pigs belong to the offspring of the same hybrid combination;
[0027] The historical candidate first feature and the real candidate second feature are integrated into training data;
[0028] The first model is trained and initialized based on the training data to perform the process of inputting the candidate first feature into the first model and obtaining the candidate predicted feature through the first model.
[0029] According to the first aspect, before obtaining the candidate first feature of the candidate pig, the reference first feature and the reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig, the method further includes:
[0030] The historical candidate first feature of multiple historical candidate pigs, the historical reference first feature and the historical reference second feature of historical reference pigs, as well as the historical SNP genotyping data of the historical candidate pigs and the historical reference pigs, and the actual candidate second feature of the historical candidate pigs are obtained. The historical candidate pigs, historical reference pigs, the candidate pigs, and the reference pigs all belong to the offspring of the same hybrid combination.
[0031] The historical candidate first feature and the historical reference first feature are respectively input into the trained first model, and the historical candidate prediction feature and the historical reference prediction feature are respectively obtained through the trained first model;
[0032] Historical genomic kinship coefficients were calculated using the historical SNP genotyping data.
[0033] Based on the true candidate second feature, the historical candidate prediction feature, the historical reference second feature, and the historical reference prediction feature, the target first coefficient of the historical candidate pig corresponding to the historical reference pig is obtained.
[0034] The historical candidate first feature, the historical reference first feature, the historical genomic affinity coefficient, and the target first coefficient are integrated into training data;
[0035] The second model is trained and initialized based on the training data to perform the process of inputting the candidate first feature, the reference first feature, and the genomic kinship coefficient into the second model, and obtaining the first coefficient based on the second model.
[0036] Secondly, embodiments of this application also provide an electronic device, the electronic device including a processor and a memory coupled to each other, the memory storing a computer program, and when the computer program is executed by the processor, causing the electronic device to perform the method as described in the first aspect.
[0037] Thirdly, embodiments of this application also provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when run on a computer, causes the computer to perform the method described in the first aspect.
[0038] Fourthly, embodiments of this application also provide a program product, characterized in that it includes a computer program, which, when executed by a processor, implements the method described in the first aspect.
[0039] The invention employing the above technical solution has the following advantages:
[0040] This application uses reference pigs from the offspring of the same hybrid combination as a computational reference for candidate pigs, ensuring that candidate pigs and reference pigs have a relatively consistent hybridization basis and feeding background, thus improving the comparability between subsequent predicted data and reference data. The first model obtains initial carcass performance evaluation results for candidate pigs without slaughter testing. The second model combines genomic kinship coefficients with candidate pig data and reference pig data to obtain a first coefficient, which assesses the degree of joint matching between candidate pigs and reference pigs in terms of genetic background, metabolism, and developmental status. Using the reference pig data as a reference and the first coefficient as a correction condition, the output of the first model is corrected, making the corrected second characteristic of the candidate pigs closer to the actual carcass performance, improving the confidence of the prediction, and enhancing the consistency between the predicted results and subsequent breeding goals. Finally, based on the first characteristic obtained from the live stage of candidate pigs and the predicted corrected second characteristic, suitable target pigs are selected, improving the breeding efficiency of breeding pigs. Attached Figure Description
[0041] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.
[0042] Figure 1 A flowchart of a deep learning-based method for screening breeding pigs provided in the embodiments of this application. Detailed Implementation
[0043] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0044] Please refer to Figure 1 This application provides a deep learning-based method for selecting breeding pigs, which can be applied to electronic devices and whose steps can be executed or implemented by the electronic devices. The electronic devices can be, but are not limited to, personal computers, smartphones, and other electronic devices. The deep learning-based method for selecting breeding pigs may include the following steps:
[0045] S10, obtain the candidate first feature of the candidate pig, the reference first feature and reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig. The candidate pig and the reference pig belong to the offspring of the same hybrid combination. The candidate first feature includes the live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the candidate pig. The reference first feature includes the live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the reference pig. The reference second feature includes the actual chemical intramuscular fat content of the longissimus dorsi muscle and the droplet water loss rate of the longissimus dorsi muscle of the reference pig. The SNP genotyping data is single nucleotide polymorphism SNP genotyping data.
[0046] S20 inputs the candidate first feature into the first model, extracts the hidden features of the candidate first feature through the first model, and obtains the candidate prediction features of the candidate pig based on the hidden features. The candidate prediction features include the predicted chemical intramuscular fat content of the longissimus dorsi muscle and the predicted water loss rate of the longissimus dorsi muscle of the candidate pig.
[0047] S30 Input the reference first feature into the first model, and obtain the reference prediction feature of the reference pig through the first model. The reference prediction feature includes the predicted chemical intramuscular fat content of the longissimus dorsi muscle and the predicted drip loss rate of the longissimus dorsi muscle of the reference pig.
[0048] S40 calculates the genomic affinity coefficient using the SNP genotyping data. The genomic affinity coefficient is used to characterize the degree of genetic association between the candidate pig and each of the reference pigs.
[0049] S50 inputs the candidate first feature, the reference first feature, and the genomic kinship coefficient into the second model, obtains the attention weight of the candidate pig to the reference pig through the cross-attention network of the second model, and obtains the first coefficient based on the attention weight. The first coefficient is used to characterize the similarity between the candidate pig and the reference pig.
[0050] S60 obtains a modified second feature for the candidate pig based on the first coefficient, the reference second feature, the reference prediction feature, and the candidate prediction feature. The modified second feature is obtained by modifying the candidate prediction feature.
[0051] S70, based on the modified second feature and the candidate first feature, traverses all candidate pigs and determines the candidate pigs that meet the preset conditions as breeding pigs for breeding.
[0052] The following section will elaborate on each step of the deep learning-based method for selecting breeding pigs:
[0053] In S10, taking the pig breeding process in this embodiment as an example, both the candidate first feature and the reference first feature refer to characteristic data obtained during the live pig stage, used to characterize the metabolic and developmental performance of pigs. The candidate first feature and the reference first feature include, but are not limited to, the contents listed in this embodiment. In this embodiment, both the candidate first feature and the reference first feature include: live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration. This can be expressed as:
[0054]
[0055] in, The backfat thickness of live animals was measured by ultrasound to characterize fat deposition and body tissue development in pigs. The area of the eye muscles in living animals is measured by ultrasound and is used to characterize the muscle development of pigs. Whole blood glucose concentration is measured by collecting a small amount of whole blood and using a blood glucose detection device to characterize the state of glucose metabolism substrates in pigs. Whole blood lactate concentration, measured by collecting a small amount of whole blood and using a lactate detection device, is used to characterize the degree of glycolysis and stress status in pigs. Backfat thickness and eye muscle area in live animals characterize fat deposition and muscle development, while whole blood glucose and whole blood lactate concentrations characterize glucose metabolism, glycolysis, and stress status.
[0056] Live backfat thickness is a commonly used indicator of a pig's overall fat deposition capacity, reflecting the body's overall fat synthesis and deposition potential. It belongs to the same category of fat deposition traits as intramuscular fat. Backfat thickness is negatively correlated with carcass lean meat percentage. Thinner backfat generally means a higher lean meat percentage; conversely, thicker backfat indicates higher fat content and a lower lean meat percentage. Live oculomotor muscle area refers to the cross-sectional area of the longissimus dorsi muscle, usually located between the 10th and 11th ribs, and is measured live using ultrasound. The pig is restrained in a standing position, and after shaving and cleaning at the predetermined measurement site, coupling gel is applied. The ultrasound probe is then placed against the body surface to obtain an ultrasound image of the subcutaneous fat layer. The live backfat thickness is determined based on the vertical distance between the skin and the surface of the longissimus dorsi muscle in the image. Measurement sites can be selected at the last rib or on both sides of the midline near the third or fourth rib from the bottom.
[0057] Live eye muscle area is an important indicator for evaluating pig meat production performance and is positively correlated with carcass lean meat percentage. A larger eye muscle area generally indicates higher lean meat yield. Pigs are restrained in a testing pen, and their backs are shaved and coated with coupling gel at a predetermined testing location. An ultrasound probe is placed against the pig's body surface to acquire a cross-sectional ultrasound image of the longissimus dorsi muscle. Based on the boundaries of the longissimus dorsi muscle in the image, its transverse width and longitudinal depth are determined, and the area of the corresponding region is calculated to obtain the live eye muscle area.
[0058] Because the rate and extent of glycolysis in the muscle after slaughter affect the formation of pork quality, pigs with higher whole blood glucose concentrations exhibit a faster rate of glycolysis in the early post-slaughter period. This alters the reflective properties of the muscle, making the meat appear pale, and protein denaturation prevents muscle cells from effectively retaining water, resulting in a decline in overall meat quality. Whole blood lactate concentration affects the pH value of pork. Higher lactate concentrations cause protein denaturation in post-slaughter pork, leading to decreased water-holding capacity, damage to muscle structure, pale color, and a soft, dry texture. Both whole blood glucose and whole blood lactate concentrations can be obtained by collecting a small amount of venous whole blood from the ear vein or anterior vena cava of pigs. The blood sample is dripped onto test strips provided with a portable biochemical or lactate analyzer. The instrument uses an enzyme-catalyzed electrochemical reaction to quickly output the whole blood glucose and whole blood lactate concentration values, allowing for on-site measurement.
[0059] Both the true second feature and the reference second feature refer to characteristic data obtained after pig slaughter, used to characterize pig carcass performance. In this application, "carcass performance" includes meat quality-related properties measured based on the longissimus dorsi muscle sample, and is not limited to traditional carcass indicators such as carcass weight and lean meat percentage. In this embodiment, the true second feature, reference second feature, reference predicted feature, and candidate predicted feature all include the chemical intramuscular fat content of the longissimus dorsi muscle and the drip loss rate of the longissimus dorsi muscle, which can be expressed as:
[0060]
[0061] in, The chemical intramuscular fat content of the longissimus dorsi muscle, expressed as a percentage, is obtained through chemical analysis of samples collected post-slaughter. After slaughter, muscle samples from a predetermined location in the longissimus dorsi muscle are taken, and after removing visible fat and connective tissue, the samples are homogenized. The processed samples are then dried and pulverized, and lipids are extracted using Soxhlet extraction or a fat analyzer. The chemical intramuscular fat content of the longissimus dorsi muscle is determined based on the ratio of the extracted lipid mass to the sample mass. The droplet water loss rate of the longissimus dorsi muscle, expressed as a percentage, is calculated by suspending the longissimus dorsi muscle sample under preset low-temperature conditions for a preset time, based on the ratio of water loss to initial mass. The chemical intramuscular fat content of the longissimus dorsi muscle refers to the total amount of fat deposited between muscle fibers, used to quantitatively assess the marbling of pork. The droplet water loss rate of the longissimus dorsi muscle characterizes the muscle's water-holding capacity and the integrity of its protein structure, representing the percentage of water naturally seeping from the muscle within 24–48 hours under its own weight and refrigerated at 4°C.
[0062] In this embodiment, Duroc or Berkshire pigs, two lean-type pig breeds, are used as the paternal line, and Jinhua pigs from Zhejiang Province are used as the maternal line. Jinhua pigs, as a local breed, possess excellent meat quality and disease resistance, but suffer from slow growth, low feed conversion ratio, thick backfat, and low lean meat percentage, making them unsuitable for large-scale farming. Duroc or Berkshire pigs have outstanding growth efficiency and carcass performance, but their meat flavor is relatively poor. Through crossbreeding, the high-quality meat, high fertility, and strong adaptability of Jinhua pigs can be retained while introducing the rapid growth and high lean meat percentage characteristics of foreign pig breeds, thus cultivating a new pig breed that balances high-quality meat and production efficiency. In this embodiment, the offspring of Duroc or Berkshire pigs crossed with Jinhua pigs from Zhejiang Province are used as the breeding targets. Candidate pigs refer to those belonging to the offspring of the target crossbreeding combination, selected and retained for subsequent breeding and selection. Reference pigs refer to offspring belonging to the same crossbreeding combination as candidate pigs. If a crossbreeding combination is formed by crossing a specific paternal breed with a specific maternal breed, then some pigs from the offspring of that crossbreeding combination can be used as reference pigs, and others can be used as candidate pigs. Preferably, candidate pigs and reference pigs are at similar weights or similar ages, and are raised under the same or similar conditions, with similar fasting periods, blood collection times, and restraint procedures.
[0063] In S10, each candidate pig and each reference pig is individually identified. During the pre-set measurement phase, the backfat thickness, eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the candidate and reference pigs are measured in vivo, respectively, forming a first characteristic record corresponding to the pig's individual identifier. After the first characteristic collection is completed for the reference pigs, they are slaughtered, and samples of the longissimus dorsi muscle are collected to measure the intramuscular fat content and drip loss rate, forming a second characteristic record corresponding to the reference pig's individual identifier. Simultaneously, blood samples or ear tissue samples are collected from the candidate and reference pigs for SNP genotyping, forming SNP genotyping data corresponding to each pig's individual identifier. The SNP genotyping data is single nucleotide polymorphism (SNP) genotyping data.
[0064] In S20, the first model includes an input layer, a hidden layer, and an output layer. The step of inputting the candidate first feature into the first model and obtaining the candidate predicted feature through the first model includes:
[0065] S21 The candidate first feature is input into the first hidden layer, and feature extraction is performed through the first hidden layer to obtain the first hidden feature. The feature dimension of the first hidden feature is higher than that of the candidate first feature.
[0066] S22 The first hidden feature is input into the second hidden layer, and the second hidden feature is obtained by feature extraction through the second hidden layer. The feature dimension of the second hidden feature is lower than that of the first hidden feature.
[0067] S23 inputs the second hidden feature to the output layer, and obtains the candidate predicted feature through the output layer. In S21, before inputting the candidate first feature to the first hidden layer, the candidate first feature can be... Standardization is performed to obtain the standardized candidate first feature.
[0068]
[0069] in, Standardized candidate first features; This represents the mean vector composed of the means of the candidate first features; This represents the standard deviation vector composed of the standard deviations of the candidate first features.
[0070] In S21, the standardized candidate first feature is input into the first hidden layer, and linear mapping and nonlinear activation are performed to obtain the first hidden feature:
[0071]
[0072] in, This represents the first hidden feature of candidate pig c; This represents the weight matrix from the input layer to the first hidden layer; This represents the bias vector of the first hidden layer; This represents the activation function. The ReLU activation function is: In one specific implementation, The dimensions are 16×4. and With a dimension of 16, the first hidden layer maps the 4-dimensional candidate first features to 16-dimensional first hidden features. The feature dimension of the first hidden features is higher than that of the candidate first features. The first hidden features no longer correspond to a single live backfat thickness, live eye muscle area, whole blood glucose concentration, or whole blood lactate concentration, but rather represent a high-dimensional feature formed by weighted combination and nonlinear transformation of the first features. For example, the first hidden features can characterize the combined relationship between fat deposition state and muscle development state, and also the nonlinear correlation between glucose metabolism state and development state.
[0073] In S22, the first hidden feature is input into the second hidden layer for further feature extraction to obtain the second hidden feature.
[0074]
[0075] in, This represents the second hidden feature of candidate pig c; This represents the weight matrix from the first hidden layer to the second hidden layer; This represents the bias vector of the second hidden layer; This represents the first hidden feature of the candidate pig. This represents the activation function. The ReLU activation function is: In one specific implementation, The dimensions are 8×16. and With a dimension of 8, the second hidden layer compresses the 16-dimensional first hidden feature into an 8-dimensional second hidden feature, where the dimension of the second hidden feature is lower than that of the first hidden feature. This compression is achieved by using a weight matrix obtained during training to further extract and integrate combined information from the first hidden feature that has a high correlation with the prediction of the second feature.
[0076] In S23, the second hidden feature is input into the output layer to obtain candidate predicted features:
[0077]
[0078]
[0079] in, The candidate prediction features represent the candidate pig c; This represents the weight matrix from the second hidden layer to the output layer; This represents the bias vector of the output layer; This represents the second hidden feature of the candidate pig. This represents the initial predicted intramuscular fat content of the candidate pigs; This represents the predicted initial drip loss rate for the candidate pigs. In one specific implementation, The dimension is 2×8. and The dimension is 2.
[0080] In S30, the reference first feature is input into the first model, and the reference predicted feature is obtained through the first model. The specific implementation is the same as in S21-S23, except that the input object to the first model is the reference first feature. The output of the first model is the reference predicted feature. , Other implementation details can be found in S21-S23, and will not be repeated here.
[0081] In S40, blood samples, ear tissue samples, or other biological samples containing DNA are collected from candidate pigs and reference pigs. After DNA extraction, SNP microarrays are used for genotyping, for example, a porcine 10K SNP microarray, to obtain genotypic data for each pig at multiple SNP loci. The SNP genotyping data for each pig is then associated with its individual identifier. For the k-th SNP locus, one allele is selected as the counting allele, for example, denoted as A, and the genotype of each pig is uniformly encoded as follows:
[0082]
[0083] in, This represents the genotype coding value of the nth pig at the kth SNP locus; AA indicates that the pig carries two counting alleles A; Aa indicates that the pig carries one counting allele A. This indicates that the target allele A is not carried. The target allele is used only for uniform coding and is not limited to beneficial alleles, dominant alleles, or risk alleles.
[0084] In this embodiment, genomic kinship coefficients can be calculated using professional analysis tools in the fields of population genetics and livestock breeding. PLINK format SNP genotyping data can be used to efficiently calculate kinship coefficients across the entire population. The PLINK software itself also has built-in functions for calculating genomic kinship and homology coefficients, suitable for rapid calculation of small samples and data preprocessing. The calculation process will not be elaborated upon further; the calculation principle will be explained below:
[0085] The genomic affinity coefficient between candidate pig c and reference pig i is:
[0086]
[0087] in, This represents the genomic affinity coefficient between candidate pig c and reference pig i; This indicates the number of valid SNP sites involved in the calculation; This represents the genotype coding value of candidate pig c at the k-th SNP locus; This represents the genotype coding value of reference pig i at the k-th SNP locus; This represents the frequency of alleles counted at the k-th SNP locus. When candidate pigs and reference pigs have similar or identical genotypic deviations relative to the population average at a relatively large number of SNP loci, the resulting genomic affinity coefficient increases accordingly; when their genotypic deviations at multiple SNP loci are opposite, the resulting genomic affinity coefficient decreases. For each candidate pig c, the following calculations are performed for each reference pig i in the same hybridization combination: .
[0088] In S50, the second model includes a cross-attention network, which comprises a linear projection layer, an attention layer, and a normalization layer. The candidate first feature, the reference first feature, and the genomic relatedness coefficient are input into the second model. The cross-attention network of the second model obtains the attention weights of the candidate pig to the reference pig, and a first coefficient is obtained based on the attention weights, including:
[0089] S51 inputs the candidate first feature and the reference first feature into the linear projection layer, and obtains the query vector of the candidate pig and the key vector of the reference pig based on the candidate first feature and the reference first feature through the linear projection layer;
[0090] S52 inputs the query vector of the candidate pig, the key vector of the reference pig, the candidate first feature, the reference first feature, and the genomic kinship coefficient into the attention layer, and obtains the attention score of the candidate pig to the reference pig through the attention layer;
[0091] S53 inputs the attention score to the normalization layer, obtains the attention weight of the candidate pig to the reference pig through the normalization layer, and determines the attention weight of the candidate pig to the reference pig as the first coefficient.
[0092] In S51, before inputting the candidate first feature, the reference first feature, and the genomic kinship coefficient into the linear projection layer, preferably, the candidate first feature and the reference first feature are processed using the same normalization method:
[0093]
[0094]
[0095] in, This represents the standardized candidate first feature; This represents the standardized reference first feature; This represents the mean vector of the candidate first feature; Represents the standard deviation vector of the candidate first feature; This represents the mean vector of the first reference feature; This represents the reference first feature standard deviation vector.
[0096] The linear projection layer is used to obtain the query vector of the candidate pig and the key vector of the reference pig.
[0097]
[0098]
[0099] in, The query vector represents candidate pig c; This represents the weight matrix corresponding to the candidate pig query mapping; This represents the bias vector corresponding to the candidate pig query mapping; This represents the standardized candidate first feature. This represents the key vector of the i-th reference pig; This represents the weight matrix corresponding to the reference pig key mapping; This represents the bias vector corresponding to the reference pig key mapping; This represents the standardized reference first feature.
[0100] The query vector for candidate pigs represents their current metabolic and developmental performance status, and indicates the matching requirement among multiple reference pigs. The key vector for reference pigs represents their own metabolic and developmental performance status, for matching with the candidate pig query vector. In S51, the genomic relatedness coefficient... It can be input into the second model containing the linear projection layer along with the candidate first feature and the reference first feature, but it does not participate in the linear mapping between the query vector and the key vector.
[0101] In S52, the standardized difference in the first characteristic between the candidate pig and the reference pig is calculated:
[0102]
[0103]
[0104] in, This represents the first characteristic of the candidate pig after standardization. This refers to the first characteristic after standardization of pigs. Let represent the first feature difference vector between candidate pig c and reference pig i. The four components of this difference vector represent the degree of difference between the candidate pig and the reference pig in four different feature dimensions.
[0105] The genomic relatedness coefficient and the first feature difference are input into the attention layer to calculate the attention score of the candidate pig to the reference pig:
[0106]
[0107] in, This represents the attention score of candidate pig c to reference pig i; Represents the candidate pig query vector; Represents the reference pig bond vector; Indicates the dimensions of the query vector and key vector; This represents the genomic affinity coefficient between candidate pig c and reference pig i; This represents the trainable weights corresponding to genomic kinship coefficients; This represents the first feature difference vector between the candidate pig and the reference pig; This represents the trainable weight vector corresponding to the first feature difference vector; This indicates a trainable bias term. , , All of these can be obtained through training a second model.
[0108] Used to characterize the basic matching degree between candidate pigs and reference pigs in the implicit metabolic and developmental performance space; Used to characterize the impact of the degree of genetic association between candidate pigs and reference pigs on the matching results; This is used to characterize the impact of differences between candidate pigs and reference pigs on each primary feature on the matching results. For example, if a candidate pig differs significantly from a reference pig in a certain primary feature, it is not conducive to the reference pig data forming an effective reference for the candidate pig, thus reducing the attention score.
[0109] In S53, for the same candidate pig c, attention scores for multiple reference pigs associated with it have been obtained. The normalization layer uses the Softmax function to normalize these attention scores, obtaining the attention weights of the candidate pig to the reference pigs:
[0110]
[0111] in, This represents the attention weight of candidate pig c to reference pig i; This represents the attention score of candidate pig c to reference pig i; This represents the set of reference pigs corresponding to candidate pig c; This represents an exponential function.
[0112] The genetic background matching information between candidate pigs and reference pigs is reflected by the genomic kinship coefficient, while the matching information in terms of metabolic and developmental performance is reflected by their respective first characteristics and differences in first characteristics. This information collectively determines the attention score between candidate and reference pigs; therefore, the attention score characterizes the comprehensive matching level of the reference pig relative to the candidate pig in terms of genetic background, metabolism, and developmental performance. For the same candidate pig, the higher the attention score of a reference pig, the greater its attention weight; conversely, the lower the attention score, the smaller the corresponding attention weight. Thus, the attention weight preserves the relative comprehensive matching degree between the reference pig and the candidate pig among multiple reference pigs. The first coefficient characterizes the similarity between candidate and reference pigs, specifically the comprehensive similarity in genetic background, metabolism, and developmental performance. Pigs with similar genetic backgrounds exhibit certain similarities in carcass performance; for example, the cysteine protease inhibitor B (CSTB) gene is significantly correlated with the tenderness of pork. However, factors such as feeding, growth, and environment also influence the similarity of carcass performance among different pigs. The difference in first characteristics reflects the similarity between the two in terms of growth, development, and metabolic performance before slaughter. The greater the difference in the primary trait, the greater the difference in growth, development, and metabolic performance between the candidate pig and the reference pig. Suppose a candidate pig has a high genomic relatedness coefficient to a reference pig, but their primary trait differs significantly. Even though they are genetically similar, and even if they are siblings produced by crossbreeding, their different growth patterns mean that their carcass performance may also differ considerably. Therefore, the difference in the primary trait is also included in the calculation of the attention score to comprehensively assess their similarity, thereby demonstrating a certain degree of similarity in subsequent carcass performance prediction.
[0113] In S60, obtaining the modified second feature of the candidate pig based on the first coefficient, the reference second feature, the reference prediction feature, and the candidate prediction feature includes:
[0114] S61 obtains a prediction compensation feature based on the reference second feature, the reference prediction feature, and the first coefficient, and the prediction compensation feature is used to correct the candidate prediction feature;
[0115] S62 Based on the predicted compensation features, the candidate predicted features are corrected to obtain the corrected second features of the candidate pig.
[0116] In S61, based on the reference second feature and the reference prediction feature, the prediction compensation feature for the candidate pig obtained based on the i-th reference pig is calculated:
[0117]
[0118]
[0119]
[0120] in, This represents the reference second feature of the i-th reference pig; This indicates that the i-th reference prediction feature is used. The predictive compensation feature of candidate pig c is represented; This represents the set of reference pigs corresponding to candidate pig c; Let c represent the first coefficient of candidate pig c relative to the i-th reference pig.
[0121] In S62, based on the prediction compensation features, the candidate prediction features are modified to obtain the modified second features of the candidate pigs.
[0122]
[0123] in, This represents the modified second feature of candidate pig c; The candidate prediction features represent the candidate pig c; This represents the predictive compensation feature of candidate pig c.
[0124] Candidate predictive features are predictions obtained by the first model based on the candidate pig's own first feature, reflecting the candidate pig's baseline level of the second feature under its own metabolic and developmental performance conditions. Predictive compensation features represent the prediction bias exhibited by the first model on reference pigs with a high degree of matching between the candidate pig and the reference pig in terms of genetic background and metabolic and developmental performance. Therefore, adding the two together compensates for the error in the "initial prediction value." Although the first model can learn the overall nonlinear correlation of the second feature from the first feature, its output is usually an overall prediction result based on training samples. For candidate pigs with specific genetic backgrounds and specific metabolic and developmental performance states, the first model may over-predict or under-predict. The "difference between the reference second feature and the reference predictive feature" of the reference pig reflects the direction and magnitude of this bias. Selecting reference pigs with a high degree of overall matching with the candidate pig based on the first coefficient, and using their prediction bias to form predictive compensation features, allows the candidate pig to obtain a correction amount more consistent with its individual state. Therefore, candidate predictive features provide the candidate pig's own baseline prediction, while predictive compensation features provide error correction information reflected by reference pigs with a high degree of overall matching with the candidate pig. The combination of the two can reduce the systematic prediction bias of the first model under different genetic backgrounds and different metabolic and developmental performance states, and improve the individual fit and confidence of the candidate pigs in correcting the second trait.
[0125] In S70, the preset conditions are divided into two categories: carcass performance threshold and growth and metabolism threshold. The specific values can be dynamically adjusted according to the breeding objectives. In conjunction with the breeding direction of this embodiment, they can be:
[0126] Condition 1: Correct the longissimus dorsi muscle chemical intramuscular fat content in the second feature to be greater than or equal to the preset lower limit, and the longissimus dorsi muscle droplet loss rate to be less than or equal to the preset upper limit.
[0127] Condition 2: Live back fat thickness ≤ preset upper limit, live eye muscle area ≥ preset lower limit, whole blood glucose concentration and whole blood lactate concentration are within the normal physiological range.
[0128] When the first candidate feature satisfies condition 2 and the modified second feature satisfies condition 1, the candidate pig is determined as a breeding pig for breeding purposes.
[0129] In this application, the first model can be trained in the following way: obtaining historical candidate first features of multiple historical candidate pigs and real candidate second features of the historical candidate pigs, wherein the historical candidate pigs and the candidate pigs belong to the offspring of the same hybrid combination; integrating the historical candidate first features and the real candidate second features into training data; training the initialized first model based on the training data to perform the step of inputting the candidate first features into the first model, and obtaining the candidate predicted features through the first model.
[0130] Specifically, another batch of pig offspring from the same crossbreeding combination is used as the target for training data collection. For example, in this embodiment, the candidate pigs are offspring of a cross between Berkshire pigs and Zhejiang Jinhua pig type I. During the training of the first model, pigs from another batch of crossbreeding offspring of Berkshire pigs and Zhejiang Jinhua pig type I can be selected. The binary crossbreeding offspring of Berkshire pigs and Jinhua pig type I share a consistent parental genetic origin. The allele frequencies, linkage disequilibrium structures, and genetic regulation patterns of carcass performance within the population are uniform. The intrinsic correlation between growth and metabolic status and carcass performance is stable and does not fundamentally change due to different batches, making it universally applicable within the same crossbreeding population. Offspring from the same crossbreeding combination have similar growth and metabolic performance, and the population phenotypic distribution is stable. Under unified feeding conditions and unified measurement standards, the quantitative mapping relationship between characteristics is transferable. Preferably, the candidate pigs used for training data collection and the candidate pigs to be bred in this embodiment are in the same feeding environment, with the same growth cycle and slaughter time.
[0131] After obtaining the first historical candidate feature, the historical candidate pigs are slaughtered to obtain the true second historical candidate feature. The first historical candidate feature is used as the input feature, and the true second historical candidate feature is used as the supervision signal to construct a training dataset. After initializing the first model, it is trained using the first loss function. After training, in the testing phase, only the first candidate feature needs to be input, and the first model can output the corresponding candidate prediction feature. In this embodiment, the collected training dataset is divided into a training set and a test set in an 8:2 ratio, with 80% of the data used for model training and the remaining 20% used for testing. The first loss function used to train the first model is:
[0132]
[0133] in, This represents the number of historical candidate pigs that participated in the training of the first model; This represents the true candidate second characteristic of historical candidate pigs. Indicates historical candidate prediction features, This represents the square of the 2-norm of the vector, i.e., the sum of squared errors between the true candidate second feature and the candidate predicted features, namely, the chemical intramuscular fat content of the longissimus dorsi muscle and the droplet loss rate of the longissimus dorsi muscle. During training, the backpropagation algorithm is used based on... Update the weight matrices and bias parameters of each hidden layer and output layer in the first model until the first loss function converges or the preset training stopping condition is met.
[0134] In this application, the second model can be trained in the following way: acquiring historical candidate first features of multiple historical candidate pigs, historical reference first features and historical reference second features of historical reference pigs, historical SNP genotyping data of the historical candidate pigs and the historical reference pigs, and the true candidate second features of the historical candidate pigs, wherein the historical candidate pigs, historical reference pigs, the candidate pigs, and the reference pigs all belong to the offspring of the same hybrid combination; inputting the historical candidate first features and the historical reference first features into the trained first model respectively, and obtaining the historical candidate predicted features and the historical reference predicted features through the trained first model respectively; and through the... Based on the historical SNP genotyping data, historical genomic affinity coefficients are calculated; based on the true candidate second feature, the historical candidate predicted feature, the historical reference second feature, and the historical reference predicted feature, a target first coefficient for the historical reference pig corresponding to the historical candidate pig is obtained; the historical candidate first feature, the historical reference first feature, the historical genomic affinity coefficient, and the target first coefficient are integrated into training data; a second model is trained and initialized based on the training data to execute the process of inputting the candidate first feature, the reference first feature, and the genomic affinity coefficient into the second model, and obtaining the first coefficient based on the second model.
[0135] Specifically, the historical candidate pigs, historical reference pigs, the candidate pigs, and the reference pigs all belong to the offspring of the same hybridization combination. Another batch of pigs from the same hybridization combination is used as the target for training data collection. The historical candidate first feature, the historical reference first feature, and the historical genomic kinship coefficient are used as input features, and the target first coefficient is used as a supervision signal to construct the training dataset. After initializing the second model, a second loss function is used for training. After training is complete, during the testing phase, only the candidate first feature, the reference first feature, and the genomic kinship coefficient need to be input, and the second model can output the corresponding first coefficient.
[0136] The historical candidate first feature and the historical reference first feature are respectively input into the trained first model. Through the trained first model, the historical candidate predicted feature and the historical reference predicted feature are obtained respectively. It should be noted that the trained first model used when training the second model has already been trained before training the second model. The real candidate second feature used to train the second model is re-acquired and does not reuse the real candidate second feature used when training the first model.
[0137] Based on the true candidate second feature, the historical candidate predicted feature, the historical reference second feature, and the historical reference predicted feature, the target first coefficient of the historical candidate pig corresponding to the historical reference pig is obtained, including:
[0138] Based on the true candidate second features and historical candidate predicted features of historical candidate pigs, the true prediction compensation features are obtained.
[0139]
[0140] in, This represents the true predictive compensation feature of the c-th historical candidate pig; This represents the true candidate second feature of the c-th historical candidate pig; This represents the c-th head of the historical candidate prediction features output by the first model after training.
[0141] Based on the second feature of historical reference and the prediction feature of historical reference, the prediction residual of historical reference pigs is obtained.
[0142]
[0143] in, Let represent the prediction residual of the i-th historical reference pig; This represents the second historical reference feature of the i-th historical reference pig; This represents the i-th historical reference prediction feature output by the first model after training.
[0144] Based on the prediction residuals of historical reference pigs and the actual prediction compensation characteristics, the target first coefficient is obtained.
[0145]
[0146] in, This represents a set of target first coefficients corresponding to the c-th historical candidate pig; This represents the target first coefficient of the c-th historical candidate pig relative to the i-th historical reference pig; This represents the set of historical reference pigs corresponding to the c-th historical candidate pig; Used to calculate the prediction compensation features formed based on the prediction residuals of each historical reference pig; This represents the true predictive compensation characteristics of historical candidate pigs; This represents the square of the 2-norm of a vector; Used to determine a set of target first coefficients that minimize the difference.
[0147] The calculation of the target first coefficient is essentially based on finding a set of coefficients in reverse order of the prediction residuals of the actual predicted compensation features and the historical reference pigs. The weighted sum of the prediction residuals of multiple historical reference pigs according to this set of coefficients is closest to the actual predicted compensation features needed by the historical candidate pigs. In this embodiment, the collected training dataset is divided into a training set and a test set in an 8:2 ratio. 80% of the data is used for model training, and the remaining 20% is used for testing. It should be noted that the target first coefficient is pre-calculated before training the second model, and the calculation of the target first coefficient does not call the second model. When training the second model, the target first coefficient serves as the supervision label, the first coefficient output by the second model serves as the predicted value, and the second loss function is used to constrain the predicted value to approach the supervision label. The second loss function used to train the second model is:
[0148]
[0149]
[0150] in, This represents the second loss function of the second model; This indicates the number of historical candidate pigs that participated in the training of the second model; This represents the number of historical reference pigs corresponding to the c-th historical candidate pig; This represents the function mapping relationship corresponding to the second model. Indicates the model parameters of the second model; This represents the first historical candidate feature of the c-th historical candidate pig; This represents the first historical reference feature of the i-th historical reference pig corresponding to the c-th historical candidate pig; This represents the historical genomic affinity coefficient between the c-th historical candidate pig and the i-th historical reference pig; This represents the first coefficient of the c-th historical candidate pig output by the second model relative to the i-th historical reference pig; This represents the target first coefficient obtained through pre-calculation.
[0151] This application provides an electronic device that may include a processing module and a memory. The memory stores a computer program, which, when executed by the processor, enables the electronic device to perform the corresponding steps in the deep learning-based pig breeding and screening method described above.
[0152] In this embodiment, the processor can be an integrated circuit chip with signal processing capabilities. For example, the processor can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0153] The memory can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc.
[0154] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding steps in the aforementioned method, and will not be elaborated further here.
[0155] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the deep learning-based pig breeding and screening method described in the above embodiments.
[0156] Computer-readable storage media may be magnetic disks, optical disks, read-only memory, random access memory, flash memory, USB flash drives, hard disks, or solid-state drives, etc., and may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implement the methods shown in the above embodiments.
[0157] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned deep learning-based pig breeding screening method. The computer program product may exist in a computer-readable storage medium in forms including, but not limited to, source files, executable files, and installation package files.
[0158] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, electronic device, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.
[0159] In the embodiments provided in this application, it should be understood that the disclosed methods can also be implemented in other ways. The method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0160] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A deep learning-based method for selecting breeding pigs, characterized in that, The method includes: The candidate first feature of the candidate pig, the reference first feature and reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig are obtained. The candidate pig and the reference pig belong to the offspring of the same hybrid combination. The candidate first feature includes the live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the candidate pig. The reference first feature includes the live backfat thickness, live eye muscle area, whole blood glucose concentration, and whole blood lactate concentration of the reference pig. The reference second feature includes the actual chemical intramuscular fat content of the longissimus dorsi muscle and the droplet water loss rate of the longissimus dorsi muscle of the reference pig. The SNP genotyping data are single nucleotide polymorphism SNP genotyping data. The candidate first feature is input into the first model. Through the first model, the hidden features of the candidate first feature are extracted, and the candidate prediction features of the candidate pig are obtained based on the hidden features. The candidate prediction features include the predicted chemical intramuscular fat content of the longissimus dorsi muscle and the predicted water loss rate of the longissimus dorsi muscle of the candidate pig. The reference first feature is input into the first model, and the reference prediction feature of the reference pig is obtained through the first model. The reference prediction feature includes the predicted chemical intramuscular fat content of the longissimus dorsi muscle and the predicted water loss rate of the longissimus dorsi muscle of the reference pig. The genomic affinity coefficient is calculated using the SNP genotyping data. The genomic affinity coefficient is used to characterize the degree of genetic association between the candidate pig and each of the reference pigs. The second model includes a cross-attention network, which comprises a linear projection layer, an attention layer, and a normalization layer. The candidate first feature, the reference first feature, and the genomic relatedness coefficient are input into the second model. The cross-attention network of the second model obtains the attention weights of the candidate pig to the reference pig, and a first coefficient is obtained based on the attention weights, including: The candidate first feature and the reference first feature are input into the linear projection layer. Based on the candidate first feature and the reference first feature, the linear projection layer obtains the query vector of the candidate pig and the key vector of the reference pig. The query vector of the candidate pig, the key vector of the reference pig, the candidate first feature, the reference first feature, and the genomic kinship coefficient are input into the attention layer. Through the attention layer, the attention score of the candidate pig to the reference pig is obtained. The attention score is input into the normalization layer, and the attention weight of the candidate pig to the reference pig is obtained through the normalization layer. The attention weight of the candidate pig to the reference pig is determined as the first coefficient, which is used to characterize the similarity between the candidate pig and the reference pig. Based on the first coefficient, the reference second feature, the reference prediction feature, and the candidate prediction feature, a modified second feature for the candidate pig is obtained, which is obtained by modifying the candidate prediction feature. Based on the modified second feature and the candidate first feature, all candidate pigs are traversed, and candidate pigs that meet the preset conditions are determined as breeding pigs for breeding.
2. The method according to claim 1, characterized in that, The first model includes an input layer, a hidden layer, and an output layer. The candidate first feature is input into the first model, and through the first model, hidden features of the candidate first feature are extracted. Based on the hidden features, candidate predicted features of the candidate pig are obtained, including: The candidate first feature is input into the first hidden layer, and feature extraction is performed through the first hidden layer to obtain the first hidden feature. The feature dimension of the first hidden feature is higher than that of the candidate first feature. The first hidden feature is input into the second hidden layer, and the second hidden layer is used to extract features to obtain the second hidden feature. The feature dimension of the second hidden feature is lower than that of the first hidden feature. The second hidden feature is input into the output layer, and the candidate predicted feature is obtained through the output layer.
3. The method according to claim 1, characterized in that, The step of obtaining the modified second feature of the candidate pig based on the first coefficient, the reference second feature, the reference prediction feature, and the candidate prediction feature includes: Based on the reference second feature, the reference prediction feature, and the first coefficient, a prediction compensation feature is obtained, which is used to correct the candidate prediction feature. Based on the predicted compensation features, the candidate predicted features are corrected to obtain the corrected second features of the candidate pig.
4. The method according to claim 1, characterized in that, Before obtaining the candidate first feature of the candidate pig, the reference first feature and reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig, the process also includes: Obtain the historical candidate first features and the actual candidate second features of multiple historical candidate pigs, wherein the historical candidate pigs and the candidate pigs belong to the offspring of the same hybrid combination; The historical candidate first feature and the real candidate second feature are integrated into training data; The first model is trained and initialized based on the training data to perform the process of inputting the candidate first feature into the first model and obtaining the candidate predicted feature through the first model.
5. The method according to claim 1, characterized in that, Before obtaining the candidate first feature of the candidate pig, the reference first feature and reference second feature of the reference pig, and the SNP genotyping data of the candidate pig and the reference pig, the process also includes: The historical candidate first feature of multiple historical candidate pigs, the historical reference first feature and the historical reference second feature of historical reference pigs, as well as the historical SNP genotyping data of the historical candidate pigs and the historical reference pigs, and the actual candidate second feature of the historical candidate pigs are obtained. The historical candidate pigs, historical reference pigs, the candidate pigs, and the reference pigs all belong to the offspring of the same hybrid combination. The historical candidate first feature and the historical reference first feature are respectively input into the trained first model, and the historical candidate prediction feature and the historical reference prediction feature are respectively obtained through the trained first model; Historical genomic kinship coefficients were calculated using the historical SNP genotyping data. Based on the true candidate second feature, the historical candidate prediction feature, the historical reference second feature, and the historical reference prediction feature, the target first coefficient of the historical candidate pig corresponding to the historical reference pig is obtained. The historical candidate first feature, the historical reference first feature, the historical genomic affinity coefficient, and the target first coefficient are integrated into training data; The second model is trained and initialized based on the training data to perform the process of inputting the candidate first feature, the reference first feature, and the genomic kinship coefficient into the second model, and obtaining the first coefficient based on the second model.
6. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled together, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 5.
8. A program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Machine learning accurate prediction system for intramuscular fat content of pig living body based on B ultrasonic image characteristic parameters
CN117476093A
Beef cattle genome matching method integrating genetic advantages and defects and application
CN121171334A