Pig farm abortion attribution diagnosis method based on PRRS (porcine reproductive and respiratory syndrome) risk propagation knowledge graph

By constructing a knowledge graph for the spread of blue ear disease risk, combining graph attention networks and contextual representation learning, we quantified the contribution of blue ear disease risk in pig farms to the abortion rate, solving the problem of the difficulty in preventing and controlling blue ear disease in pig farms, and achieving accurate diagnosis and cost reduction.

CN120748698AActive Publication Date: 2025-10-03WENS FOODSTUFF GROUP CO LTD

Patent Information

Application Number
CN202511254652.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-10-03
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing technologies lack specialized risk diagnosis solutions for blue ear disease in pig farms, resulting in long transmission chains of blue ear disease within pig farms, easy mutation of the virus, and difficulty in effective prevention and control, which increases breeding costs and poses a threat to food safety.

Method used

A pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge graph is constructed. The knowledge graph is constructed by using detection data, immune data, weather data, etc., and combined with graph attention network and context representation learning to quantify the contribution of each risk subgraph to the abortion rate and generate quantitative attribution results.

Benefits of technology

It has achieved accurate attribution of blue ear disease risks in pig farms, reduced abortion rates, improved piglet quality, reduced breeding costs, and improved disease monitoring efficiency and diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120748698A_ABST
    Figure CN120748698A_ABST
Patent Text Reader

Abstract

The invention discloses a pig farm abortion attribution diagnosis method based on a porcine reproductive and respiratory syndrome risk propagation knowledge graph, and relates to the technical field of artificial intelligence, and the method comprises the steps: constructing a pig farm porcine reproductive and respiratory syndrome attribution knowledge graph, pre-defining a risk propagation mode according to a porcine reproductive and respiratory syndrome risk propagation mechanism, searching a path according with the risk propagation mode through graph mode matching, and carrying out the diagnosis of the abortion attribution of a pig farm. Integrating into a risk sub-graph; performing representation learning on the risk sub-graphs by adopting a graph attention network fused with PRRS risk propagation knowledge, and quantifying the contribution degree of each risk sub-graph to the abortion rate of the pig farm in combination with context representation learning and a time difference attenuation mechanism; and based on the contribution proportion of each risk event in the attention score decomposition risk sub-graph, generating a quantitative attribution result, and outputting a diagnosis result including risk event identification, a risk propagation link and a quantitative attribution contribution degree. Risk attribution of the porcine reproductive and respiratory syndrome in the pig farm is realized, and contribution of specific attribution risk points to the abortion rate of the pig farm is quantified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and more specifically, to a pig farm abortion attribution diagnosis method based on a blue ear disease risk propagation knowledge graph. Background Art

[0002] In the swine farming industry, farm production and management face numerous biosafety challenges, with blue ear disease (PRRS) being one of the primary challenges. PRRS can be transmitted, mutated, and spread through the introduction and placement of breeding stock. The disease can cause sow miscarriage, increase piglet mortality rates, and reduce piglet performance, increasing costs for pig farming companies and farmers while also posing a threat to local food safety.

[0003] On the other hand, although risk warning and attribution diagnosis solutions for major pig farm diseases already exist on the market, these solutions are applicable to most pig farm diseases, such as African swine fever and blue ear disease. However, these solutions are based on the construction of a general biosafety control system for pig farms, and no risk diagnosis solutions specifically for blue ear disease in pig farms have been developed. Due to the long transmission chain of blue ear disease, the numerous production links involved, the virus's susceptibility to mutation, and the fact that it is a domesticable virus, there are unique key risk points in its prevention and control. Therefore, there is an urgent need for a system that integrates the domain knowledge of blue ear disease in pig farms, constructs a knowledge graph for blue ear disease in pig farms, and realizes automatic attribution reasoning for blue ear disease. At the same time, a quantitative model for blue ear disease in pigs is needed to achieve the ability to quantify local risks and risk points. Summary of the Invention

[0004] In order to solve the above technical problems, the present invention proposes a pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge graph, which realizes the risk attribution of blue ear disease in pig farms and quantifies the contribution of specific risk points to the abortion rate of pig farms.

[0005] The first aspect of the present invention provides a method for attributing and diagnosing abortion in pig farms based on a knowledge graph of blue ear disease risk transmission, comprising the following steps: Based on the detection data, immunization data, weather data, herd entry data, domestication data and biosafety data, a knowledge graph of blue ear disease attribution in pig farms is constructed, and the entities and relationships in the knowledge graph of blue ear disease attribution in pig farms are stored in a graph database; Based on the blue ear disease risk transmission mechanism, a risk transmission model is predefined. Paths that meet the risk transmission model are searched through graph pattern matching, integrated into a risk subgraph, and an attribution link table is output. A graph attention network, incorporating knowledge of blue ear disease risk transmission, is used to learn representations of the risk subgraphs. Combining contextual representation learning with a temporal decay mechanism, the contribution of each risk subgraph to the abortion rate of pig farms is quantified. Based on the contribution degree combined with the attention score of the graph attention network, the contribution ratio of each risk event in the risk subgraph is decomposed to generate a quantitative attribution result, and the final output includes the diagnosis results of risk event identification, risk propagation link and quantitative attribution contribution degree.

[0006] In this solution, a knowledge graph of blue ear disease attribution in pig farms is constructed based on test data, immunization data, weather data, herd entry data, domestication data, and biosafety data, including: Construct a production event dataset during the observation period based on test data, immunization data, weather data, population entry data, domestication data, and biosafety data. Perform data cleaning and standardization on the production event dataset, and complete event attributes. Automatically extract entities and relationships through predefined node types and relationship types, convert the preprocessed production event dataset into nodes and edges of the pig farm blue ear disease attribution knowledge graph, and store it in the graph database; Use predefined risk rules to generate safety risk instances and associate them with corresponding nodes in the pig farm blue ear disease attribution knowledge graph.

