Pig matching line evaluation and regional optimization method based on heterogeneous information network
Patent Information
- Application Number
- CN202611502550.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-10-30
AI Technical Summary
人工经验方法受限于专家个体认知,难以在众多品系组合与区域条件之间进行系统比较
本方案通过构建覆盖原种场至屠宰场的全产业链异构信息网络,将系谱、繁殖、生长、屠宰、流转、环境及成本等多源数据统一融合为可计算的关联拓扑,打破了传统各环节数据孤立的局限,使配套系性能评估建立在全生命周期数据贯通的基础上。同时,采用层次注意力网络对遗传边、饲养边、流转边和性能记录边进行节点级与语义级双重聚合,能够自动捕获不同关系对繁殖、生长、屠宰性能的影响强度与模式,避免了人工预设指标权重的片面性,提高了评估的客观性和准确性。在此基础上,引入目标区域环境特征向量与区域偏好权重修正机制,使同一配套系在不同区域条件下能够获得差异化的适配评分,实现了从“一套标准评全部”向“分区域自适应决策”的转变。最后,通过带约束的组合优化模型,将祖代种猪供应上限、亲本遗传距离下限和生物安全引种路径限制纳入决策过程,确保输出的最优配套系不仅综合性能优异,而且在实际供种和防疫条件下切实可行,进而保证了优选结果的生产落地能力。
Smart Images

