Pig crossbreeding method, electronic device, and program product
By acquiring images of the physical characteristics of breeding pigs, screening and crossbreeding Jinhua pigs with other pig breeds, and selecting the best hybrid offspring based on performance scores, the problems of slow growth and low lean meat percentage in Jinhua pigs have been solved, thus achieving the production of high-quality pork.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2026-04-07
AI Technical Summary
Jinhua pigs grow slowly and have a low lean meat percentage, making it difficult to meet the diverse consumer market's demand for high-quality, reasonably priced pork.
By acquiring images of the physical characteristics of breeding pigs, a pre-set breeding pig sample screening strategy is used to select excellent samples for crossbreeding. Combined with Jinhua pigs and other pig breeds with fast growth and high lean meat percentage, the comprehensive performance score is determined based on the pig performance data, and the best-performing crossbred offspring are selected as the breeding results.
It improved the growth rate and lean meat percentage of Jinhua pigs, fully combined the advantages of different pig breeds, and met the consumer market's demand for high-quality pork.
Smart Images

Figure CN121014576B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pig breeding, in particular to a pig crossbreeding method, an electronic device and a program product. BACKGROUND
[0002] Jinhua pig, also known as "Jinhua two black pigs", is a world-renowned Chinese local pig representative breed, which is produced in Yiwu, Dongyang and Jinhua counties in Jinhua area of Zhejiang Province, has the excellent performance of early sexual maturity, thin skin, fine bone, good meat quality, high reproductive ability and strong adaptability, and was listed in the first batch of national livestock and poultry genetic resource protection breed list in June 2006. According to the size, it is divided into Jinhua pig I system (large type), II system (medium type) and III system (small type) three Jinhua pig strains.
[0003] In recent years, with the improvement of living standards, the requirements of consumers for pork have changed obviously, which is from the quantity type of warm and full to the quality type of quality, and the diversified pork consumption market with good quality, good taste and high quality and high price has begun to form and gradually expand.
[0004] In the face of diversified consumption market, how to fully utilize the unique advantages of Jinhua pig such as good meat quality, strong resistance, high reproductive ability and roughage tolerance, and improve the breed characteristics of slow growth, thick back fat and low lean meat rate is the core problem that needs to be solved at present. SUMMARY
[0005] Therefore, the purpose of the embodiments of the present application is to provide a pig crossbreeding method, an electronic device and a program product, which can aggregate excellent traits of different pig resources and improve the problems of slow growth and low lean meat rate of Jinhua pig through crossbreeding.
[0006] To achieve the above technical purpose, the technical scheme adopted by the present application is as follows:
[0007] In a first aspect, the embodiments of the present application provide a pig crossbreeding method, which comprises:
[0008] Obtaining body appearance images of sow samples in Jinhua pig strains and a preset pig breed population;
[0009] According to the body appearance images, a plurality of excellent samples are selected as target sow samples from the Jinhua pig strains and the preset pig breed population through a preset sow sample screening strategy;
[0010] Obtaining pig performance data of crossbred offspring of the target sow samples, the crossbred offspring taking the samples belonging to the Jinhua pig strains in the target sow samples as maternal samples, the samples belonging to the preset pig breed population in the target sow samples as paternal samples, and the maternal samples and the paternal samples being crossbred at a preset ratio to obtain offspring produced by crossbreeding of different pig breeds.
[0011] Based on the pig performance data, the comprehensive performance score of the hybrid offspring is determined through a preset performance evaluation strategy;
[0012] Based on the comprehensive performance score, the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score is determined as the hybridization breeding result.
[0013] In conjunction with the first aspect, in some optional embodiments, the physical image includes multiple sample images of the breeding pig sample taken from different perspectives, and a positioning tag for locating the breeding pig sample.
[0014] Based on the physical images, and using a pre-defined breeding pig sample screening strategy, multiple superior samples are selected as target breeding pig samples from the Jinhua pig breed and the pre-defined pig population, including:
[0015] Based on the physical appearance image, a pre-trained segmentation model is used to segment each of the multiple sample images to obtain a segmentation result, which includes a segmentation mask and multiple anatomical key points of the breeding pig sample.
[0016] Using a preset multi-view entity association strategy, the segmentation results of pig samples belonging to the same breed are merged to obtain the physical features corresponding to each breed pig sample.
[0017] Based on the physical characteristics, the physical trait score of the breeding pig sample is determined, and the breeding pig samples with physical trait scores greater than or equal to a preset threshold are identified as the target breeding pig samples.
[0018] In conjunction with the first aspect, in some optional implementations, a preset multi-view entity association strategy is used to merge the segmentation results of pig samples belonging to the same breed, obtaining the physical features corresponding to each breeding pig sample, including:
[0019] Using a mask feature extractor, feature extraction is performed on the segmentation mask in the segmentation results belonging to the same type of pig to obtain mask features;
[0020] Using a keypoint topology encoder, feature extraction is performed on the anatomical keypoints in the segmentation results of samples belonging to the same pig species to obtain keypoint features;
[0021] Based on the mask features and the key point features, determine the entity association matrix;
[0022] Based on the entity association matrix, the mask features and key point features belonging to the same type of pig are associated to obtain the associated anatomical key points.
[0023] The associated anatomical key points are transformed to obtain anatomical key points in the world coordinate system, which are then used as target key points.
[0024] Based on the target key points, the physical characteristics corresponding to each breeding pig sample are determined.
[0025] In conjunction with the first aspect, in some optional embodiments, the physical characteristics include body length, hip triangle area, backline curvature, and stride height;
[0026] Based on the target key points, the physical characteristics corresponding to each breeding pig sample are determined, including:
[0027] The body length is determined based on the shoulder joint and tail root nodes among the target key points:
[0028]
[0029] In the formula, Indicates body length, , These represent the coordinates of the shoulder joint and the tail root node, respectively.
[0030] Based on the left hip joint node, right hip joint node, and ischial tuberosity node among the target key points, determine the area of the gluteal triangle:
[0031]
[0032]
[0033]
[0034] In the formula, This represents the area of the hip triangle. This represents the vector pointing from the ischial tuberosity to the left hip tuberosity. This represents the vector pointing from the ischial tuberosity to the right hip tuberosity. This indicates the coordinates of the left hip joint node. Indicates the coordinates of the right hip joint node. Represents the coordinates of the ischial tuberosity node;
[0035] The curvature of the back line is determined based on the hairline point, mid-back point, lumbar vertebral elevation point, and sacral vertebral elevation point among the target key points:
[0036]
[0037] In the formula, Indicates the curvature of the back line. This represents the curve obtained by fitting a B-spline curve through the hairline point, the mid-back point, the highest point of the lumbar vertebra, and the highest point of the sacral vertebra;
[0038] The stride height is determined based on the fly nodes in the target key points:
[0039]
[0040] In the formula, Indicates stride height, Represents the time series of fly nodes. Represents the ground reference plane. Represents a unit vector in the vertical direction. This indicates the period for extracting and photographing the appearance of each breeding pig sample during its walking process.
[0041] In conjunction with the first aspect, in some optional implementations, determining the physical trait score of the breeding pig sample based on the physical characteristics, and identifying breeding pig samples with physical trait scores greater than or equal to a preset threshold as the target breeding pig samples, includes:
[0042] Based on the physical characteristics, the physical trait score of the breeding pig sample is determined:
[0043]
[0044] In the formula, Indicates the first The physical characteristics scores corresponding to each breeding pig sample This represents the sigmoid activation function. Dimensions representing physical characteristics Indicates the first Physical characteristics, express The average value within a preset time period express The variance within a preset time period, , These represent the preset variety-specific weights and biases, respectively. Indicates the penalty parameter. Indicates defect compensation;
[0045] Based on the physical characteristics score, the breeding pig samples whose physical characteristics score is greater than or equal to the preset threshold are determined as the target breeding pig samples.
[0046] In conjunction with the first aspect, in some optional implementations, based on the pig performance data, a comprehensive performance score of the hybrid offspring is determined through a preset performance evaluation strategy, including:
[0047] The pig performance data is preprocessed to obtain preprocessed pig performance data, which is then used as input data.
[0048] The input data is evaluated using a pre-defined evaluation model to obtain the comprehensive performance score.
[0049] In conjunction with the first aspect, in some optional embodiments, the pig performance data is preprocessed to obtain preprocessed pig performance data, which is used as input data, including:
[0050] The feature data in the pig performance data are standardized to obtain standardized feature data.
[0051] One-hot encoding is performed on the category data in the pig performance data to obtain the encoded category data;
[0052] The union of the standardized feature data and the encoded category data is used as the input data.
[0053] In conjunction with the first aspect, in some optional implementations, a preset evaluation model is used to perform performance evaluation on the input data to obtain the comprehensive performance score, including:
[0054] Based on the input data, normalized weights are generated using the dynamic weight generator in the preset evaluation model;
[0055] Based on the input data and the normalized weights, the input data is evaluated using an adaptive neural network in the preset evaluation model to obtain the comprehensive performance score.
[0056] Secondly, embodiments of this application also provide an electronic device, which includes a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the above-described method.
[0057] Thirdly, embodiments of this application also provide a computer program product, including a computer program that implements the above-described method when executed by a processor.
[0058] The invention employing the above technical solution has the following advantages:
[0059] The technical solution provided in this application first acquires the physical images of breeding pig samples. Based on these images, and using a preset breeding pig sample screening strategy, multiple superior samples are selected as target breeding pig samples from the Jinhua pig breed and a preset pig population. Then, the performance data of the hybrid offspring of the target breeding pig samples is acquired. Based on this performance data, and using a preset performance evaluation strategy, the comprehensive performance score of the hybrid offspring is determined. Finally, based on the comprehensive performance score, the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score is determined as the hybridization breeding result. In this way, by hybridizing the Jinhua pig breed with other fast-growing, high-lean-percentage pig breeds, and selecting the hybrid combination with the best offspring performance as the breeding result, the advantages of Jinhua pigs and other pig breeds are fully combined, improving the problems of slow growth and low lean-percentage in Jinhua pigs. Attached Figure Description
[0060] 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.
[0061] Figure 1 A structural block diagram of an electronic device provided in an embodiment of this application.
[0062] Figure 2 This is one of the flowcharts illustrating the pig hybridization breeding method provided in the embodiments of this application.
[0063] Figure 3 This is the second flowchart illustrating the pig hybridization breeding method provided in the embodiments of this application.
[0064] Icons: 100 - Electronic device; 101 - Processor; 102 - Memory. Detailed Implementation
[0065] 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.
[0066] Please refer to Figure 1 This application provides an electronic device 100 that may include a processor 101 and a memory 102. The memory 102 stores a computer program, which, when executed by the processor 101, enables the electronic device 100 to perform the corresponding steps in the following pig crossbreeding method.
[0067] In this embodiment, the processor 101 can be an integrated circuit chip with signal processing capabilities. The processor 101 can be a general-purpose processor. For example, the processor 101 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.
[0068] The memory 102 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. In this embodiment, the memory 102 can be used to store physical images, preset breeding pig sample screening strategies, target breeding pig samples, pig performance data, preset performance evaluation strategies, comprehensive performance scores, crossbreeding results, etc. Of course, the memory 102 can also be used to store programs, which the processor 101 executes after receiving an execution instruction.
[0069] In this embodiment, the electronic device 100 can be a personal computer, laptop, cloud server, etc. It is used to acquire physical images of breeding pig samples, and based on these images, selects multiple superior samples from the Jinhua pig breed and a preset pig population as target breeding pig samples using a preset breeding pig sample screening strategy. Then, it acquires the pig performance data of the hybrid offspring of the target breeding pig samples, and based on this data, determines the comprehensive performance score of the hybrid offspring using a preset performance evaluation strategy. Finally, based on the comprehensive performance score, the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score is determined as the hybridization breeding result.
[0070] Understandable Figure 1 The electronic device 100 shown is only a schematic diagram; the electronic device 100 may also include components that are more... Figure 1 More components are shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0071] Please refer to Figure 2This application also provides a method for breeding crossbred pigs, which can be applied to the aforementioned electronic device 100, and the electronic device 100 executes or implements the steps of the method. The method for breeding crossbred pigs may include the following steps:
[0072] Step 210: Obtain physical images of breeding pig samples from the Jinhua pig breed and the preset pig population;
[0073] Step 220: Based on the physical appearance image, select multiple excellent samples from the Jinhua pig breed and the preset pig population as target breeding pig samples through a preset breeding pig sample screening strategy;
[0074] Step 230: Obtain the pig performance data of the hybrid offspring of the target breeding pig sample. The hybrid offspring are characterized by taking the sample of the target breeding pig sample belonging to the Jinhua pig breed as the maternal sample and the sample of the target breeding pig sample belonging to the preset pig breed population as the paternal sample. The maternal sample and the paternal sample are hybridized according to a preset ratio to obtain offspring produced by hybridization of different pig breeds.
[0075] Step 240: Based on the pig performance data, determine the comprehensive performance score of the hybrid offspring through a preset performance evaluation strategy;
[0076] Step 250: Based on the comprehensive performance score, determine the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score as the hybridization breeding result.
[0077] In the above implementation, firstly, physical images of breeding pig samples are acquired. Based on these images, and using a preset breeding pig sample selection strategy, multiple superior samples are selected as target breeding pig samples from the Jinhua pig breed and a preset pig population. Then, performance data of the hybrid offspring of the target breeding pig samples is acquired. Based on this performance data, and using a preset performance evaluation strategy, a comprehensive performance score for the hybrid offspring is determined. Finally, based on the comprehensive performance score, the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score is determined as the hybridization breeding result. In this way, by hybridizing the Jinhua pig breed with other fast-growing, high-lean-meat-percentage pig breeds, and selecting the hybrid combination with the best offspring performance as the breeding result, the advantages of Jinhua pigs and other pig breeds are fully combined, improving the problems of slow growth and low lean-meat percentage in Jinhua pigs.
[0078] The following is a detailed explanation of each step in the method of crossbreeding pigs:
[0079] In step 210, the preset pig breed population can be a pig breed that has complementary breed advantages to Jinhua pigs. For example, Berkshire pigs and Duroc pigs. In this embodiment, Jinhua pig breeds (including Jinhua pig I, Jinhua pig II and Jinhua pig III) are used as maternal breeding pig samples, and Berkshire pigs and Duroc pigs are used as paternal breeding pig samples, which are then crossbred.
[0080] In this embodiment, the acquisition of physical appearance images can be carried out during the usage phase of the technical solution proposed in this application. This can be achieved by using a pig identification system pre-installed at the entrance and exit of the farm to capture images in real time and upload them to the processor 101 of the aforementioned electronic device 100 for subsequent data processing such as breeding pig sample screening and performance evaluation. Alternatively, the acquisition of physical appearance images can also be carried out during the testing phase of the technical solution proposed in this application. Based on sample images of breeding pig samples from different perspectives pre-input by the user, the sample images of each breeding pig sample are pre-stored in the memory 102 of the aforementioned electronic device 100, and then invoked based on instructions initiated by the user through the processor 101 during subsequent data processing such as breeding pig sample screening and performance evaluation. The specific method of acquiring physical appearance images is not limited here.
[0081] In this embodiment, the pig identification system may include a shooting device consisting of multiple cameras, an infrared light curtain for sensing the passage of pigs, and a checkerboard for camera calibration. The cameras are pre-calibrated using the checkerboard. Then, when a pig passes by (i.e., blocks the infrared light curtain), a shooting command is triggered, and the shooting device captures images of the pig from different perspectives. To facilitate pig identification and location, each pig also carries an RFID (Radio Frequency Identification) tag. The RFID tag contains information such as the pig's ID (Identity Document) and breed. The information carried by the RFID tag can be recorded in each sample image of the pig's appearance, serving as a location tag.
[0082] In step 220, based on the physical appearance image, and through a preset breeding pig sample screening strategy, multiple excellent samples are selected as target breeding pig samples from the Jinhua pig breed and the preset pig population. This may include:
[0083] Based on the physical appearance image, a pre-trained segmentation model is used to segment each of the multiple sample images to obtain a segmentation result. The segmentation result includes a segmentation mask and multiple anatomical key points of the breeding pig sample.
[0084] (1)
[0085] In the formula, Indicates the first The first of the physical images of the breeding pig samples Sample images from each viewpoint This represents the segmentation mask (where 0 represents the background and 1 represents the target pig sample). express Key anatomical points and their coordinates This represents a pre-trained segmentation model. This represents the hyperparameters of the pre-trained segmentation model.
[0086] Using a preset multi-view entity association strategy, the segmentation results of pig samples belonging to the same breed are merged to obtain the physical features corresponding to each breed pig sample.
[0087] Based on the physical characteristics, the physical trait score of the breeding pig sample is determined, and the breeding pig samples with physical trait scores greater than or equal to a preset threshold are identified as the target breeding pig samples.
[0088] In this embodiment, the pre-trained segmentation model can be a neural network model that uses images of multiple breeding pig samples as training data. It possesses image segmentation capabilities and can segment the mask and various anatomical key points on the pig from the image. The pre-trained segmentation model in this embodiment can be HRNet (High-Resolution Net), Mask R-CNN, etc.
[0089] The key anatomical points in this embodiment may include the top of the head, the neck-back junction, the posterior border of the scapula, the highest point of the thoracic vertebrae (withers), the mid-back, the highest point of the lumbar vertebrae (loin), the highest point of the sacrum (hip), the tail root, the pinbone, the hip bone, the shoulder joint, the elbow joint, the knee joint, the hip joint, the stifle joint, the hock, the front hoof, and the rear hoof.
[0090] In this embodiment, a preset multi-view entity association strategy is used to merge the segmentation results of pig samples belonging to the same breed to obtain the physical features corresponding to each breeding pig sample, which may include:
[0091] Using a mask feature extractor, feature extraction is performed on the segmentation mask in the segmentation results belonging to the same type of pig to obtain mask features;
[0092] Using a keypoint topology encoder, feature extraction is performed on the anatomical keypoints in the segmentation results of samples belonging to the same pig species to obtain keypoint features;
[0093] Based on the mask features and the key point features, determine the entity association matrix;
[0094] Based on the entity association matrix, the mask features and key point features belonging to the same type of pig are associated to obtain the associated anatomical key points.
[0095] The associated anatomical key points are transformed to obtain anatomical key points in the world coordinate system, which are then used as target key points.
[0096] Based on the target key points, the physical characteristics corresponding to each breeding pig sample are determined.
[0097] In this embodiment, RFID tags are used to initially locate the breeding pig samples, but there are problems such as insufficient positioning accuracy and difficulty in distinguishing overlapping breeding pig samples. Therefore, this embodiment uses a mask feature extractor and a keypoint topology encoder to extract mask features and keypoint features respectively, and constructs an entity association matrix based on the keypoint features and mask features. The entity association matrix represents the cosine similarity of mask features and keypoint features in sample images from any two viewpoints. Features contained in two sample images with a cosine similarity greater than 0.99 are considered as features of the same breeding pig sample, thus enabling the association of mask features and keypoint features in multiple sample images belonging to the same breeding pig sample. The construction of the entity association matrix is represented as follows:
[0098] (2)
[0099] In the formula, Represents the entity association matrix. This refers to a cross-perspective entity re-identification model (e.g., a classification model based on ternary loss), which is also the neural network model used to implement the pre-defined multi-perspective entity association strategy of this technical solution. This represents the hyperparameters of the cross-view entity re-identification model. This indicates that the mask feature extractor is used to extract features from... Mask features are extracted from sample images from each viewpoint. This indicates that the keypoint topology encoder is used to... Key point features are extracted from sample images from each viewpoint. This represents the feature concatenation operation. The mask feature extractor can be VGG (Visual Geometry Group)19, and the keypoint topology encoder can be a graph convolutional network.
[0100] In this way, by associating the mask features and key point features in sample images from different perspectives, the problem of RFID tags locating pigs (including breeding pig samples) in sample images from different perspectives and the problem of unclear overlapping positioning can be corrected.
[0101] In this embodiment, after completing the feature association (i.e., mask features and keypoint features) and obtaining the associated anatomical keypoints, the associated anatomical keypoints are projected onto the camera coordinate system using the camera intrinsic parameter matrix. Then, using the previously calibrated extrinsic parameter transformation matrix (including the camera rotation matrix and position vector), the anatomical keypoints in the camera coordinate system are mapped to the world coordinate system to obtain the target keypoints. This is represented as follows:
[0102] (3)
[0103] In the formula, This represents the set of key points of the target. This represents the Huber loss function (used to suppress outliers). Indicates the first The camera intrinsic parameter matrix of each camera. Indicates the number of key points of the target. Indicates the number of camera / viewpoint / sample images. , Indicates the first The camera rotation matrix and position vector of each camera. Represents the coordinates of the associated anatomical key points.
[0104] In this embodiment, during the process of mapping anatomical keypoints from the camera coordinate system to the world coordinate system to obtain target keypoints, the change from anatomical keypoints to target keypoints is only a transformation of the coordinate system; the physical meaning they represent remains unchanged (for example, the head vertex in the associated anatomical keypoints still represents the head vertex after mapping to the world coordinate system). Therefore, for ease of understanding and description, each keypoint in the target keypoints still uses the naming of the original anatomical keypoints.
[0105] In this embodiment, the physical features include body length, hip triangle area, backline curvature, and stride height;
[0106] Determining the physical characteristics corresponding to each breeding pig sample based on the target key points may include:
[0107] The body length is determined based on the shoulder joint and tail root nodes among the target key points:
[0108] (4)
[0109] In the formula, Indicates body length, , These represent the coordinates of the shoulder joint and the tail root node, respectively.
[0110] Based on the left hip joint node, right hip joint node, and ischial tuberosity node among the target key points, determine the area of the gluteal triangle:
[0111] (5)
[0112] (6)
[0113] (7)
[0114] In the formula, This represents the area of the hip triangle. This represents the vector pointing from the ischial tuberosity to the left hip tuberosity. This represents the vector pointing from the ischial tuberosity to the right hip tuberosity. This indicates the coordinates of the left hip joint node. Indicates the coordinates of the right hip joint node. Represents the coordinates of the ischial tuberosity node;
[0115] The curvature of the back line is determined based on the hairline point, mid-back point, lumbar vertebral elevation point, and sacral vertebral elevation point among the target key points:
[0116] (8)
[0117] In the formula, Indicates the curvature of the back line. This represents the curve obtained by fitting a B-spline curve through the hairline point, the mid-back point, the highest point of the lumbar vertebra, and the highest point of the sacral vertebra;
[0118] The stride height is determined based on the fly nodes in the target key points:
[0119] (9)
[0120] In the formula, Indicates stride height, Represents the time series of fly nodes. Represents the ground reference plane. Represents a unit vector in the vertical direction. This represents the period during which images of the appearance of each breeding pig sample are extracted while walking (containing at least one complete gait cycle).
[0121] In this embodiment, determining the physical trait score of the breeding pig sample based on the physical characteristics, and identifying breeding pig samples with physical trait scores greater than or equal to a preset threshold as the target breeding pig samples, may include:
[0122] Based on the physical characteristics, the physical trait score of the breeding pig sample is determined:
[0123] (10)
[0124] In the formula, Indicates the first The physical characteristics scores corresponding to each breeding pig sample This represents the sigmoid activation function. Dimensions representing physical characteristics Indicates the first Physical characteristics, express The average value within a preset time period express The variance within a preset time period, , These represent the preset variety-specific weights and biases, respectively. Indicates the penalty parameter. Indicates defect compensation;
[0125] Based on the physical characteristics score, the breeding pig samples whose physical characteristics score is greater than or equal to the preset threshold are determined as the target breeding pig samples.
[0126] In this embodiment, the preset time period can be flexibly set according to user needs. The preset threshold can be a fixed value determined based on user needs, or it can be the mean of all breeding pig samples, or a calculation of the mean and variance (e.g.) , This represents the mean. The result after representing variance, etc.
[0127] Understandably, in practical applications, target breeding pig samples can be understood as the initial screening results for breeding pigs, reducing the time and labor costs required for breeding pig selection. To ensure the quality of breeding pigs, users can also collect trait data (such as hair luster, growth rate, carcass data, etc.) for each target breeding pig sample after the initial screening, and submit them to experts for review to obtain breeding pig samples after secondary screening, ensuring the quality of the breeding pig samples.
[0128] In step 230, the pig performance data can be measurement data from the crossbreeding process, and may include:
[0129] Reproductive performance data, such as parturition time, parity, total number of offspring, live births, stillbirths, mummies, birth weight, etc.
[0130] Growth and fattening performance data, such as daily weight gain, feed conversion ratio, backfat thickness, and age at which body weight reaches 75 kg;
[0131] Carcass performance data, such as eye muscle area and intramuscular fat content.
[0132] The process of measuring reproductive performance data can involve separating the statistics for primiparous and multiparous sows. Data on sows that give birth should be recorded, including farrowing time, parity, total number of piglets born, live piglets, stillbirths, mummified piglets, and birth weight. Individual numbers of newborn piglets should also be recorded.
[0133] The process of determining growth and fattening performance data (i.e., growth performance data) can begin at the end of the nursery period, with initial selection of pigs to be tested for growth and fattening performance. Selected individuals must be healthy, free of genetic defects (cryptorchidism, inguinal canthus, etc.), have normal growth and development, and conform to breed characteristics in body shape and appearance. The standard for the number of pigs to be tested for fattening performance is to ensure that each litter has 2 males (♂) and 3 females (♀) before the end of the nursery period, and 1 male and 2 females (♀) at the end of the testing period (if conditions permit, the entire herd can be tested). Boars are tested in individual pens or using an automated boar performance testing system (which automatically records and calculates boar weight, feed intake, growth dates, etc., and performs routine data calculations, which will not be elaborated here), while sows are tested in small groups. Free access to feed and water is provided, and daily feed consumption is recorded. After the testing, backfat thickness is measured using ultrasound. The final growth and fattening performance data described above is obtained.
[0134] The process for determining carcass performance data can be as follows:
[0135] (a) Eye muscle area: While measuring the backfat thickness of the live animal, the eye muscle area of the same location was measured by ultrasound scanning and expressed in square centimeters.
[0136] (b) Intramuscular fat content: The longissimus dorsi muscle was used and the content was determined according to NY / T 821-2019 (Technical Specification for Determination of Pork Quality).
[0137] In this embodiment, based on the screening results of breeding pig samples (i.e., target breeding pig samples) from three pig breeds (five pig groups, including Jinhua pig I, Jinhua pig II, Jinhua pig III, Duroc, and Berkshire pigs), breeding boars and sows with excellent body shape and appearance were selected. Crossbreeding systems were constructed using Jinhua pig I, II, and III groups as maternal lines and Duroc and Berkshire boars as paternal lines to produce Duroc × Jinhua pig I, Duroc × Jinhua pig II, Duroc × Jinhua pig III, Berkshire × Jinhua pig I, Berkshire × Jinhua pig II, and Berkshire × Jinhua pig III crossbreeding combinations. The growth performance, carcass performance, and reproductive performance of each combination under different crossbreeding patterns were measured and compared as pig performance data, providing data for screening the optimal crossbreeding combinations using Jinhua pigs as breeding material.
[0138] In step 240, based on the pig performance data and through a preset performance evaluation strategy, the comprehensive performance score of the hybrid offspring is determined, which may include:
[0139] The pig performance data is preprocessed to obtain preprocessed pig performance data, which is then used as input data.
[0140] The input data is evaluated using a pre-defined evaluation model to obtain the comprehensive performance score.
[0141] In this embodiment, the pig performance data is preprocessed to obtain preprocessed pig performance data, which, as input data, may include:
[0142] The feature data in the pig performance data are standardized to obtain standardized feature data.
[0143] One-hot encoding is performed on the category data in the pig performance data to obtain the encoded category data;
[0144] The union of the standardized feature data and the encoded category data is used as the input data.
[0145] This eliminates the dimensional differences between the various feature data, facilitating subsequent calculations and processing.
[0146] In this embodiment, the input data is evaluated using a preset evaluation model to obtain the comprehensive performance score, which may include:
[0147] Based on the input data, normalized weights are generated using the dynamic weight generator in the preset evaluation model:
[0148] (11)
[0149] (12)
[0150] (13)
[0151] (14)
[0152] In the formula, This represents the dynamic weight matrix for each target breeding pig sample, composed of normalized weights. Indicates individual age in months. Indicates stage factor, Represents the distribution factor. This represents the median of the performance distribution matrix of the target breeding pig sample with a determined comprehensive performance score (i.e., The overall performance score is the median of all overall performance scores, and it is recalculated each time a new overall performance score is collected. This represents the standard deviation of all known comprehensive performance scores. Indicates the first The first target breeding pig sample Feature data, Indicates the first The first target breeding pig sample The original weights corresponding to the feature data. Indicates the first The preset breeding target weights corresponding to the feature data. Indicates the number of items in the feature data.
[0153] Based on the input data and the normalized weights, the input data is evaluated using an adaptive neural network in the preset evaluation model to obtain the comprehensive performance score.
[0154] The adaptive neural network includes a shared layer, a trait branching layer, and a dynamic scoring layer. The computational process of each layer is as follows:
[0155] (15)
[0156] (16)
[0157] (17)
[0158] In the formula, This represents the output of the shared layer. This represents the output of the trait branching layer. This represents the output of the dynamic scoring layer, i.e., the overall performance score. , For a trainable parameter matrix, , For trainable biases Indicates the first Input data for a target breeding pig sample. This indicates that features are transformed through linear changes. The decoder converts the data into a comprehensive performance score. , This is the activation function.
[0159] In step 250, after determining the comprehensive performance score, the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score is taken as the hybridization breeding result.
[0160] In this embodiment, after determining the hybrid offspring with the highest overall performance score, 20 boars and 80 sows from this batch of offspring are selected to form the foundation herd F0 generation. These are then used for selective breeding to produce F1 generation pigs. Based on the breeding results, the F1 generation pigs are tested for growth performance, carcass performance, and meat quality traits. Simultaneously, blood samples or ear tissue samples are collected. Genetic background analysis is performed using a porcine 10K gene chip. Genetic evaluation is conducted using conventional testing data combined with SNP (single nucleotide polymorphism) information. Based on the predetermined breeding goals, the F2 generation of breeding pigs is selected, resulting in the final hybridization breeding outcome.
[0161] In summary, referring to Figure 3 This application provides a method for breeding crossbreeding pigs. This method uses a preset breeding pig sample screening strategy to select target breeding pig samples that meet the physical characteristics of high-quality breeding pigs from Jinhua pig I, Jinhua pig II, Jinhua pig III, Duroc pigs, and Berkshire pigs. From the selected target breeding pig samples, 48 pigs each from Jinhua pig I, Jinhua pig II, and Jinhua pig III are used as maternal breeding pigs, and 8 pigs each from Duroc and Berkshire pigs are used as paternal breeding pigs. According to a preset ratio (this application uses 1:3 as an example, i.e., each paternal breeding pig is paired with three maternal breeding pigs), six crossbreeding combinations are produced: Duroc × Jinhua pig I, Duroc × Jinhua pig II, Duroc × Jinhua pig III, Berkshire × Jinhua pig I, Berkshire × Jinhua pig II, and Berkshire × Jinhua pig III. Then, the growth performance, carcass performance, and reproductive performance of the offspring from the six combinations were evaluated. The hybrid offspring with the highest overall performance score was selected as the optimal combination. From the offspring of the optimal combination, 20 boars and 80 sows were selected to form the foundation herd F0 generation. These were then selectively mated to produce F1 generation pigs (the next generation after F0). Based on the breeding results, the growth performance, carcass performance, and meat quality traits of the F1 generation pigs were measured. Simultaneously, blood samples or ear tissue samples were collected for genetic background analysis using a porcine 10K gene chip. Pedigree construction and genetic evaluation were performed using conventional measurement data combined with SNP (single nucleotide polymorphism) information. Finally, according to the predetermined breeding goals, the F2 generation of breeding pigs was selected, completing the first generation of crossbreeding and fixing of the new hybrid breed, thus obtaining the final crossbreeding results.
[0162] 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 100 described above can be referred to the corresponding process of each step in the aforementioned method, and will not be elaborated further here.
[0163] This application also provides a computer program product, including a computer program that, when executed by processor 101, implements the above-described pig crossbreeding method.
[0164] 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 CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.
[0165] In summary, this application provides a method for breeding crossbreeding pigs, an electronic device 100, and a program product. In this technical solution, firstly, physical images of breeding pig samples are acquired. Based on these images, a preset breeding pig sample screening strategy is used to select multiple excellent samples from the Jinhua pig breed and a preset pig population as target breeding pig samples. Then, the performance data of the crossbred offspring of the target breeding pig samples is acquired. Based on this performance data, a preset performance evaluation strategy is used to determine the comprehensive performance score of the crossbred offspring. Finally, based on the comprehensive performance score, the target breeding pig sample corresponding to the crossbred offspring with the highest comprehensive performance score is determined as the crossbreeding result. Thus, by crossbreeding the Jinhua pig breed with other fast-growing, high-lean-percentage pig breeds and selecting the crossbreeding combination with the best offspring performance as the breeding result, the advantages of Jinhua pigs and other pig breeds are fully combined, improving the problems of slow growth and low lean-percentage in Jinhua pigs.
[0166] 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.
[0167] 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 method for crossbreeding pigs, characterized in that, The method includes: Obtain morphological images of breeding pig samples from the Jinhua pig breed and the preset pig population; Based on the physical images, and through a preset breeding pig sample screening strategy, multiple excellent samples are selected from the Jinhua pig breed and the preset pig population as target breeding pig samples. The performance data of the hybrid offspring of the target breeding pig sample are obtained. The hybrid offspring are characterized by taking the sample of the target breeding pig sample belonging to the Jinhua pig breed as the maternal sample and the sample of the target breeding pig sample belonging to the preset pig breed population as the paternal sample. The maternal sample and the paternal sample are hybridized according to a preset ratio to obtain offspring produced by hybridization of different pig breeds. Based on the pig performance data, the comprehensive performance score of the hybrid offspring is determined through a preset performance evaluation strategy; Based on the comprehensive performance score, the target breeding pig sample corresponding to the hybrid offspring with the highest comprehensive performance score is determined as the hybridization breeding result; The physical images include multiple sample images of the breeding pig samples taken from different perspectives, as well as positioning tags used to locate the breeding pig samples. Based on the physical images, and using a pre-defined breeding pig sample screening strategy, multiple superior samples are selected as target breeding pig samples from the Jinhua pig breed and the pre-defined pig population, including: Based on the physical appearance image, a pre-trained segmentation model is used to segment each of the multiple sample images to obtain a segmentation result, which includes a segmentation mask and multiple anatomical key points of the breeding pig sample. Using a preset multi-view entity association strategy, the segmentation results of pig samples belonging to the same breed are merged to obtain the physical features corresponding to each breed pig sample. Based on the physical characteristics, the physical trait score of the breeding pig sample is determined, and the breeding pig sample with the physical trait score greater than or equal to a preset threshold is determined as the target breeding pig sample. Based on the physical characteristics, determine the physical trait score of the breeding pig sample, and determine the breeding pig samples with physical trait scores greater than or equal to a preset threshold as the target breeding pig samples, including: Based on the physical characteristics, the physical trait score of the breeding pig sample is determined: ; In the formula, Indicates the first The physical characteristics scores corresponding to each breeding pig sample This represents the sigmoid activation function. Dimensions representing physical characteristics, Indicates the first Physical characteristics, express The average value over a preset time period express The variance within a preset time period, , These represent the preset variety-specific weights and biases, respectively. Indicates the penalty parameter. Indicates defect compensation; Based on the physical characteristics score, the breeding pig samples whose physical characteristics score is greater than or equal to the preset threshold are determined as the target breeding pig samples.
2. The method according to claim 1, characterized in that, Using a pre-defined multi-view entity association strategy, the segmentation results of pig samples belonging to the same breed are merged to obtain the physical features corresponding to each pig sample, including: Using a mask feature extractor, feature extraction is performed on the segmentation mask in the segmentation results belonging to the same type of pig to obtain mask features; Using a keypoint topology encoder, feature extraction is performed on the anatomical keypoints in the segmentation results of samples belonging to the same pig species to obtain keypoint features; Based on the mask features and the key point features, determine the entity association matrix; Based on the entity association matrix, the mask features and key point features belonging to the same type of pig are associated to obtain the associated anatomical key points. The associated anatomical key points are transformed to obtain anatomical key points in the world coordinate system, which are then used as target key points. Based on the target key points, the physical characteristics corresponding to each breeding pig sample are determined.
3. The method according to claim 2, characterized in that, The physical characteristics include body length, hip triangle area, backline curvature, and stride height; Based on the target key points, the physical characteristics corresponding to each breeding pig sample are determined, including: The body length is determined based on the shoulder joint and tail root nodes among the target key points: ; In the formula, Indicates body length, , These represent the coordinates of the shoulder joint and the tail root node, respectively. Based on the left hip joint node, right hip joint node, and ischial tuberosity node among the target key points, determine the area of the gluteal triangle: ; ; ; In the formula, This represents the area of the hip triangle. This represents the vector pointing from the ischial tuberosity to the left hip tuberosity. This represents the vector pointing from the ischial tuberosity to the right hip tuberosity. This indicates the coordinates of the left hip joint node. Indicates the coordinates of the right hip joint node. Represents the coordinates of the ischial tuberosity node; The curvature of the back line is determined based on the hairline point, mid-back point, lumbar vertebral elevation point, and sacral vertebral elevation point among the target key points: ; In the formula, Indicates the curvature of the back line. This represents the curve obtained by fitting a B-spline curve through the hairline point, the mid-back point, the highest point of the lumbar vertebra, and the highest point of the sacral vertebra; The stride height is determined based on the fly nodes in the target key points: ; In the formula, Indicates stride height, Represents the time series of fly nodes. Represents the ground reference plane. Represents a unit vector in the vertical direction. This indicates the period for extracting and photographing the appearance of each breeding pig sample during its walking process.
4. The method according to claim 1, characterized in that, Based on the pig performance data, a comprehensive performance score for the hybrid offspring is determined using a preset performance evaluation strategy, including: The pig performance data is preprocessed to obtain preprocessed pig performance data, which is then used as input data. The input data is evaluated using a pre-defined evaluation model to obtain the comprehensive performance score.
5. The method according to claim 4, characterized in that, The pig performance data is preprocessed to obtain preprocessed pig performance data, which serves as input data, including: The feature data in the pig performance data are standardized to obtain standardized feature data. One-hot encoding is performed on the category data in the pig performance data to obtain the encoded category data; The union of the standardized feature data and the encoded category data is used as the input data.
6. The method according to claim 4, characterized in that, Using a pre-defined evaluation model, the input data is evaluated to obtain the comprehensive performance score, including: Based on the input data, normalized weights are generated using the dynamic weight generator in the preset evaluation model; Based on the input data and the normalized weights, the input data is evaluated using an adaptive neural network in the preset evaluation model to obtain the comprehensive performance score.
7. 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-6.
8. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Live pig body shape and appearance evaluation method and device based on machine vision
CN113762745A
Pig physical appearance scoring method and device
CN119251138A