[0007] In this solution, based on the blue ear disease risk transmission mechanism, a risk transmission model is predefined. Paths that meet the risk transmission model are searched through graph pattern matching, integrated into a risk subgraph, and an attribution link table is output, including: Obtain the blue ear disease risk transmission mechanism based on domain knowledge, extract key risk links based on the blue ear disease risk transmission mechanism combined with veterinary pathology and pig farm management processes, and predefine a preset number of transmission modes. Each transmission mode includes a triggering event, a transmission path, and an inhibition condition. Converting the propagation pattern into a computable graph search rule, specifying the node types that must be included in the propagation pattern and the legal relationships between nodes, and specifying timing constraints based on a preset observation window and causal timing; For each type of transmission pattern, graph query is used to retrieve paths that meet the predefined pattern in the constructed pig farm blue ear disease attribution knowledge graph, and different risk paths triggered by the same event in the same pig farm are obtained. These paths are aggregated by risk event type to retain the most complete transmission chain; Taking the pig farm as the root node and the abnormal abortion rate as the leaf node, all associated nodes and edges are merged to form a risk subgraph, which is then converted into an attribution link table for structured output.

[0008] In this solution, a graph attention network that integrates knowledge of blue ear disease risk propagation is used to learn the representation of the risk subgraph, including: Construct a risk subgraph representation learning network based on graph attention, extract node features from the risk subgraph, encode edge structures based on relationship types, assign different weights to different relationship types, and transform the risk subgraph into an input form suitable for graph attention network processing; The knowledge of blue ear disease transmission is integrated into the graph attention representation learning network. An independent copy of the concept node in each subgraph is created through the concept replication mechanism. The independent copies have the same initial embedding but participate in the attention calculation independently. The attention weights of event nodes and their directly associated concept nodes are calculated through a multi-hop attention mechanism to perform local risk propagation, aggregate multi-level concept nodes for global risk integration, introduce domain rules as bias items of attention scores, guide the model to focus on key paths, and obtain attention scores to update node feature representations.

[0009] In this solution, context representation learning and temporal decay mechanism are combined to quantify the contribution of each risk subgraph to the abortion rate of pig farms, including: The geographical location of the pig farm and the season of the observation period are encoded into a context vector through a context representation learning network module, and concatenated with the node features to generate a context embedding; Aggregating the feature representations of all nodes in the risk subgraph through graph pooling to obtain a subgraph representation, fusing the subgraph representation with context embedding, importing the fused features into the subgraph contribution estimation network module, and introducing a learnable attenuation coefficient through the time difference attenuation estimation network module to attenuate the feature representations of distant events before a preset time. Use the understanding linear layer and activation layer to obtain the contribution of the risk subgraph to the abortion rate of the pig farm.

[0010] In this solution, the contribution ratio of each risk event in the risk subgraph is decomposed based on the contribution degree combined with the attention score of the graph attention network to generate quantitative attribution results, including: Obtain the contribution value of the risk subgraph output by the risk subgraph representation learning network to the abortion rate of the pig farm, and trace back the attention score of the risk event node in the risk subgraph representation learning network. Sum the attention scores of all risk event nodes in the same risk subgraph, normalize the original score of each risk event node, and obtain the normalized attention score. The normalized attention score is used to distribute the contribution of the risk subgraph to the abortion rate of the pig farm to each risk event node in proportion, and the contribution ratio of each risk event in the risk subgraph to the abortion rate is obtained, which is expressed as: , in Indicates the In the risk subgraph The contribution of each risk event to the miscarriage rate, Indicates the The risk subgraph The attention score of each risk event node, represents the sum of attention scores, Indicates the The contribution of each risk subgraph to the abortion rate of the pig farm; Generate quantitative attribution results based on the contribution of each risk event to the miscarriage rate in the risk sub-graph.

[0011] In this solution, the final output includes the diagnosis results of risk event identification, risk propagation chain, and quantitative attribution contribution, including: Obtain the event type and key attributes of the risk event as the risk event identification result, and obtain the complete path of the causal chain from the source event to the abortion result as the risk propagation link; Obtain the contribution of the risk subgraph to the abortion rate of the pig farm and the contribution of the risk event to the abortion rate of the pig farm as the quantitative attribution contribution, and integrate the risk event identification, risk propagation link and quantitative attribution contribution as the diagnosis result; According to the quantitative attribution contribution and the warning classification standard, the warning is triggered, the warning information is generated and pushed, and the changes in the abortion rate of the pig farm are continuously monitored.

[0012] The second aspect of the present invention provides a pig farm abortion attribution diagnosis system based on the blue ear disease risk propagation knowledge graph, the system comprising: a graph automation construction module, a risk attribution reasoning module and a risk quantification module; The graph automation construction module constructs a production event data set within a preset observation period based on immunization data, weather data, population entry data, domestication data, and biosafety data. It automatically identifies and extracts risk events from structured pig farm event data according to predefined risk event criteria, converts the extracted entities and relationships into knowledge graph nodes and edges, and constructs a pig farm blue ear disease attribution knowledge graph that is stored in a graph database. The risk attribution reasoning module predefines a risk propagation model based on the blue ear disease transmission mechanism, uses graph pattern matching to search for paths that meet the preset risk propagation model in the pig farm blue ear disease attribution knowledge graph, integrates multiple risk paths, constructs a risk subgraph, and forms a complete pig farm blue ear disease attribution link table; The risk quantification module performs representation learning on the risk subgraph, combines context representation learning and time difference attenuation mechanism to quantify the contribution of each risk subgraph to the abortion rate of the pig farm, and decomposes the contribution ratio of each risk event in the risk subgraph based on the contribution combined with the attention score of the graph attention network to generate a quantitative attribution result.