Figure CN123014816A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pig farming technology, and in particular to a method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks. Background Technology
[0002] Swine breeding systems are a core element determining the overall production efficiency of commercial pigs, and their selection requires a comprehensive consideration of reproductive performance, growth performance, and slaughter performance under specific regional conditions. The modern swine industry chain encompasses multiple stages, including breeding farms, propagation farms, commercial farms, fattening farms, and slaughterhouses. Each stage accumulates massive amounts of data, including pedigree, mating and farrowing data, growth measurements, slaughter measurements, inter-farm transfer data, environmental monitoring, and cost data. However, due to the independent information systems and inconsistent data standards at each stage, this data has long been fragmented, making it difficult to form a complete picture of the breeding system's performance throughout its entire lifecycle. Furthermore, the data boundaries of existing swine breeding systems typically end at the core group (breeding farms / propagation farms), and data from commercial farms, farmers / fattening farms, and slaughterhouses cannot be traced back to the pedigree and breed information of the breeding pigs. Independent data storage at each stage, inconsistent formats, and the lack of a unified breeding system coding and transmission mechanism prevent the attribution of end-stage traits at the slaughterhouse back to the breeding pig breed.
[0003] Currently, breeding system evaluation mainly relies on human experience or single-level index weighting. Human experience methods are limited by individual expert knowledge and are difficult to use for systematic comparisons among numerous breed combinations and regional conditions. Single-level index weighting methods simply linearly superimpose reproductive, growth, and slaughter performance, failing to depict the non-linear hierarchical transmission relationship between performance dimensions, and also unable to dynamically adjust the evaluation focus according to differences in climate, feed costs, and consumer preferences between regions. In addition, existing breeding programs usually provide "globally optimal" breeding system recommendations, but the optimal breeding system may differ in different regions (climate, feed resources, market demand, slaughterhouse standards).
[0004] With the mature application of heterogeneous information networks and attention mechanisms in the field of complex relationship modeling, it is technically feasible to organically integrate multi-source heterogeneous data from the entire industry chain into a unified network topology and automatically capture the intensity and pattern of performance impact under different relationships through hierarchical attention learning. Therefore, this invention proposes a method for evaluating and optimizing pig breeding systems based on heterogeneous information networks to effectively adapt to the pig breeding system evaluation scenario. Furthermore, it introduces regional adaptive decision-making and constraint optimization based on the evaluation to achieve intelligent assistance in pig farming. Summary of the Invention
[0005] This invention overcomes the shortcomings of the prior art and provides a method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks. Its main purpose is to enhance the data integration of the entire industry chain, improve the accuracy of breeding system evaluation, and ensure that regional optimization decisions are practically feasible.
[0006] To achieve the above objectives, the first aspect of the present invention provides a method for evaluating and regionally selecting pig breeding lines based on heterogeneous information networks, comprising: Acquire multi-source heterogeneous data covering the entire pig breeding industry chain, perform preprocessing on the multi-source heterogeneous data, and generate a standardized multi-source heterogeneous dataset. Based on the standardized multi-source heterogeneous dataset, a heterogeneous information network containing genetic edges, feeding edges, transfer edges, and performance recording edges is constructed. Mutual information pruning is performed on the transfer edges, and temporal weights that decay exponentially with time are assigned to the performance recording edges, resulting in a heterogeneous network topology of the entire industry chain that characterizes the performance formation path of the supporting system. A hierarchical attention network is used to perform representation learning on the heterogeneous information network. Node-level attention and semantic-level attention are used to capture the intensity and pattern of performance impact under different relations. Finally, the multi-relation embeddings are weighted and fused into the final node embedding representation. The node is finally embedded and input into an independent multilayer perceptron to perform hierarchical performance prediction to obtain hierarchical performance prediction information. The hierarchical performance prediction information is normalized to obtain a multidimensional heterogeneous performance prediction score. The multidimensional heterogeneous performance prediction score is used to perform a comprehensive regional adaptation evaluation of the system to be evaluated to obtain a comprehensive regional adaptation score. Based on the regional adaptation comprehensive score of each candidate breeding line, a constrained combinatorial optimization model is constructed. The constraints include the upper limit of grandparent breeding pig supply, the lower limit of parental genetic distance, and the restriction of biosafety introduction routes. Finally, the optimal breeding line and the recommendation reason report are output through iterative solution.
[0007] In this solution, the acquisition of multi-source heterogeneous data covering the entire pig breeding industry chain, and the preprocessing of the multi-source heterogeneous data to generate a standardized multi-source heterogeneous dataset, specifically include: Obtain multi-source heterogeneous data from the data information terminal of the entire pig breeding industry chain, including pedigree records, mating and farrowing records, individual growth and weighing records, slaughter measurement records, pig cross-farm transfer records, continuous monitoring readings of environmental sensors, and regional feed raw material costs and pork market prices. The multi-source heterogeneous data is subjected to field-level consistency verification to remove type mismatch and duplicate records. Missing numerical indicators are filled with the mean values grouped by breed, parity, and season and a binary mask label is generated to obtain the repaired dataset. Based on the repaired dataset, the interquartile range of each numerical index is calculated by grouping by strain and field type. Outliers exceeding 1.5 times the interquartile range are removed, and the data is then filled with the median within the group after emptying to obtain the outlier repaired dataset. Based on the outlier repair dataset, individual growth records are sorted by timestamp. For cases where the interval between two adjacent weighings exceeds a preset number of days and weight values are missing, a local weighted regression scatter smoothing algorithm is used to interpolate the gestational age node. For reproductive records, the number of days of pregnancy is calculated and records that exceed the physiologically reasonable range are removed to obtain a time-aligned dataset. Based on the time-aligned dataset, Z-score standardization is performed on all numerical fields. A global code table and unique code are established for the fields of strain identification, field type, and inter-field transfer path category. The unique code is then used to perform numerical conversion to generate a code mapping table. Based on the encoding mapping table, the data integrity rate of each farm is evaluated, and farms with integrity rates below a preset threshold are marked as low-confidence farms and the low-confidence marks are recorded. The standardized multi-source heterogeneous dataset is divided into training set, validation set and test set in chronological order to form a standardized multi-source heterogeneous dataset.
[0008] In this scheme, a heterogeneous information network containing genetic edges, feeding edges, transfer edges, and performance recording edges is constructed based on the standardized multi-source heterogeneous dataset. Mutual information pruning is performed on the transfer edges, and temporal weights that decay exponentially with time are assigned to the performance recording edges, resulting in a heterogeneous network topology representing the entire industry chain's performance formation path. Specifically, this includes: Extract strain identifiers, farm identifiers, and performance indicator names from a standardized multi-source heterogeneous dataset to create strain node sets, farm node sets, and performance indicator node sets; establish genetic edges through parent pairing records in pedigree archives, where the edge attributes of the genetic edges include the genetic contribution rate of the parents to the offspring; By establishing the correspondence between breeds and farms in the feeding records, a feeding edge containing the entry time and exit time is established between the breed node and the farm node; a transfer edge between farm nodes is established by the pig transfer records, and the edge attributes of the transfer edge include the transfer direction, batch number and transfer date. Based on individual growth and weighing records and slaughter measurement records, performance record edges are established between strain nodes and performance index nodes. The edge attributes of the performance record edges include the measurement value, measurement date, and batch number, ultimately resulting in an initial heterogeneous information network containing three types of nodes and four types of edges. Mutual information pruning is performed on the flow edges in the initial heterogeneous information network. The final slaughter performance of the batch corresponding to the flow edge is used as the result variable, and whether the flow path appears is used as the condition variable. Conditional mutual information is calculated, and flow edges with conditional mutual information values lower than the threshold are deleted. After deletion, the connectivity status of the farm nodes is checked, and redundant nodes that are not connected and are not connected to the strain nodes are removed to obtain a simplified intermediate network topology. Based on the simplified intermediate network topology, the measurement date in the attribute of each performance record edge is read, the time interval between the measurement date and the current base date is calculated in days, and each performance record edge is assigned a temporal weight that decays exponentially with time. For performance record edges associated with low-confidence farms, a modified temporal weight is assigned based on the temporal weight multiplied by a constant decay coefficient, resulting in a temporally weighted simplified intermediate network topology. A comprehensive connectivity check is performed on the temporally weighted simplified intermediate network topology. All strain nodes are traversed to check for the existence of isolated strain nodes. If they exist, the corresponding feeding records or performance measurement records of the isolated strain nodes are retrieved from the standardized multi-source heterogeneous dataset to confirm whether there are any missing edges. If so, the missing feeding edges or performance record edges are added to obtain the heterogeneous network topology of the entire industry chain.
[0009] In this scheme, a hierarchical attention network is used to perform representation learning on the heterogeneous information network. Node-level attention and semantic-level attention are used to capture the intensity and pattern of performance impact under different relations. Finally, the multi-relation embeddings are weighted and fused into the final node embedding representation. Specifically, this includes: Initial feature mapping is performed on the strain nodes, farm nodes, and performance index nodes in the heterogeneous network topology of the entire industry chain. The strain nodes are constructed using the strain identification code and the average historical breeding, growth, and slaughter performance as initial features. The farm nodes are constructed using the regional environmental feature vector of the farm where they are located as initial features. The performance index nodes are constructed using randomly initialized learnable vectors as initial features, thus obtaining the initial feature representation of each node. Each type of edge is treated as an independent relation type. Node-level attention aggregation is performed independently for each type of relation. For each target node, its neighboring nodes are traversed under relation r. The initial features of the target node and the initial features of the neighboring nodes are mapped and concatenated after being mapped by the transformation matrix corresponding to relation r. After the concatenation is completed, the similarity between the learnable attention vector corresponding to relation r is calculated. After nonlinear activation and normalization, the attention coefficients of each neighbor are obtained. The node features are then weighted and summed after mapping the attention coefficients to the neighbor nodes to obtain the neighbor aggregation representation of the target node under a certain relation type. In the process of relation aggregation corresponding to performance record edges, the features of neighbor performance index nodes are multiplied by the temporal weight carried on the performance record edge to weaken the influence of distant or low-confidence measurement records on the aggregation results, and the neighbor aggregation representation of the target node under each relation type is used as a relation-specific embedding. The relation-specific embeddings of each node under all relations are used as a candidate set and semantic attention fusion is performed. The global semantic attention vector is used to transform the node embeddings under each relation and the average value of all nodes is calculated to generate semantic weights. The relation-specific embeddings are weighted and summed according to the semantic weights to obtain the final node embedding representation.
[0010] In this scheme, the final embedded representation of the node is input into an independent multilayer perceptron for hierarchical performance prediction to obtain hierarchical performance prediction information. The hierarchical performance prediction information is then normalized to obtain a multidimensional heterogeneous performance prediction score. This multidimensional heterogeneous performance score is used to perform a comprehensive regional adaptation evaluation of the system to be evaluated, resulting in a comprehensive regional adaptation score. Specifically, this includes: Locate the strain node corresponding to the supporting system to be evaluated in the heterogeneous network topology of the whole industry chain and extract the corresponding node final embedding representation. Extract the target area environmental feature values from the standardized multi-source heterogeneous dataset and generate the area environmental feature vector. Concatenate the area environmental feature vector with the node final embedding representation of the target strain node to obtain the supporting system area representation vector. The region representation vector of the matching system is input into three independent multilayer perceptrons for hierarchical performance prediction. Each multilayer perceptron contains two fully connected hidden layers and one output layer. The activation function of the hidden layers is GELU. The final output contains hierarchical performance prediction information containing reproductive performance prediction value, growth performance prediction value and slaughter performance prediction value. Reproductive performance, growth performance and slaughter performance records of historical breeding systems in the target area were screened from a standardized multi-source heterogeneous dataset. The maximum and minimum values of the three performance dimensions were calculated respectively, and the hierarchical performance prediction information was normalized to obtain the multi-dimensional heterogeneous performance prediction score. By analyzing the historical pork consumption structure using standardized multi-source heterogeneous datasets of pork market price trends, and determining the relative demand intensity of reproductive performance, growth performance, and slaughter performance, the relative demand intensity is used as the preference weight vector for the target region. The multidimensional heterogeneous performance prediction scores are then multiplied element-wise and summed to obtain a weighted comprehensive score. The feed cost index of the target area is obtained by standardizing multi-source heterogeneous datasets and normalizing it. The feed conversion ratio (FCR) prediction value is extracted from the growth performance prediction value. The FCR prediction value is divided by the average FCR of historical breeding lines in the target area to obtain the relative value of the FCR. This relative value of the FCR is then multiplied by the normalized feed cost index and the preset adjustment coefficient to obtain the cost penalty term. The cost penalty term is subtracted from the weighted comprehensive score to obtain the regional adaptation comprehensive score.
[0011] In this scheme, the constrained combinatorial optimization model is constructed based on the comprehensive regional suitability score of each candidate matching system, and the optimal matching system and recommendation reason report are output through iterative solution. Specifically, this includes: Obtain the regional adaptation comprehensive score of each candidate breeding line, extract the list of grandparent breeding pig breeds and the required quantity of each candidate breeding line from the pedigree file, extract the available supply quantity of each grandparent breeding pig breed in the target area from the farm inventory records, eliminate candidate breeding lines whose demand exceeds the available supply quantity, and obtain the first candidate breeding line set. For each candidate breeding line in the first candidate breeding line set, calculate the genetic distance between parents, and remove candidate breeding lines that are below the lower limit of parental genetic distance. Based on the pig cross-farm transfer records and biosafety regulations data, extract the set of permitted introduction routes in the target area, remove candidate breeding lines that involve prohibited introduction routes, and obtain the second candidate breeding line set. Using the regional adaptation comprehensive score of each matching system in the second candidate matching system set as the ranking criterion, a constrained combinatorial optimization model is constructed. The decision variable is the selection state of each feasible candidate matching system, and the objective function is to maximize the regional adaptation comprehensive score of the selected matching system. When the number of feasible candidate matching systems is less than or equal to the preset size, all feasible candidate matching system combinations that meet the constraints are enumerated in an exhaustive manner, and the one with the highest regional adaptation comprehensive score is selected as the optimal matching system. When the number of matching systems exceeds the preset size, a two-stage heuristic algorithm combining greedy and local search is used to solve for the optimal matching system. The first stage calculates the ratio of the regional adaptation comprehensive score of each feasible candidate breeding line to the total number of grandparent breeding pigs required. Breeding lines are selected and added to the candidate set according to the ratio. After each addition, it is checked whether the upper limit constraint of grandparent breeding pig supply is still met. If not, it is skipped and the next one is examined until all the remaining candidate breeding lines are traversed and then the process stops. In the second stage, a matching system is randomly removed from the candidate set and an unselected matching system is selected from the remaining feasible candidate matching systems to be added. If the total score increases after the addition and all constraints are met, the replacement is retained. The random removal and addition operations are repeated a preset number of times until the total score no longer increases, at which point the optimal matching system identifier is output. By identifying the optimal breeding system, we obtain the corresponding predicted values for reproductive performance, growth performance, and slaughter performance, as well as the detailed comprehensive score for regional adaptation and the list of constraints met. We then generate a recommendation report to assist in regional optimization decision-making.
[0012] Compared with existing technologies, this solution has the following advantages: This solution constructs a heterogeneous information network covering the entire industry chain from breeding farms to slaughterhouses. It unifies and integrates multi-source data, including pedigree, reproduction, growth, slaughtering, circulation, environment, and costs, into a computable relational topology. This breaks through the limitations of traditional isolated data at each stage, enabling the performance evaluation of breeding systems to be based on interconnected data throughout the entire lifecycle. Simultaneously, a hierarchical attention network is employed to perform node-level and semantic-level dual aggregation of genetic edges, feeding edges, circulation edges, and performance recording edges. This automatically captures the intensity and pattern of the influence of different relationships on reproduction, growth, and slaughter performance, avoiding the one-sidedness of manually preset indicator weights and improving the objectivity and accuracy of the evaluation. Building upon this, a target area environmental feature vector and regional preference weight correction mechanism are introduced, allowing the same breeding system to obtain differentiated adaptation scores under different regional conditions. This achieves a shift from "one standard for all" to "regional adaptive decision-making." Finally, by using a constrained combinatorial optimization model, the upper limit of grandparent breeding pig supply, the lower limit of parental genetic distance, and the restrictions on biosafety introduction routes are incorporated into the decision-making process. This ensures that the optimal breeding line not only has excellent overall performance but is also feasible under actual breeding and disease prevention conditions, thereby guaranteeing the production implementation capability of the optimized results. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments or examples of the present invention, the drawings used in the embodiments or examples will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained according to these drawings without creative effort.
[0014] Figure 1 A flowchart of a method for evaluating and optimizing pig breeding systems based on heterogeneous information networks, provided in an embodiment of the present invention; Figure 2 A flowchart of a hierarchical attention network node embedding generation method with fused temporal weights provided in an embodiment of the present invention; Figure 3 This is a flowchart of an intelligent screening and multi-objective optimization decision-making method for regionally adapted breeding pig lines, provided in an embodiment of the present invention. The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0015] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0016] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0017] Figure 1 A flowchart of a method for evaluating and optimizing pig breeding systems based on heterogeneous information networks, provided in an embodiment of the present invention; like Figure 1 As shown, this invention provides a method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks, including: Acquire multi-source heterogeneous data covering the entire industrial chain of pig breeding. The multi-source heterogeneous data includes various types of data such as pedigree, reproduction, growth, slaughter, transfer, environment and cost records. Perform a preprocessing process on the multi-source heterogeneous data to generate a standardized multi-source heterogeneous dataset. Based on the standardized multi-source heterogeneous dataset, a heterogeneous information network containing genetic edges, feeding edges, transfer edges, and performance recording edges is constructed. Mutual information pruning is performed on the transfer edges, and temporal weights that decay exponentially with time are assigned to the performance recording edges, resulting in a heterogeneous network topology of the entire industry chain that characterizes the performance formation path of the supporting system. A hierarchical attention network is used to perform representation learning on the heterogeneous information network. Node-level attention and semantic-level attention are used to capture the intensity and pattern of performance impact under different relations. Finally, the multi-relation embeddings are weighted and fused into the final node embedding representation. The node is finally embedded and input into an independent multilayer perceptron to perform hierarchical performance prediction to obtain hierarchical performance prediction information. The hierarchical performance prediction information is normalized to obtain a multidimensional heterogeneous performance prediction score. The multidimensional heterogeneous performance prediction score is used to perform a comprehensive regional adaptation evaluation of the system to be evaluated to obtain a comprehensive regional adaptation score. Based on the regional adaptation comprehensive score of each candidate breeding line, a constrained combinatorial optimization model is constructed. The constraints include the upper limit of grandparent breeding pig supply, the lower limit of parental genetic distance, and the restriction of biosafety introduction routes. Finally, the optimal breeding line and the recommendation reason report are output through iterative solution.
[0018] Furthermore, in a preferred embodiment of the present invention, the step of acquiring multi-source heterogeneous data covering the entire breeding pig industry chain, performing a preprocessing procedure on the multi-source heterogeneous data, and generating a standardized multi-source heterogeneous dataset specifically includes: Obtain multi-source heterogeneous data from the data information terminal of the entire pig breeding industry chain, including pedigree records, mating and farrowing records, individual growth and weighing records, slaughter measurement records, pig cross-farm transfer records, continuous monitoring readings of environmental sensors, and regional feed raw material costs and pork market prices. The multi-source heterogeneous data is subjected to field-level consistency verification to remove type mismatch and duplicate records. Missing numerical indicators are filled with the mean values grouped by breed, parity, and season and a binary mask label is generated to obtain the repaired dataset. Based on the repaired dataset, the interquartile range of each numerical index is calculated by grouping by strain and field type. Outliers exceeding 1.5 times the interquartile range are removed, and the data is then filled with the median within the group after emptying to obtain the outlier repaired dataset. Based on the outlier repair dataset, individual growth records are sorted by timestamp. For cases where the interval between two adjacent weighings exceeds a preset number of days and weight values are missing, a local weighted regression scatter smoothing algorithm is used to interpolate the gestational age node. For reproductive records, the number of days of pregnancy is calculated and records that exceed the physiologically reasonable range are removed to obtain a time-aligned dataset. Based on the time-aligned dataset, Z-score standardization is performed on all numerical fields. A global code table and unique code are established for the fields of strain identification, field type, and inter-field transfer path category. The unique code is then used to perform numerical conversion to generate a code mapping table. Based on the encoding mapping table, the data integrity rate of each farm is evaluated, and farms with integrity rates below a preset threshold are marked as low-confidence farms and the low-confidence marks are recorded. The standardized multi-source heterogeneous dataset is divided into training set, validation set and test set in chronological order to form a standardized multi-source heterogeneous dataset.
[0019] It should be noted that in the entire pig breeding industry chain, the data terminals of breeding farms, propagation farms, commercial farms, fattening farms, and slaughterhouses generate a large number of records with different formats and scattered sources. This solution first extracts pedigree files, mating and farrowing records, individual growth and weighing records, slaughter measurement records, pig transfer records, continuous monitoring readings from environmental sensors, and regional feed costs and pork prices from these terminals, forming multi-source heterogeneous data. Due to the different data collection standards and storage structures of each terminal, direct use will lead to field misalignment, duplicate statistics, and dimensional differences. Therefore, field-level consistency checks are performed on the multi-source heterogeneous data to remove records with mismatched types and complete duplication, avoiding double counting that may cause bias in subsequent statistics. For missing numerical indicators, the mean of each group after grouping by breed, parity, and season is used for filling. For example, for missing values of the number of live piglets born in the same breed, parity, and season, the mean of existing records in that group is used to fill in the missing values. At the same time, a binary mask is generated for each filling position to distinguish between the actual observed value and the filled value. By using masking, subsequent representation learning can clearly identify the original missing location, thus treating it differently during training and inference and improving the rigor of data usage.
[0020] Based on the repaired dataset, each numerical indicator was grouped by breed and farm type. The first and third quartiles were calculated to obtain the interquartile range. Outliers exceeding 1.5 times the interquartile range were removed, and then the median within each group was used for backfilling. This eliminated the influence of outliers on the overall distribution, while median backfilling ensured the continuity of each pig's record in the time series, avoiding interruptions to the growth trajectory due to record removal. For individual growth records, they were first sorted by timestamp. When the interval between two adjacent weighings exceeded a preset number of days (7-30 days) and the weight value was missing at the intermediate age node, a locally weighted regression scatter smoothing algorithm was used for interpolation. This algorithm uses multiple observations near the missing point for locally weighted fitting, which can more accurately adapt to the nonlinear characteristics of pig growth—fast growth in the early stage and slow growth in the later stage—compared to simple linear interpolation. For breeding records, the gestation days were calculated, and records exceeding the normal gestation range for pigs were removed. After the above cleaning was completed, all numerical fields were Z-score standardized to bring indicators of different dimensions to the same scale, facilitating subsequent stable model training. For category fields such as strain identification, farm type, and inter-farm transfer path, a global code table is established and assigned a unique integer code. A code mapping table is also maintained to ensure code reversibility, allowing the output recommendation results to be restored to names readable by business personnel. Finally, the data completeness rate of each farm is evaluated. Farms with a rate below a preset threshold (60%) are marked as low-confidence farms, and this mark is recorded so that additional attenuation is applied to their performance recording edges when building the network. Standardized data is divided into training, validation, and test sets in chronological order to prevent model overfitting and ensure that the final regional optimization results have generalization ability.
[0021] Furthermore, in a preferred embodiment of the present invention, the construction of a heterogeneous information network containing genetic edges, breeding edges, transfer edges, and performance recording edges based on the standardized multi-source heterogeneous dataset, the mutual information pruning of transfer edges, and the assignment of temporal weights that decay exponentially with time to performance recording edges, to obtain a heterogeneous network topology representing the performance formation path of the entire industry chain, specifically includes: Extract strain identifiers, farm identifiers, and performance indicator names from a standardized multi-source heterogeneous dataset to create strain node sets, farm node sets, and performance indicator node sets; establish genetic edges through parent pairing records in pedigree archives, where the edge attributes of the genetic edges include the genetic contribution rate of the parents to the offspring; By establishing the correspondence between breeds and farms in the feeding records, a feeding edge containing the entry time and exit time is established between the breed node and the farm node; a transfer edge between farm nodes is established by the pig transfer records, and the edge attributes of the transfer edge include the transfer direction, batch number and transfer date. Based on individual growth and weighing records and slaughter measurement records, performance record edges are established between strain nodes and performance index nodes. The edge attributes of the performance record edges include the measurement value, measurement date, and batch number, ultimately resulting in an initial heterogeneous information network containing three types of nodes and four types of edges. Mutual information pruning is performed on the flow edges in the initial heterogeneous information network. The final slaughter performance of the batch corresponding to the flow edge is used as the result variable, and whether the flow path appears is used as the condition variable. Conditional mutual information is calculated, and flow edges with conditional mutual information values lower than the threshold are deleted. After deletion, the connectivity status of the farm nodes is checked, and redundant nodes that are not connected and are not connected to the strain nodes are removed to obtain a simplified intermediate network topology. Based on the simplified intermediate network topology, the measurement date in the attribute of each performance record edge is read, the time interval between the measurement date and the current base date is calculated in days, and each performance record edge is assigned a temporal weight that decays exponentially with time. For performance record edges associated with low-confidence farms, a modified temporal weight is assigned based on the temporal weight multiplied by a constant decay coefficient, resulting in a temporally weighted simplified intermediate network topology. A comprehensive connectivity check is performed on the temporally weighted simplified intermediate network topology. All strain nodes are traversed to check for the existence of isolated strain nodes. If they exist, the corresponding feeding records or performance measurement records of the isolated strain nodes are retrieved from the standardized multi-source heterogeneous dataset to confirm whether there are any missing edges. If so, the missing feeding edges or performance record edges are added to obtain the heterogeneous network topology of the entire industry chain.
[0022] It should be noted that when constructing the heterogeneous information network, the first step is to extract strain identifiers, farm identifiers, and performance indicator names from a standardized multi-source heterogeneous dataset. Based on this, sets of strain nodes, farm nodes, and performance indicator nodes are created, transforming the business entities originally scattered in tables into nodes in the network. Next, parental pairing records are read from the pedigree archives to establish genetic edges between parent strain nodes and offspring mating nodes, with edge attributes recording the genetic contribution rate of the parents to the offspring. Feeding records are read to establish feeding edges between strain nodes and farm nodes, with edge attributes including entry and exit times. Pig transfer records are read to establish transfer edges between farm nodes, with edge attributes including transfer direction, batch number, and transfer date. Individual growth and weighing records and slaughter measurement records are read to establish performance recording edges between strain nodes and performance indicator nodes, with edge attributes including measurement value, measurement date, and batch number. This forms an initial heterogeneous information network containing three types of nodes and four types of edges.
[0023] The initial network has a large number of flow edges, and some flow paths have no significant impact on the final slaughter performance. To simplify the network and remove weakly associated paths, this scheme performs mutual information pruning on the flow edges. The final slaughter performance of the batch corresponding to the flow edge is used as the result variable, and the occurrence of the flow path is used as a conditional variable for conditional mutual information calculation. Flow edges with conditional mutual information values below a threshold are deleted. After deletion, the connectivity of farm nodes is checked, and redundant nodes that have lost all connections and are not connected to any strain nodes are removed, resulting in a simplified intermediate network topology.
[0024] Building upon this foundation, performance record edges are assigned temporal weights that decay exponentially over time. The value of performance records decreases as the measurement date becomes older; therefore, the measurement date in the attributes of each performance record edge is read, the time interval between the measurement date and the current baseline date is calculated in days, and a temporal weight is generated accordingly, ensuring that more recent records have weights closer to one and more distant records have weights closer to zero. For performance record edges associated with low-reliability farms, a constant decay coefficient is multiplied by the temporal weight to further suppress the impact of unreliable data sources on subsequent evaluations, resulting in a temporally weighted simplified intermediate network topology. Finally, the overall connectivity of the temporally weighted simplified intermediate network topology is verified by traversing all strain nodes and checking for isolated strain nodes. If an isolated strain node exists, the corresponding feeding records or performance measurement records for that strain node are retrieved from the standardized multi-source heterogeneous dataset to confirm whether any edges have been omitted. If so, the missing feeding edges or performance record edges are added, ultimately resulting in a full-chain heterogeneous network topology representing the performance formation path of breeding strains, providing structured input for subsequent attention-based representation learning and region optimization.
[0025] It is worth mentioning that the conditional mutual information is calculated using the following formula: , in, The result variable is the final slaughter performance value corresponding to the batch of the flow edge. This is a conditional variable based on whether a value appears in the flow path. For a pre-defined set of condition variables, This refers to the joint or conditional probability estimated based on standardized multi-source heterogeneous datasets; when the conditional mutual information value... (In this embodiment) When the condition is met, the corresponding transition edge is determined to be a weakly associated path and is deleted.
[0026] The temporal weights are calculated using the following formula: , in, Record edges for performance Temporal weights, This records the number of days between the measurement date and the current baseline date in the edge attribute of this performance record. The preset time constant (in this embodiment) sky), It is a natural exponential function, which makes the weight of more recent measurement records closer to 1 and the weight of more distant records closer to 0; For performance record edges associated with low-reliability farms, the corrected temporal weight is: , in, The constant attenuation coefficient and (In this embodiment) This is used to further mitigate the impact of unreliable data from unreliable sources on subsequent assessments.
[0027] Furthermore, in a preferred embodiment of the present invention, the step of inputting the final embedded representation of the node into an independent multilayer perceptron for hierarchical performance prediction to obtain hierarchical performance prediction information, normalizing the hierarchical performance prediction information to obtain a multidimensional heterogeneous performance prediction score, and using the multidimensional heterogeneous performance score to perform a comprehensive regional adaptation evaluation of the system to be evaluated to obtain a comprehensive regional adaptation score, specifically includes: Locate the strain node corresponding to the supporting system to be evaluated in the heterogeneous network topology of the whole industry chain and extract the corresponding node final embedding representation. Extract the target area environmental feature values from the standardized multi-source heterogeneous dataset and generate the area environmental feature vector. Concatenate the area environmental feature vector with the node final embedding representation of the target strain node to obtain the supporting system area representation vector. The region representation vector of the matching system is input into three independent multilayer perceptrons for hierarchical performance prediction. Each multilayer perceptron contains two fully connected hidden layers and one output layer. The activation function of the hidden layers is GELU. The final output contains hierarchical performance prediction information containing reproductive performance prediction value, growth performance prediction value and slaughter performance prediction value. Reproductive performance, growth performance and slaughter performance records of historical breeding systems in the target area were screened from a standardized multi-source heterogeneous dataset. The maximum and minimum values of the three performance dimensions were calculated respectively, and the hierarchical performance prediction information was normalized to obtain the multi-dimensional heterogeneous performance prediction score. By analyzing the historical pork consumption structure using standardized multi-source heterogeneous datasets of pork market price trends, and determining the relative demand intensity of reproductive performance, growth performance, and slaughter performance, the relative demand intensity is used as the preference weight vector for the target region. The multidimensional heterogeneous performance prediction scores are then multiplied element-wise and summed to obtain a weighted comprehensive score. The feed cost index of the target area is obtained by standardizing multi-source heterogeneous datasets and normalizing it. The feed conversion ratio (FCR) prediction value is extracted from the growth performance prediction value. The FCR prediction value is divided by the average FCR of historical breeding lines in the target area to obtain the relative value of the FCR. This relative value of the FCR is then multiplied by the normalized feed cost index and the preset adjustment coefficient to obtain the cost penalty term. The cost penalty term is subtracted from the weighted comprehensive score to obtain the regional adaptation comprehensive score.
[0028] It should be noted that after obtaining the final node embedding representation, the strain node corresponding to the breeding line to be evaluated is located from the heterogeneous network topology of the entire industry chain. The final node embedding representation of this strain node is extracted. At the same time, environmental feature values of the target area are obtained from the standardized multi-source heterogeneous dataset, and a regional environmental feature vector is generated. The final node embedding representation has already aggregated information from the entire industry chain, such as genetic association, breeding environment, circulation path, and performance records, while the regional environmental feature vector directly reflects the climate, pen conditions, and other conditions of the target area. After concatenating the two, the resulting regional representation vector of the breeding line simultaneously contains both the strain's intrinsic genetic potential and external environmental conditions, enabling subsequent performance prediction to reflect the influence of genotype and environment interaction, rather than just evaluating the strain itself in isolation.
[0029] The region representation vectors of the breeding system are input into three structurally identical but parameter-independent multilayer perceptrons (MLPs) to predict reproductive performance, growth performance, and slaughter performance, respectively. This hierarchical prediction method avoids the mutual interference that may occur when a single model outputs three performance indicators simultaneously. Each of the three MLPs focuses on fitting one performance class, which helps improve prediction accuracy. Each MLP contains two fully connected hidden layers and one output layer. The hidden layers use the GELU activation function, which provides nonlinear expressive power and retains gradient information in the negative region compared to the commonly used ReLU activation, making training more stable. The three MLPs output predicted values for reproductive performance, growth performance, and slaughter performance, which together constitute hierarchical performance prediction information. Among them, reproductive performance includes four indicators: PSY (number of weaned piglets per sow per year), farrowing mortality rate, number of piglets born, and weaning litter weight; growth performance includes three indicators: FCR (feedback ratio), ADG (average daily weight gain), and days to market; and slaughter performance includes five indicators: lean meat percentage, dressing percentage, backfat thickness, eye muscle area, and carcass grade.
[0030] For each indicator, normalization was performed using the maximum and minimum values of the corresponding indicators from historical breeding systems in the target area, mapping the predicted values of each indicator to the zero-to-one range. For the three inverse indicators—farming mortality rate, FCR, and backfat thickness—positive normalization was achieved by subtracting the normalized value from one, unifying all indicators towards a higher value being better. The predicted values of the positively normalized indicators under the same performance dimension were then summed using preset weights to obtain the predicted values for reproductive performance, growth performance, and slaughter performance. The preset weights can be determined based on the frequency of each indicator appearing as a priority indicator in the historical breeding system selection records of the target area, or automatically determined using the entropy weight method based on the dispersion of each indicator in historical data.
[0031] This scheme further filters the breeding, growth, and slaughter performance records of historical breeding systems in the target area from a standardized multi-source heterogeneous dataset, calculates the maximum and minimum values of the three performance dimensions in the target area, normalizes the hierarchical performance prediction information, maps each prediction value to the zero-to-one interval, and obtains the multi-dimensional heterogeneous performance prediction score.
[0032] Because different regions have different priorities regarding reproductive, growth, and slaughter performance—for example, regions with high lean meat percentages prioritize slaughter performance, while regions with high feed costs focus more on growth efficiency—this solution analyzes the historical pork consumption structure of the target region from standardized multi-source heterogeneous datasets of pork market prices. Based on this consumption structure, the relative demand intensity for reproductive, growth, and slaughter performance is determined. This relative demand intensity is used as the preference weight vector for the target region. The predicted scores for multidimensional heterogeneous performance are multiplied element-wise and then summed to obtain a weighted composite score. Finally, the feed cost index for the target region is obtained from the standardized multi-source heterogeneous dataset. This index is normalized using the maximum and minimum historical feed costs of the target region, and then mapped to the zero-to-one range. The predicted feed conversion ratio (FCR) is extracted from the predicted growth performance values. This predicted FCR is divided by the historical average FCR of breeding lines within the target region to obtain the relative FCR value. The normalized feed cost index is multiplied by a preset adjustment coefficient, and then multiplied by the relative value of the feed conversion ratio (FCR) to obtain a cost penalty term. This cost penalty term is subtracted from the weighted composite score to obtain the regional adaptation composite score. The preset adjustment coefficient, ranging from zero to one, controls the influence weight of the cost penalty term in the composite score. For example, when feed costs are high in the target region, feed conversion ratio-higher systems will be subject to a greater cost penalty, thus ensuring that the final optimized result not only has superior technical performance but is also more economically feasible.
[0033] Figure 2 A flowchart of a hierarchical attention network node embedding generation method with fused temporal weights provided in an embodiment of the present invention; like Figure 2As shown, the present invention provides a flowchart of a method for generating hierarchical attention network node embeddings with fused temporal weights, comprising: Initial feature mapping is performed on the strain nodes, farm nodes, and performance index nodes in the heterogeneous network topology of the entire industry chain. The strain nodes are constructed using the strain identification code and the average historical breeding, growth, and slaughter performance as initial features. The farm nodes are constructed using the regional environmental feature vector of the farm where they are located as initial features. The performance index nodes are constructed using randomly initialized learnable vectors as initial features, thus obtaining the initial feature representation of each node. Each type of edge is treated as an independent relation type. Node-level attention aggregation is performed independently for each type of relation. For each target node, its neighboring nodes are traversed under relation r. The initial features of the target node and the initial features of the neighboring nodes are mapped and concatenated after being mapped by the transformation matrix corresponding to relation r. After the concatenation is completed, the similarity between the learnable attention vector corresponding to relation r is calculated. After nonlinear activation and normalization, the attention coefficients of each neighbor are obtained. The node features are then weighted and summed after mapping the attention coefficients to the neighbor nodes to obtain the neighbor aggregation representation of the target node under a certain relation type. In the process of relation aggregation corresponding to performance record edges, the features of neighbor performance index nodes are multiplied by the temporal weight carried on the performance record edge to weaken the influence of distant or low-confidence measurement records on the aggregation results, and the neighbor aggregation representation of the target node under each relation type is used as a relation-specific embedding. The relation-specific embeddings of each node under all relations are used as a candidate set and semantic attention fusion is performed. The global semantic attention vector is used to transform the node embeddings under each relation and the average value of all nodes is calculated to generate semantic weights. The relation-specific embeddings are weighted and summed according to the semantic weights to obtain the final node embedding representation.
[0034] It should be noted that after obtaining the heterogeneous network topology of the entire industry chain, the nodes in the network need to be converted into vector form that can be computed by the attention network. This scheme first performs initial feature mapping on strain nodes, farm nodes, and performance index nodes. Among them, strain nodes use strain identification codes and historical average values of breeding, growth, and slaughter performance as initial features, which preserves the identity information of the strain and incorporates its historical performance level. Farm nodes use the regional environmental feature vector of the farm as initial features, so that environmental differences are directly reflected in the representation. Performance index nodes use randomly initialized learnable vectors as initial features, and automatically form a vectorized description of the meaning of performance through training.
[0035] Since genetic edges, breeding edges, circulation edges, and performance recording edges represent different semantic relationships, this scheme treats each type of edge as an independent relation type and performs node-level attention aggregation independently for each type of relation. Specifically, for each target node, its neighboring nodes are traversed under relation r. The initial features of the target node and the initial features of the neighboring nodes are mapped and concatenated using the transformation matrix corresponding to relation r. Then, the similarity is calculated with the learnable attention vector corresponding to relation r. After nonlinear activation and normalization, the attention coefficients of each neighbor are obtained. The mapped features of the neighboring nodes are weighted and summed using the attention coefficients to obtain the neighbor aggregation representation of the target node under relation r. This identifies which neighboring nodes are more important to the current node under the same relation without the need for manual weight setting.
[0036] Specifically, during the relation aggregation process corresponding to performance record edges, the features of neighboring performance index nodes are multiplied by the temporal weights carried on the performance record edges. This automatically reduces the contribution of distant or low-reliability measurement records to the aggregation results, preventing outdated or unreliable data from misleading the node representation. After the above node-level aggregation, each node obtains multiple sets of relation-specific embeddings equal to the number of relation types. Furthermore, the relation-specific embeddings of each node under all relations are used as a candidate set. A global semantic attention vector is used to perform a nonlinear transformation on the node embeddings under each relation, and the average value of all nodes is calculated to generate semantic weights. The relation-specific embeddings are then weighted and summed according to their semantic weights to obtain the final node embedding representation. This improves the ability of node representations to express the performance formation path of the matching system, providing high-quality input for subsequent hierarchical performance prediction.
[0037] It is worth mentioning that the node-level attention coefficient is calculated using the following formula: , in, For relation types, , Target nodes with neighboring nodes The initial feature representation, For relationship The corresponding transformation matrix, For relationship The corresponding learnable attention vector, It is a non-linear activation function. This represents vector concatenation. For the target node In relationship The set of neighboring nodes below, That is, neighboring nodes For the target node In relationship Attention coefficient under; target node in relation The neighbor aggregation representation below is by The feature is obtained by weighted summation after mapping neighbor nodes.
[0038] Semantic attention fusion is calculated using the following formula: , in, For nodes In relationship The relationship-specific embedding, , These are the weight matrix and bias of the semantic-level transformation, respectively. This is the global semantic attention vector. The total number of nodes. For relationship The corresponding semantic weights; The final embedded representation of the node is as follows: , That is, the result of summing the semantically weighted embeddings of each relation.
[0039] In one specific implementation, the method further includes a training process for a hierarchical attention network and three independent multilayer perceptrons. The training samples are derived from a standardized multi-source heterogeneous dataset, where the training set is used to fit the model parameters, the validation set is used to select hyperparameters and determine training termination, and the test set is used to evaluate the generalization ability of the final region selection results.
[0040] For hierarchical attention networks, a self-supervised edge reconstruction task is used for training. Specifically, in each training round, some performance record edges in the heterogeneous network topology of the entire industry chain are randomly masked. Positive samples are constructed using the two endpoints of the masked edges as objects, and negative samples are constructed by randomly sampling unconnected node pairs of the same size as the positive samples from the network. The initial features of the nodes, the transformation matrix corresponding to the relationship, the learnable attention vector, and the global semantic attention vector are used as trainable parameters. The probability of the existence of positive sample edges and the probability of the existence of negative sample edges are calculated based on the final embedding representation of the nodes. Binary cross-entropy loss or contrastive loss is used as the objective function to make the probability of the existence of positive sample edges approach 1 and the probability of the existence of negative sample edges approach zero. The gradient is calculated through backpropagation, and all trainable parameters are updated using the Adam optimizer. During training, training stops when the edge reconstruction loss on the validation set no longer decreases for a preset number of rounds. In this embodiment, the preset number of rounds is exemplarily set to 20 rounds.
[0041] For three independent multilayer perceptrons, reproductive performance, growth performance, and slaughter performance values measured in a standardized multi-source heterogeneous dataset are used as supervised labels for training. Specifically, reproductive performance labels are derived from mating and farrowing records, including PSY (pigs weaned per sow per year), farrowing mortality rate, number of piglets born, and weaning litter weight; growth performance labels are derived from individual growth and weighing records, including FCR (fetal growth rate), ADG (advanced growth rate), and days to market; and slaughter performance labels are derived from slaughter measurement records, including lean meat percentage, dressing percentage, backfat thickness, eye muscle area, and carcass grade. After inputting the breeding system region representation vector into the three multilayer perceptrons, they output predicted values for reproductive performance, growth performance, and slaughter performance, respectively. Mean squared error loss or smoothed L1 loss is calculated between the predicted values and the corresponding measured labels. The weights and biases of the fully connected layers of the three multilayer perceptrons are updated through backpropagation. The three multilayer perceptrons can be trained independently or jointly based on shared low-level features. In this embodiment, an independent training method is adopted. Each multilayer perceptron uses the Adam optimizer. The initial learning rate is set to 0.001, the batch size is set to 64, the number of training rounds is set to 200, and training stops when the validation set loss no longer decreases for a preset number of consecutive rounds.
[0042] In another specific implementation, the hierarchical attention network and three independent multilayer perceptrons can also be trained in a two-stage manner: the first stage trains only the hierarchical attention network until the edge reconstruction loss converges and the final embedded representation of the fixed nodes is obtained; the second stage uses the final embedded representation of the fixed nodes as input to train the three independent multilayer perceptrons until the performance prediction loss converges. This two-stage training method reduces parameter coupling during joint training and facilitates separate debugging and verification. After training, the final embedded representations of all nodes in the heterogeneous network topology of the entire industry chain, as well as the parameters of the three multilayer perceptrons, are saved for subsequent calculation of the regional adaptation comprehensive score of the supporting systems to be evaluated.
[0043] Figure 3 This is a flowchart of an intelligent screening and multi-objective optimization decision-making method for regionally adapted breeding pig lines, provided in an embodiment of the present invention. like Figure 3 As shown, this invention provides a flowchart of an intelligent screening and multi-objective optimization decision-making method for regionally adapted breeding pig lines, including: Obtain the regional adaptation comprehensive score of each candidate breeding line, extract the list of grandparent breeding pig breeds and the required quantity of each candidate breeding line from the pedigree file, extract the available supply quantity of each grandparent breeding pig breed in the target area from the farm inventory records, eliminate candidate breeding lines whose demand exceeds the available supply quantity, and obtain the first candidate breeding line set. For each candidate breeding line in the first candidate breeding line set, calculate the genetic distance between parents, and remove candidate breeding lines that are below the lower limit of parental genetic distance. Based on the pig cross-farm transfer records and biosafety regulations data, extract the set of permitted introduction routes in the target area, remove candidate breeding lines that involve prohibited introduction routes, and obtain the second candidate breeding line set. Using the regional adaptation comprehensive score of each matching system in the second candidate matching system set as the ranking criterion, a constrained combinatorial optimization model is constructed. The decision variable is the selection state of each feasible candidate matching system, and the objective function is to maximize the regional adaptation comprehensive score of the selected matching system. When the number of feasible candidate matching systems is less than or equal to the preset size, all feasible candidate matching system combinations that meet the constraints are enumerated in an exhaustive manner, and the one with the highest regional adaptation comprehensive score is selected as the optimal matching system. When the number of matching systems exceeds the preset size, a two-stage heuristic algorithm combining greedy and local search is used to solve for the optimal matching system. The first stage calculates the ratio of the regional adaptation comprehensive score of each feasible candidate breeding line to the total number of grandparent breeding pigs required. Breeding lines are selected and added to the candidate set according to the ratio. After each addition, it is checked whether the upper limit constraint of grandparent breeding pig supply is still met. If not, it is skipped and the next one is examined until all the remaining candidate breeding lines are traversed and then the process stops. In the second stage, a matching system is randomly removed from the candidate set and an unselected matching system is selected from the remaining feasible candidate matching systems to be added. If the total score increases after the addition and all constraints are met, the replacement is retained. The random removal and addition operations are repeated a preset number of times until the total score no longer increases, at which point the optimal matching system identifier is output. By identifying the optimal breeding system, we obtain the corresponding predicted values for reproductive performance, growth performance, and slaughter performance, as well as the detailed comprehensive score for regional adaptation and the list of constraints met. We then generate a recommendation report to assist in regional optimization decision-making.
[0044] It should be noted that after obtaining the regional compatibility comprehensive score for each candidate breeding line, the first step is to extract the list of grandparent breeding pig breeds and the required quantity for each candidate breeding line from the pedigree archives. Then, the available supply quantity of each grandparent breeding pig breed in the target area is extracted from the farm inventory records. Candidate breeding lines whose demand exceeds the available supply are eliminated, resulting in the first candidate breeding line set. This ensures that each breeding line in subsequent evaluations is realistically feasible in the supply stage, avoiding the inability to implement recommended solutions due to insufficient grandparent breeding pig supply. Next, the genetic distance between parents is calculated for each candidate breeding line in the first candidate breeding line set. Candidate breeding lines with genetic distances below the lower limit of parental genetic distance are eliminated to prevent the risk of inbreeding depression in offspring due to excessively close parental genetic distances. Simultaneously, based on pig cross-farm transfer records and biosafety regulations, a set of permitted introduction routes in the target area is extracted. Candidate breeding lines involving prohibited introduction routes are eliminated, resulting in the second candidate breeding line set, reducing the ineffective search space in subsequent optimization stages.
[0045] After obtaining the second set of candidate matching systems, a constrained combinatorial optimization model is constructed using the comprehensive regional adaptation score of each matching system as the ranking criterion. The decision variable is the selection state of each feasible candidate matching system, and the objective function is to maximize the comprehensive regional adaptation score of the selected matching system. When the number of feasible candidate matching systems does not exceed a preset size (50-200 candidate matching systems), an exhaustive approach is used to enumerate all feasible combinations that meet the constraints, and the one with the highest score is selected as the optimal matching system, ensuring global optimum in small-scale scenarios. When the number of feasible candidate matching systems exceeds the preset size, a two-stage heuristic algorithm combining greedy and local search is used to solve the problem.
[0046] Specifically, the process is divided into two stages. In the first stage, the ratio of the regional adaptation comprehensive score of each feasible candidate breeding line to the total number of grandparent breeding pigs required is calculated. Breeding lines are selected and added to the candidate set according to the ratio. After each addition, it is checked whether the upper limit constraint of grandparent breeding pig supply is still satisfied. If not, it is skipped and the next one is examined until all remaining candidate breeding lines have been traversed, thus tilting the limited supply of grandparent breeding pigs towards the direction with better overall performance. In the second stage, a breeding line is randomly removed from the candidate set, and an unselected breeding line is selected from the remaining feasible candidate breeding lines to replace it. If the total score increases after replacement and all constraints are satisfied, it is retained and replaced. The random removal and replacement operation is repeated a preset number of times until the sum of the comprehensive scores no longer increases, at which point the optimal breeding line identifier is output. Local search improves the overall quality of the final solution by escaping the local optimum in the greedy stage through controlled perturbation. Finally, the corresponding reproductive performance prediction value, growth performance prediction value, slaughter performance prediction value, regional adaptation comprehensive score details, and constraint list are obtained through the optimal breeding line identifier, and a recommendation report is generated to assist in regional optimization decision-making. The recommendation rationale report makes the entire decision-making process transparent and traceable. Breeders can clearly see the predictive sources and constraint satisfaction of each performance indicator of the recommended scheme, thereby improving the interpretability of the optimization results and the actual adoption rate.
[0047] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks, characterized in that, include: Acquire multi-source heterogeneous data covering the entire pig breeding industry chain, perform preprocessing on the multi-source heterogeneous data, and generate a standardized multi-source heterogeneous dataset. Based on the standardized multi-source heterogeneous dataset, a heterogeneous information network containing genetic edges, feeding edges, transfer edges, and performance recording edges is constructed. Mutual information pruning is performed on the transfer edges, and temporal weights that decay exponentially with time are assigned to the performance recording edges, resulting in a heterogeneous network topology of the entire industry chain that characterizes the performance formation path of the supporting system. A hierarchical attention network is used to perform representation learning on the heterogeneous information network. Node-level attention and semantic-level attention are used to capture the intensity and pattern of performance impact under different relations. Finally, the multi-relation embeddings are weighted and fused into the final node embedding representation. The node is finally embedded and input into an independent multilayer perceptron to perform hierarchical performance prediction to obtain hierarchical performance prediction information. The hierarchical performance prediction information is normalized to obtain a multidimensional heterogeneous performance prediction score. The multidimensional heterogeneous performance prediction score is used to perform a comprehensive regional adaptation evaluation of the system to be evaluated to obtain a comprehensive regional adaptation score. Based on the regional adaptation comprehensive score of each candidate breeding line, a constrained combinatorial optimization model is constructed. The constraints include the upper limit of grandparent breeding pig supply, the lower limit of parental genetic distance, and the restriction of biosafety introduction routes. Finally, the optimal breeding line and the recommendation reason report are output through iterative solution.
2. The method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks according to claim 1, characterized in that, The process of acquiring multi-source heterogeneous data covering the entire pig breeding industry chain, performing a preprocessing procedure on the multi-source heterogeneous data, and generating a standardized multi-source heterogeneous dataset specifically includes: Obtain multi-source heterogeneous data from the data information terminal of the entire pig breeding industry chain, including pedigree records, mating and farrowing records, individual growth and weighing records, slaughter measurement records, pig cross-farm transfer records, continuous monitoring readings of environmental sensors, and regional feed raw material costs and pork market prices. The multi-source heterogeneous data is subjected to field-level consistency verification to remove type mismatch and duplicate records. Missing numerical indicators are filled with the mean values grouped by breed, parity, and season and a binary mask label is generated to obtain the repaired dataset. Based on the repaired dataset, the interquartile range of each numerical index is calculated by grouping by strain and field type. Outliers exceeding 1.5 times the interquartile range are removed, and the data is then filled with the median within the group after emptying to obtain the outlier repaired dataset. Based on the outlier repair dataset, individual growth records are sorted by timestamp. For cases where the interval between two adjacent weighings exceeds a preset number of days and weight values are missing, a local weighted regression scatter smoothing algorithm is used to interpolate the gestational age node. For reproductive records, the number of days of pregnancy is calculated and records that exceed the physiologically reasonable range are removed to obtain a time-aligned dataset. Based on the time-aligned dataset, Z-score standardization is performed on all numerical fields. A global code table and unique code are established for the fields of strain identification, field type, and inter-field transfer path category. The unique code is then used to perform numerical conversion to generate a code mapping table. Based on the encoding mapping table, the data integrity rate of each farm is evaluated, and farms with integrity rates below a preset threshold are marked as low-confidence farms and the low-confidence marks are recorded. The standardized multi-source heterogeneous dataset is divided into training set, validation set and test set in chronological order to form a standardized multi-source heterogeneous dataset.
3. The method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks according to claim 1, characterized in that, The process involves constructing a heterogeneous information network based on the standardized multi-source heterogeneous dataset, including genetic edges, feeding edges, transfer edges, and performance recording edges. Mutual information pruning is applied to the transfer edges, and temporal weights that decay exponentially over time are assigned to the performance recording edges. This yields a heterogeneous network topology representing the entire industry chain's performance formation path, specifically including: Extract strain identifiers, farm identifiers, and performance indicator names from a standardized multi-source heterogeneous dataset to create strain node sets, farm node sets, and performance indicator node sets; establish genetic edges through parent pairing records in pedigree archives, where the edge attributes of the genetic edges include the genetic contribution rate of the parents to the offspring; By establishing the correspondence between breeds and farms in the feeding records, a feeding edge containing the entry time and exit time is established between the breed node and the farm node; a transfer edge between farm nodes is established by the pig transfer records, and the edge attributes of the transfer edge include the transfer direction, batch number and transfer date. Based on individual growth and weighing records and slaughter measurement records, performance record edges are established between strain nodes and performance index nodes. The edge attributes of the performance record edges include the measurement value, measurement date, and batch number, ultimately resulting in an initial heterogeneous information network containing three types of nodes and four types of edges. Mutual information pruning is performed on the flow edges in the initial heterogeneous information network. The final slaughter performance of the batch corresponding to the flow edge is used as the result variable, and whether the flow path appears is used as the condition variable. Conditional mutual information is calculated, and flow edges with conditional mutual information values lower than the threshold are deleted. After deletion, the connectivity status of the farm nodes is checked, and redundant nodes that are not connected and are not connected to the strain nodes are removed to obtain a simplified intermediate network topology. Based on the simplified intermediate network topology, the measurement date in the attribute of each performance record edge is read, the time interval between the measurement date and the current base date is calculated in days, and each performance record edge is assigned a temporal weight that decays exponentially with time. For performance record edges associated with low-confidence farms, a modified temporal weight is assigned based on the temporal weight multiplied by a constant decay coefficient, resulting in a temporally weighted simplified intermediate network topology. A comprehensive connectivity check is performed on the temporally weighted simplified intermediate network topology. All strain nodes are traversed to check for the existence of isolated strain nodes. If they exist, the corresponding feeding records or performance measurement records of the isolated strain nodes are retrieved from the standardized multi-source heterogeneous dataset to confirm whether there are any missing edges. If so, the missing feeding edges or performance record edges are added to obtain the heterogeneous network topology of the entire industry chain.
4. The method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks according to claim 1, characterized in that, The method employs a hierarchical attention network to perform representation learning on the heterogeneous information network. It utilizes node-level attention and semantic-level attention to capture the strength and pattern of performance impact under different relations, and finally weightedly fuses the multi-relation embeddings into the final node embedding representation. Specifically, this includes: Initial feature mapping is performed on the strain nodes, farm nodes, and performance index nodes in the heterogeneous network topology of the entire industry chain. The strain nodes are constructed using the strain identification code and the average historical breeding, growth, and slaughter performance as initial features. The farm nodes are constructed using the regional environmental feature vector of the farm where they are located as initial features. The performance index nodes are constructed using randomly initialized learnable vectors as initial features, thus obtaining the initial feature representation of each node. Each type of edge is treated as an independent relation type. Node-level attention aggregation is performed independently for each type of relation. For each target node, its neighboring nodes are traversed under relation r. The initial features of the target node and the initial features of the neighboring nodes are mapped and concatenated after being mapped by the transformation matrix corresponding to relation r. After the concatenation is completed, the similarity between the learnable attention vector corresponding to relation r is calculated. After nonlinear activation and normalization, the attention coefficients of each neighbor are obtained. The node features are then weighted and summed after mapping the attention coefficients to the neighbor nodes to obtain the neighbor aggregation representation of the target node under a certain relation type. In the process of relation aggregation corresponding to performance record edges, the features of neighbor performance index nodes are multiplied by the temporal weight carried on the performance record edge to weaken the influence of distant or low-confidence measurement records on the aggregation results, and the neighbor aggregation representation of the target node under each relation type is used as a relation-specific embedding. The relation-specific embeddings of each node under all relations are used as a candidate set and semantic attention fusion is performed. The global semantic attention vector is used to transform the node embeddings under each relation and the average value of all nodes is calculated to generate semantic weights. The relation-specific embeddings are weighted and summed according to the semantic weights to obtain the final node embedding representation.
5. The method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks according to claim 1, characterized in that, The process involves inputting the final embedded representation of the node into an independent multilayer perceptron for hierarchical performance prediction to obtain hierarchical performance prediction information. This hierarchical performance prediction information is then normalized to obtain a multidimensional heterogeneous performance prediction score. This multidimensional heterogeneous performance prediction score is used to perform a comprehensive regional adaptation evaluation of the system to be evaluated, resulting in a comprehensive regional adaptation score. Specifically, this includes: Locate the strain node corresponding to the supporting system to be evaluated in the heterogeneous network topology of the whole industry chain and extract the corresponding node final embedding representation. Extract the target area environmental feature values from the standardized multi-source heterogeneous dataset and generate the area environmental feature vector. Concatenate the area environmental feature vector with the node final embedding representation of the target strain node to obtain the supporting system area representation vector. The region representation vector of the matching system is input into three independent multilayer perceptrons for hierarchical performance prediction. Each multilayer perceptron contains two fully connected hidden layers and one output layer. The activation function of the hidden layers is GELU. The final output contains hierarchical performance prediction information containing reproductive performance prediction value, growth performance prediction value and slaughter performance prediction value. Reproductive performance, growth performance and slaughter performance records of historical breeding systems in the target area were screened from a standardized multi-source heterogeneous dataset. The maximum and minimum values of the three performance dimensions were calculated respectively, and the hierarchical performance prediction information was normalized to obtain the multi-dimensional heterogeneous performance prediction score. By analyzing the historical pork consumption structure using standardized multi-source heterogeneous datasets of pork market price trends, and determining the relative demand intensity of reproductive performance, growth performance, and slaughter performance, the relative demand intensity is used as the preference weight vector for the target region. The multidimensional heterogeneous performance prediction scores are then multiplied element-wise and summed to obtain a weighted comprehensive score. The feed cost index of the target area is obtained by standardizing multi-source heterogeneous datasets and normalizing it. The feed conversion ratio (FCR) prediction value is extracted from the growth performance prediction value. The FCR prediction value is divided by the average FCR of historical breeding lines in the target area to obtain the relative value of the FCR. This relative value of the FCR is then multiplied by the normalized feed cost index and the preset adjustment coefficient to obtain the cost penalty term. The cost penalty term is subtracted from the weighted comprehensive score to obtain the regional adaptation comprehensive score.
6. The method for evaluating and regionally optimizing pig breeding systems based on heterogeneous information networks according to claim 1, characterized in that, The process involves constructing a constrained combinatorial optimization model based on the comprehensive regional suitability scores of each candidate matching system, and finally outputting the optimal matching system and a report outlining the reasons for recommendation through iterative solutions. Specifically, this includes: Obtain the regional adaptation comprehensive score of each candidate breeding line, extract the list of grandparent breeding pig breeds and the required quantity of each candidate breeding line from the pedigree file, extract the available supply quantity of each grandparent breeding pig breed in the target area from the farm inventory records, eliminate candidate breeding lines whose demand exceeds the available supply quantity, and obtain the first candidate breeding line set. For each candidate breeding line in the first candidate breeding line set, calculate the genetic distance between parents, and remove candidate breeding lines that are below the lower limit of parental genetic distance. Based on the pig cross-farm transfer records and biosafety regulations data, extract the set of permitted introduction routes in the target area, remove candidate breeding lines that involve prohibited introduction routes, and obtain the second candidate breeding line set. Using the regional adaptation comprehensive score of each matching system in the second candidate matching system set as the ranking criterion, a constrained combinatorial optimization model is constructed. The decision variable is the selection state of each feasible candidate matching system, and the objective function is to maximize the regional adaptation comprehensive score of the selected matching system. When the number of feasible candidate matching systems is less than or equal to the preset size, all feasible candidate matching system combinations that meet the constraints are enumerated in an exhaustive manner, and the one with the highest regional adaptation comprehensive score is selected as the optimal matching system. When the number of matching systems exceeds the preset size, a two-stage heuristic algorithm combining greedy and local search is used to solve for the optimal matching system. The first stage calculates the ratio of the regional adaptation comprehensive score of each feasible candidate breeding line to the total number of grandparent breeding pigs required. Breeding lines are selected and added to the candidate set according to the ratio. After each addition, it is checked whether the upper limit constraint of grandparent breeding pig supply is still met. If not, it is skipped and the next one is examined until all the remaining candidate breeding lines are traversed and then the process stops. In the second stage, a matching system is randomly removed from the candidate set and an unselected matching system is selected from the remaining feasible candidate matching systems to be added. If the total score increases after the addition and all constraints are met, the replacement is retained. The random removal and addition operations are repeated a preset number of times until the total score no longer increases, at which point the optimal matching system identifier is output. By identifying the optimal breeding system, we obtain the corresponding predicted values for reproductive performance, growth performance, and slaughter performance, as well as the detailed comprehensive score for regional adaptation and the list of constraints met. We then generate a recommendation report to assist in regional optimization decision-making.