[0013] Compared with the prior art, the present invention has the following beneficial effects: The present invention achieves risk attribution for blue ear disease in pig farms and quantifies the contribution of specific risk points to the abortion rate in pig farms. The present invention proposes an attribution knowledge graph for blue ear disease in pig farms. Its ontology design and attribution reasoning both integrate the risk propagation mechanism unique to blue ear disease. The attribution method is suitable for deep targeted diagnosis of blue ear disease in pig farms. Based on the knowledge attribution of blue ear disease, a quantitative attribution model for blue ear disease is proposed based on the characteristics of blue ear disease. This model achieves the quantitative attribution of local risks and risk points to the abortion rate in pig farms.

[0014] Strengthening pig farm monitoring for blue ear disease, implementing risk tracking and problem rectification, has reduced abortion rates, improved piglet quality, and thus lowered the cost per pound of meat. This has also reduced the efficiency of traceability diagnosis from weeks to minutes, resolving the previously difficult problem of blue ear disease tracing. Based on automated diagnostic rules, the system automatically triggers alerts for farms at high risk of blue ear disease and automatically pushes the attribution diagnostic results. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or exemplary descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to these drawings without paying any creative work.

[0016] Figure 1 A flowchart of a pig farm abortion attribution diagnosis method based on a knowledge graph of blue ear disease risk transmission is shown; Figure 2 A schematic diagram of the knowledge graph of blue ear disease attribution in pig farms is shown; Figure 3 The flowchart of constructing the knowledge graph of blue ear disease attribution in pig farms is shown; Figure 4 A flow chart showing the production risk subgraph; Figure 5 A flowchart of quantitative attribution based on graph attention-based risk subgraph representation learning network is shown; Figure 6 A block diagram of the pig farm abortion attribution diagnosis system based on the blue ear disease risk propagation knowledge graph is shown. DETAILED DESCRIPTION

[0017] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0018] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0019] Figure 1 A flowchart of the pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge graph is shown.

[0020] like Figure 1 As shown, this embodiment provides a pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge graph, including: S102, constructing a pig farm blue ear disease attribution knowledge graph based on detection data, immunization data, weather data, herd entry data, domestication data, and biosafety data, and storing entities and relationships in the pig farm blue ear disease attribution knowledge graph in a graph database; S104: Based on the blue ear disease risk transmission mechanism, a risk transmission model is predefined, and paths that meet the risk transmission model are searched through graph pattern matching, integrated into a risk subgraph, and an attribution link table is output; S106, using a graph attention network that integrates knowledge of blue ear disease risk propagation to perform representation learning on the risk subgraph, combining contextual representation learning and time difference decay mechanism to quantify the contribution of each risk subgraph to the abortion rate of the pig farm; S108, based on the contribution degree combined with the attention score of the graph attention network, the contribution ratio of each risk event in the risk subgraph is decomposed to generate a quantitative attribution result, and the final output includes a diagnostic result of risk event identification, risk propagation link and quantitative attribution contribution degree.

[0021] It should be noted that based on the transmission pathological mechanism of blue ear disease, a knowledge graph of blue ear disease risk attribution for pig farm environment was constructed. Figure 2 As shown. The knowledge graph of blue ear disease risk attribution in pig farms is used to conduct systematic attribution analysis of blue ear disease risks in pig farms. The attribution graph explains the transmission mechanism of blue ear disease in pigs, analyzes the impact path and transmission effect of the disease in various production links of pig farms, and realizes the integration and coordinated application of the blue ear disease biosafety knowledge system and the pig farm production management knowledge system. The attribution chain constructed by the graph strictly follows the law of blue ear disease onset and transmission. The graph focuses on the transmission mechanism of blue ear disease in key production links such as introduction, group entry, and breeding. In addition, the knowledge graph of blue ear disease risk attribution in pig farms establishes a structured porcine reproductive and respiratory syndrome knowledge system through correlation analysis of pig farm multivariate heterogeneous event data and the risk system structure constructed based on the blue ear disease transmission path, realizing the scientific organization and structured presentation of disease prevention and control knowledge.

[0022] like Figure 3As shown in the figure, the steps for constructing the pig farm blue ear disease attribution knowledge graph are as follows: construct a production event data set during the observation period based on detection data, immunization data, weather data, population entry data, domestication data and biosafety data, perform data cleaning and standardization on the production event data set, and complete event attributes; automatically extract entities and relationships through predefined node types and relationship types, convert the preprocessed production event data set into nodes and edges of the pig farm blue ear disease attribution knowledge graph, and store them in the graph database; use predefined risk rules to generate safety risk instances, and associate them with the corresponding nodes of the pig farm blue ear disease attribution knowledge graph.

[0023] The pig farm blue ear attribution knowledge graph node defines a total of 5 subject categories and 12 node types. The subject categories include: pig farm status indicator category, external environment category, production management category, safety risk category and concept category. The pig farm status indicator category is divided into pig farm status node and pig farm abortion status node. The pig farm status node is used to characterize the status information of the pig farm to be attributed, including static information such as the pig farm's affiliated organization, pig farm name, pig farm latitude and longitude, province, city, etc., as well as dynamic status information such as the attribution date, the number of pregnant sows on hand, the number of basic sows on hand, and the blue ear disease positive test results of the pig farm corresponding to the attribution date; the pig farm abortion status node is intended to grade the abortion rate and abortion status of the target pig farm, and determine whether the pig farm is infected with blue ear disease and the severity of the epidemic. The risk status of the basic sow group will be directly reflected in the change of the abortion rate indicator, and then identify whether there is an abnormal abortion rate or potential abnormal abortion rate. The production management category includes the daily production activities of the pig farm, including breeding, introduction of new breeds, group transfer, delivery and immunization operations, all of which may become links for the introduction and spread of blue ear pathogens. The safety risk category nodes include risk events and safety events. Risk events are non-compliant events or activities that increase the risk of blue ear disease in the production process of the pig farm, such as isolation before entering the group; safety events are activities that suppress the risk of blue ear disease, which plays a role in preventing the spread of risks. For example, blue ear disease immunization events indirectly reduce the risk of basic sows becoming ill by enhancing the immunity of the pig herd. The external environment category includes weather conditions such as temperature and wind, which have a significant impact on the spread of the virus or the inhibition of initiation. For example, delivery room management events and weather event nodes indirectly lead to basic sow risks through the risk of virus spread. The specific pig farm blue ear attribution knowledge graph node themes and types are summarized in Table 1 below: Table 1: Overview of the themes and types of nodes in the knowledge graph of blue ear disease attribution in pig farms

[0024] The pig farm blue ear disease attribution knowledge graph defines graph node relationship types, including occur, exist, isA, by, experience, lead to, affect, inhibit, exhibit, and harbor. For example, by associating the farm ID and date, edges are constructed between the farm and other production events, such as introduction, herding, mating, and vaccination. The relationship type is occur, indicating that a certain event occurred at the farm. The specific circumstances of a production event (such as excessive age at introduction or a positive test result) can trigger one or more specific risk instances. By associating the farm ID and time, edges are constructed between the farm, introduction, herding, mating, and vaccination events and the corresponding risk events. The relationship type is exist, indicating that a specific risk event exists among these events. By associating the knowledge graph's causal link layer with the farm ID and time, edges are constructed between production events and concepts. The relationship type is by or lead to. It is clear which abstract, defined risk type each specific risk instance represents. This helps in the classification, statistics and understanding of risks. By associating the risk instance with its links, event descriptions and other attributes, an edge is constructed between the risk instance node and the risk knowledge system concept node, and the relationship type isA.

[0025] Automatically extract events from daily farm data within [TN, T-1] days, where T is the operation date and N days is the observation time interval. Identify risk events at the farm-batch-type granularity and risk events at the farm-type granularity, and infer the disease risk attribution results of the pig farm based on the knowledge graph and predefined risk propagation rules. Based on the constructed pig farm blue ear attribution knowledge graph and according to the risk propagation rules, complete the graph path search, integrate pig farm events, event attributes and reasoning links, output the risk link subgraph, and realize the attribution task of pig farm diseases.

[0026] Based on domain knowledge, we obtain the risk transmission mechanism of blue ear disease. Based on this risk transmission mechanism, we combine veterinary pathology and the pig farm management process (introduction → isolation → entry into the herd → breeding) to extract key risk links. For example, the virus is introduced through introduction of breeders → insufficient isolation → entry into the herd and infection of the base sows → increased abortion rate. Seven transmission modes are predefined, including: Transmission mode 1: There are risks in introducing new breeds and risks in joining the herd. The triplet of the risk transmission link in this case is expressed as: (pig farm, occurrence, introduction event), (introduction event, existence, introduction risk event), (introduction risk event, leading to reserve pig risk), (reserve pig risk, through, entry event), (entry event, existence, entry risk event), (entry risk event, leading to, base sow risk), (base sow risk, affects, abortion event), (abortion event, manifested as, abnormal abortion rate), (pig farm, suffers, abnormal abortion rate); Transmission mode 2: There is risk in introducing new breeds, but no risk in joining the herd. The triplet of the risk transmission link in this case is expressed as: (pig farm, occurrence of introduction event), (introduction event, existence of introduction risk event), (introduction risk event, leading to reserve pig risk), (reserve pig risk, through entry event), (entry event, is entry into the herd), (entry into the herd, leading to basic sow risk), (basic sow risk, affects abortion rate event), (abortion rate event, manifested as abnormal abortion rate), (pig farm, suffers from abnormal abortion rate); Transmission mode 3: There is no risk in introducing new breeds, but there is risk in joining the herd. The triplet of the risk transmission link in this case is expressed as: (pig farm, occurrence, joining the herd event), (joining the herd event, existence, joining the herd risk event), (joining the herd risk event, leading to, basic sow risk), (basic sow risk, affecting, abortion rate event), (abortion rate event, manifested as, abnormal abortion rate), (pig farm, suffering, abnormal abortion rate); Transmission mode 4: Breeding is risky. The triplet of the risk transmission link in this case is expressed as: (pig farm, occurrence, breeding event), (breeding event, existence, breeding risk event), (breeding risk event, leading to, basic sow risk), (basic sow risk, affecting, abortion rate event), (abortion rate event, manifested as, abnormal abortion rate), (pig farm, suffering, abnormal abortion rate); Transmission mode 5: Immunization carries risk. The triplet of the risk transmission link in this case is expressed as: (pig farm, occurrence, immunization event), (immunization event, existence, immunization risk event), (immunity risk event, leading to decreased immunity), (decreased immunity, leading to basic sow risk), (basic sow risk, affecting, abortion rate event), (abortion rate event, manifested as abnormal abortion rate), (pig farm, suffering, abnormal abortion rate); Transmission mode 6: Farrowing room management is risky. The triplet of the risk transmission link in this case is expressed as: (pig farm, occurrence, farrowing room management event), (farming room management event, existence, farrowing room management risk event), (farming room management risk event, leading to, virus spread risk), (virus spread risk, leading to, basic sow risk), (basic sow risk, affecting, abortion rate event), (abortion rate event, manifested as, abnormal abortion rate), (pig farm, suffering, abnormal abortion rate); Transmission mode 7: Weather poses a risk. The triplet expression of the risk transmission link in this case is: (pig farm, occurrence, weather event), (weather event, existence, weather risk event), (weather risk event, leading to, virus spread risk), (virus spread risk, leading to, basic sow risk) (basic sow risk, impact, abortion rate event), (abortion rate event, manifested as, abnormal abortion rate), (pig farm, suffered, abnormal abortion rate).

[0027] Each type of transmission mode includes triggering events (such as positive introduction test, overdue immunity), transmission paths (such as introduction risk → reserve pig risk → basic sow risk → abortion) and inhibition conditions (such as isolation after entering the group can block the transmission); the transmission mode is converted into a computable graph search rule, which stipulates the node types that must be included in the transmission mode (such as introduction event node, abortion rate abnormality concept node) and the legal relationship between nodes (such as introduction event → exist → risk event → lead to → reserve pig risk), and specifies the timing constraints according to the preset observation window and causal sequence. The risk subgraph generation process is as follows: Figure 4 As shown, for each type of transmission mode, graph query is used to retrieve paths that meet the predefined pattern in the constructed pig farm blue ear disease attribution knowledge graph, and different risk paths triggered by the same event in the same pig farm are obtained. They are aggregated according to the type of risk event and the most complete transmission link is retained; with the pig farm as the root node and the abnormal abortion rate as the leaf node, all related nodes and edges are merged to form a risk subgraph, and the risk subgraph is converted into an attribution link table for structured output.

[0028] According to an embodiment of the present invention, a graph attention network integrating blue ear disease risk propagation knowledge is used to perform representation learning on the risk subgraph. Figure 5As shown, a graph-attention-based risk subgraph representation learning network is constructed, comprising a graph attention representation learning network, a contextual representation learning network module, a subgraph contribution estimation network module, and a time-difference attenuation estimation network module. Node features are extracted from the risk subgraph, and edge structures are encoded based on relationship types, with different weights assigned to different relationship types. The risk subgraph is then transformed into an input form suitable for graph attention network processing. The attribution link for each pig farm is treated as an independent subgraph, preserving its internal node and edge topology. Knowledge about the spread of blue ear disease is integrated into the graph attention representation learning network to enhance the semantic representation of risk pathways. Because shared concept nodes (such as base sow risk) in traditional graph attention networks can lead to feature confusion across different subgraphs, a concept replication mechanism is used to create independent copies of concept nodes in each subgraph. These copies have the same initial embedding but participate independently in attention computation. A concept replication operation is introduced to extend virtual concept nodes. Virtual concept nodes share a consistent input embedding representation, but different convolution operations are performed in each subgraph, effectively preserving the independence of the subgraphs. The attention weights of event nodes and their directly associated concept nodes are calculated through a multi-hop attention mechanism to perform local risk propagation. The weights are determined by the similarity of node features and edge types. Multi-level concept nodes are aggregated for global risk integration to capture long-distance dependencies. Domain rules (such as insufficient isolation upon entry into a group contributes more to the miscarriage rate) are introduced as bias items in the attention score to guide the model to focus on key paths and obtain attention scores to update node feature representations.

[0029] The geographical location of the pig farm and the season of the observation period are encoded into a context vector through the context representation learning network module, and the context embedding is generated by splicing it with the node features; the additional impact of different geographical regions and seasonal factors on risk propagation is learned, such as the significant inhibitory effect of high temperature environment on blue ear disease. The feature representation of all nodes in the risk subgraph is aggregated by graph pooling to obtain the subgraph representation, the subgraph representation and the context embedding are fused, the fused features are imported into the subgraph contribution estimation network module, and the learnable attenuation coefficient is introduced through the time difference attenuation estimation network module to enhance the weight distribution of the recent risk subgraph and attenuate the feature representation of the long-term event before the preset time; if the event occurs at , the current observation day is , then the attenuation factor is The contribution of the risk subgraph to the abortion rate of the pig farm is obtained using the understanding linear layer and activation layer. The graph attention network that integrates the knowledge of blue ear disease risk propagation is trained based on the MSE loss. The loss formula is as follows: , Where, represents the sample index corresponding to the attribution performance period, Indicates pig farm samples No. Risk subgraph, Indicates pig farm samples The miscarriage rate corresponding to the performance period, Indicates pig farm samples The contribution of the risk subgraph to the abortion rate of the pig farm reflects the contribution of the risk subgraph to the sample Quantitative attribution results for miscarriage rates.

[0030] It should be noted that the contribution value of the risk subgraph output by the risk subgraph representation learning network to the abortion rate of the pig farm is obtained, and the attention score of the risk event node in the risk subgraph representation learning network is traced back, the attention scores of all risk event nodes in the same risk subgraph are summed, and the original score of each risk event node is normalized to obtain the normalized attention score; the normalized attention score is used to proportionally distribute the contribution of the risk subgraph to the abortion rate of the pig farm to each risk event node, and the contribution ratio of each risk event in the risk subgraph to the abortion rate is obtained, which is expressed as: , in Indicates the In the risk subgraph The contribution of each risk event to the miscarriage rate, Indicates the The risk subgraph The attention score of each risk event node, represents the sum of attention scores, Indicates the The contribution of each risk subgraph to the abortion rate of the pig farm.

[0031] Based on the contribution of each risk event to the miscarriage rate in the risk subgraph, a quantitative attribution result is generated, including the risk event type, contribution ratio, key attributes, and improvement suggestions. High-risk events are checked for compliance with domain knowledge. The quantitative attribution results are verified and calibrated by comparing the actual impact of similar events in historical data. The quantitative results directly guide the prioritization of prevention and control measures.

[0032] It is preferred to integrate risk events across subgraphs, group similar risk events in different risk subgraphs together, and calculate the contribution value of similar events. Sum up and get the global contribution of this type of risk event, and merge the contributions of the same type of risk events in multiple subgraphs of the same pig farm. In addition, through counterfactual contribution analysis, evaluate the potential impact of improving specific risk events on the abortion rate. If an event is eliminated (such as "insufficient isolation time"), its contribution value It will be deducted from the total miscarriage rate. For example, if the current miscarriage rate is 30% and a certain event contributes 10%, the expected miscarriage rate will drop to 20% after improvement.

[0033] It should be noted that the event type and key attributes of the risk event are obtained as the risk event identification result. The event types include introduction risk, herd entry risk, immune risk, environmental risk, etc. The key attributes include time, batch, test results, compliance, etc. The causal chain from the source event to the abortion result is generated as a complete path as the risk transmission link, for example, introduction of wild virus positive → reserve pig risk → insufficient isolation of entry into the herd → base sow risk → abnormal abortion rate. The contribution of the risk subgraph to the pig farm abortion rate and the contribution value of the risk event to the pig farm abortion rate are obtained as quantitative attribution contribution. The risk event identification, risk transmission chain, and quantitative attribution contribution are integrated as the diagnostic result. According to the quantitative attribution contribution, the warning is triggered based on the warning classification standard. The warning classification standard includes red warning: single event contribution ≥ 20% or risk subgraph contribution ≥ 40%; yellow warning: 10% ≤ single event contribution < 20% or risk subgraph contribution 20%-40%; blue warning: single event contribution or risk subgraph contribution < 10%. Generate early warning information containing event summaries for push notification, obtain recommended measures based on domain knowledge, continuously monitor changes in pig farm abortion rates to track results, and achieve closed-loop early warning management.

[0034] In a preferred embodiment of the present invention, intelligent disease attribution is performed on the increased abortion rate caused by blue ear disease in pig farms, aiming to achieve the following tasks: Task 1: Risk identification and risk attribution. On day T, multi-dimensional heterogeneous data on pig farm production activities (bred stock introduction, herding, breeding), blue ear disease biosecurity activities (immunization, testing), and external conditions (such as weather) within the past 90 days are collected. (1) Identify the risk events that occurred on the farm in the previous 90 days; (2) Give the attribution results of the pig farm’s abortion rate in the first 7 days to each risk event (risk transmission causal relationship).

[0035] Example: Given the complete data recorded on a pig farm's production line for the previous 90 days [2025-01-31 to 2025-04-30] on [2025-05-01], according to Task 1 (risk identification and risk attribution), identify all risk events that occurred in the pig farm during the observation period. Based on the direction of risk propagation, string these risk events together into a complete risk chain as the attribution chain for the abortion rate.

[0036] Task 2: Quantification of risk attribution. On day T, quantitatively attribute the risk events and risk propagation link sets obtained in Task 1 (risk identification and risk attribution).

[0037] (1) Quantify the risk events on this link, that is, obtain the contribution of this event to the abortion rate / mortality rate; (2) Support counterfactual reasoning, that is, improving the risk event and quantifying the degree of optimization of the current risk indicators.

[0038] For example, on [2025-05-01], the attribution chain of the abortion rate / mortality rate of a pig farm in the previous 90 days [2025-01-31 to 2025-04-30] is given, and the contribution of each event to the abortion rate is calculated. For example, the specific time of introduction of a certain breed accounts for 19%, and the specific event of isolation accounts for 31%.

[0039] Figure 6 A block diagram of the pig farm abortion attribution diagnosis system based on the blue ear disease risk propagation knowledge graph is shown.

[0040] The second embodiment of the present invention provides a pig farm abortion attribution diagnosis system based on a blue ear disease risk propagation knowledge graph, the system comprising: a graph automation construction module, a risk attribution reasoning module, and a risk quantification module; The graph automation construction module constructs a production event data set within a preset observation period based on immunization data, weather data, population entry data, domestication data and biosafety data. According to the predefined risk event caliber, it automatically identifies and extracts risk events from structured pig farm event data, converts the extracted entities and relationships into knowledge graph nodes and edges, and constructs a pig farm blue ear disease attribution knowledge graph stored in the graph database; defines graph node types, including pig farm status indicator class, external environment class, production management class, safety risk class and concept class; defines graph node relationship types, including occur, exist, is (isA), by, experience, lead to, affect, inhibit, exhibit and harbor.

[0041] The risk attribution reasoning module, based on the PRRS transmission mechanism, predefines risk propagation patterns, including: risky introduction of breeders into a herd; risky introduction of breeders into a herd; risky introduction of breeders into a herd; risky introduction of breeders into a herd; risky breeding; risky immunization; risky farrowing room management; and risky weather. Using graph pattern matching, the module searches for paths that match the pre-set risk propagation patterns within the PRRS attribution knowledge graph. Multiple risk paths are integrated to construct a risk subgraph, resulting in a complete PRRS attribution link table.

[0042] The risk quantification module performs representation learning on the risk subgraph, combines context representation learning and time difference attenuation mechanism to quantify the contribution of each risk subgraph to the abortion rate of the pig farm, and decomposes the contribution ratio of each risk event in the risk subgraph based on the contribution combined with the attention score of the graph attention network to generate a quantitative attribution result.

[0043] Preferably, the system also includes a visualization and decision support module to output diagnostic results including risk event identification, risk propagation links and quantitative attribution contributions, provide an interactive graph visualization interface, display risk propagation links and structured reports, and trigger early warnings based on the diagnostic results.

[0044] The third embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the above-mentioned processor executes the computer program code, the electronic device executes the relevant method steps in the above-mentioned method embodiment.

[0045] In the several embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. In addition, the functional units in the various embodiments of the present invention can all be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0046] Those skilled in the art will understand that all or part of the steps of the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0047] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. A pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map, characterized in that: The following steps are involved: Based on the detection data, immunization data, weather data, herd entry data, domestication data and biosafety data, a knowledge graph of blue ear disease attribution in pig farms is constructed, and the entities and relationships in the knowledge graph of blue ear disease attribution in pig farms are stored in a graph database; Based on the blue ear disease risk transmission mechanism, a risk transmission model is predefined. Paths that meet the risk transmission model are searched through graph pattern matching, integrated into a risk subgraph, and an attribution link table is output. A graph attention network, incorporating knowledge of blue ear disease risk transmission, is used to learn representations of the risk subgraphs. Combining contextual representation learning with a temporal decay mechanism, the contribution of each risk subgraph to the abortion rate of pig farms is quantified. Based on the contribution degree combined with the attention score of the graph attention network, the contribution ratio of each risk event in the risk subgraph is decomposed to generate a quantitative attribution result, and the final output includes the diagnosis results of risk event identification, risk propagation link and quantitative attribution contribution degree.

2. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 1 is characterized in that: Based on detection data, immunization data, weather data, herd entry data, domestication data and biosafety data, a knowledge graph of blue ear disease attribution in pig farms is constructed, including: Construct a production event dataset during the observation period based on test data, immunization data, weather data, population entry data, domestication data, and biosafety data. Perform data cleaning and standardization on the production event dataset, and complete event attributes. Automatically extract entities and relationships through predefined node types and relationship types, convert the preprocessed production event dataset into nodes and edges of the pig farm blue ear disease attribution knowledge graph, and store it in the graph database; Use predefined risk rules to generate safety risk instances and associate them with corresponding nodes in the pig farm blue ear disease attribution knowledge graph.

3. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 1 is characterized in that: Based on the blue ear disease risk transmission mechanism, a risk transmission model is predefined. Paths that meet the risk transmission model are searched through graph pattern matching, integrated into a risk subgraph, and an attribution link table is output, including: Obtain the blue ear disease risk transmission mechanism based on domain knowledge, extract key risk links based on the blue ear disease risk transmission mechanism combined with veterinary pathology and pig farm management processes, and predefine a preset number of transmission modes. Each transmission mode includes a triggering event, a transmission path, and an inhibition condition. Converting the propagation pattern into a computable graph search rule, specifying the node types that must be included in the propagation pattern and the legal relationships between nodes, and specifying timing constraints based on a preset observation window and causal timing; For each type of transmission pattern, graph query is used to retrieve paths that meet the predefined pattern in the constructed pig farm blue ear disease attribution knowledge graph, and different risk paths triggered by the same event in the same pig farm are obtained. These paths are aggregated by risk event type to retain the most complete transmission chain; Taking the pig farm as the root node and the abnormal abortion rate as the leaf node, all associated nodes and edges are merged to form a risk subgraph, which is then converted into an attribution link table for structured output.

4. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 3 is characterized in that: A number of predefined propagation modes are available, including: Transmission mode 1: There are risks in introducing new breeds and risks in joining the herd. The triplet of the risk transmission link in this case is expressed as follows: pig farm, occurrence, introduction event; introduction event, existence, introduction risk event; introduction risk event, leading to, reserve pig risk; reserve pig risk, through, joining the herd event; joining the herd event, existence, joining the herd risk event; joining the herd risk event, leading to, base sow risk; base sow risk, affects, abortion event; abortion event, manifested as, abnormal abortion rate; pig farm, suffers, abnormal abortion rate; Transmission mode 2: There are risks in introducing new breeds, but no risks in joining a herd. The triplet of the risk transmission link in this case is expressed as follows: pig farm, occurrence, introduction event; introduction event, existence, introduction risk event; introduction risk event, leading to, reserve pig risk; reserve pig risk, through, joining a herd event; joining a herd event, is, joining a herd; joining a herd, leading to, base sow risk; base sow risk, affects, abortion rate event; abortion rate event, manifested as, abnormal abortion rate; pig farm, suffers, abnormal abortion rate; Transmission mode 3: There is no risk in introducing new breeds, but there is risk in joining the herd. The triplet of the risk transmission link in this case is expressed as: pig farm, occurrence, joining event; joining event, existence, joining risk event; joining risk event, leading to, basic sow risk; basic sow risk, affecting, abortion rate event; abortion rate event, manifested as, abnormal abortion rate; pig farm, suffering, abnormal abortion rate; Transmission mode 4: Breeding is risky. The triplet of the risk transmission link in this case is expressed as follows: pig farm, breeding event occurs; breeding event, breeding risk event exists; breeding risk event leads to basic sow risk; basic sow risk affects abortion rate event; abortion rate event manifests as abnormal abortion rate; pig farm suffers from abnormal abortion rate; Transmission mode 5: Immunization carries risk. The triplet expression of the risk transmission link in this case is: pig farm, occurrence, immunity event; immunity event, existence, immunity risk event; immunity risk event, leading to, decreased immunity; decreased immunity, leading to, basic sow risk; basic sow risk, affecting, abortion rate event; abortion rate event, manifested as, abnormal abortion rate; pig farm, suffering, abnormal abortion rate; Transmission mode 6: There are risks in farrowing room management. The triplet of the risk transmission link in this case is expressed as follows: pig farm, farrowing room management event occurs; farrowing room management event, there is a farrowing room management risk event; farrowing room management risk event leads to virus spread risk; virus spread risk leads to base sow risk; base sow risk affects abortion rate event; abortion rate event manifests as abnormal abortion rate; pig farm suffers from abnormal abortion rate; Transmission mode 7: Weather poses a risk. The triplet expression of the risk transmission link in this case is: pig farm, weather event occurs; weather event, weather risk event exists; weather risk event leads to virus spread risk; virus spread risk leads to basic sow risk; basic sow risk affects abortion rate event; abortion rate event manifests as abnormal abortion rate; pig farm suffers from abnormal abortion rate.

5. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 1 is characterized in that: A graph attention network that integrates knowledge of blue ear disease risk transmission is used to learn the representation of the risk subgraph, including: Construct a risk subgraph representation learning network based on graph attention, extract node features from the risk subgraph, encode edge structures based on relationship types, assign different weights to different relationship types, and transform the risk subgraph into an input form suitable for graph attention network processing; The knowledge of blue ear disease transmission is integrated into the graph attention representation learning network. An independent copy of the concept node in each subgraph is created through the concept replication mechanism. The independent copies have the same initial embedding but participate in the attention calculation independently. The attention weights of event nodes and their directly associated concept nodes are calculated through a multi-hop attention mechanism to perform local risk propagation, aggregate multi-level concept nodes for global risk integration, introduce domain rules as bias items of attention scores, guide the model to focus on key paths, and obtain attention scores to update node feature representations.

6. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 5 is characterized in that: Combining contextual representation learning and the time-difference decay mechanism, we quantify the contribution of each risk subgraph to the abortion rate of pig farms, including: The geographical location of the pig farm and the season of the observation period are encoded into a context vector through a context representation learning network module, and concatenated with the node features to generate a context embedding; Aggregating the feature representations of all nodes in the risk subgraph through graph pooling to obtain a subgraph representation, fusing the subgraph representation with context embedding, importing the fused features into the subgraph contribution estimation network module, and introducing a learnable attenuation coefficient through the time difference attenuation estimation network module to attenuate the feature representations of distant events before a preset time. Use the understanding linear layer and activation layer to obtain the contribution of the risk subgraph to the abortion rate of the pig farm.

7. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 1 is characterized in that: Based on the contribution degree combined with the attention score of the graph attention network, the contribution ratio of each risk event in the risk subgraph is decomposed to generate quantitative attribution results, including: Obtain the contribution value of the risk subgraph output by the risk subgraph representation learning network to the abortion rate of the pig farm, and trace back the attention score of the risk event node in the risk subgraph representation learning network. Sum the attention scores of all risk event nodes in the same risk subgraph, normalize the original score of each risk event node, and obtain the normalized attention score. The normalized attention score is used to distribute the contribution of the risk subgraph to the abortion rate of the pig farm to each risk event node in proportion, and the contribution ratio of each risk event in the risk subgraph to the abortion rate is obtained, which is expressed as: , in Indicates the In the risk subgraph The contribution of each risk event to the miscarriage rate, Indicates the The risk subgraph The attention score of each risk event node, represents the sum of attention scores, Indicates the The contribution of each risk subgraph to the abortion rate of the pig farm; Generate quantitative attribution results based on the contribution of each risk event to the miscarriage rate in the risk sub-graph.

8. The pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge map according to claim 1 is characterized in that: The final output includes the diagnosis results of risk event identification, risk propagation links, and quantitative attribution contribution, including: Obtain the event type and key attributes of the risk event as the risk event identification result, and obtain the complete path of the causal chain from the source event to the abortion result as the risk propagation link; Obtain the contribution of the risk subgraph to the abortion rate of the pig farm and the contribution of the risk event to the abortion rate of the pig farm as the quantitative attribution contribution, and integrate the risk event identification, risk propagation link and quantitative attribution contribution as the diagnosis result; According to the quantitative attribution contribution and the warning classification standard, the warning is triggered, the warning information is generated and pushed, and the changes in the abortion rate of the pig farm are continuously monitored.

9. A pig farm abortion attribution diagnosis system based on blue ear disease risk propagation knowledge graph, characterized in that: Used to implement the pig farm abortion attribution diagnosis method based on the blue ear disease risk propagation knowledge graph as described in any one of claims 1 to 8, the system includes: a graph automation construction module, a risk attribution reasoning module and a risk quantification module; The graph automation construction module constructs a production event data set within a preset observation period based on immunization data, weather data, population entry data, domestication data, and biosafety data. It automatically identifies and extracts risk events from structured pig farm event data according to predefined risk event criteria, converts the extracted entities and relationships into knowledge graph nodes and edges, and constructs a pig farm blue ear disease attribution knowledge graph that is stored in a graph database. The risk attribution reasoning module predefines a risk propagation model based on the blue ear disease transmission mechanism, uses graph pattern matching to search for paths that meet the preset risk propagation model in the pig farm blue ear disease attribution knowledge graph, integrates multiple risk paths, constructs a risk subgraph, and forms a complete pig farm blue ear disease attribution link table; The risk quantification module performs representation learning on the risk subgraph, combines context representation learning and time difference attenuation mechanism to quantify the contribution of each risk subgraph to the abortion rate of the pig farm, and decomposes the contribution ratio of each risk event in the risk subgraph based on the contribution combined with the attention score of the graph attention network to generate a quantitative attribution result.

Citation Information

Patent Citations

  • Fuzzy network detection pattern matching

    CN115039098A

  • Pig farm disease risk attribution method and system based on knowledge graph

    CN119207779A

  • Multi-modal enterprise credit risk assessment method and device based on knowledge graph

    CN120509958A

Cited By

  • Medical institution safety production risk reasoning method, device and equipment and storage medium

    CN120995035A

  • Tax transaction decision-making method based on cross-border trade supply chain

    CN121391474A

  • Intelligent livestock health management and disease early warning system

    CN121922383A