A pig farm disease risk attribution method and system based on knowledge graph

By constructing a pig farm biosafety knowledge map and combining it with large language model analysis, it solves the problem that it is difficult to deeply reveal the root causes of the problem in traditional breeding management, achieves more accurate and efficient risk attribution, provides scientific decision-making support, and improves breeding benefits.

CN119207779BActive Publication Date: 2025-04-01WENS FOODSTUFF GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411692280.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-04-01
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

Traditional breeding management methods are difficult to deeply reveal the root cause of pig farm problems, resulting in insufficient attribution of pig farm risks and ineffective identification and resolution of problems in the breeding process.

Method used

Using a pig farm disease risk attribution method based on knowledge graphs, by constructing a pig farm biosafety knowledge map with a hierarchical structure, combining large language models for data mining and analysis, we discovered the potential relationship between problems in pig farms and the biosafety manual, and provided a more logical risk attribution analysis.

Benefits of technology

It improves the accuracy and efficiency of problem attribution, provides more scientific and systematic decision-making support for pig farm management, helps managers better respond to breeding challenges and improve breeding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207779B_ABST
    Figure CN119207779B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for attributing disease risks in pig farms based on knowledge graphs, including: constructing a knowledge graph of pig farm biosafety based on pig industry biosafety applications and knowledge bases in the field of pig industry biosafety; secondly, inputting all pig farm events within N days of the pig farm, the risks and risk probabilities of the pig farm; finding factors causing the disease in the pig farm through the knowledge graph of pig farm biosafety, and giving the disease text attribution of the pig farm based on constraints such as the contribution of the pig farm problems. For pig farms at medium and high risks, rectification and prediction are carried out according to the risk items after attribution, and pig farms at low risks or pig farms that have not developed the disease after early warning can be summarized as the target of excellent management experience. Through the analysis and reasoning of the graph, the present invention can provide a more logical analysis for the pig farm risk attribution task, help pig farms to deeply understand the characteristics and prevention and control requirements of various diseases, and provide a scientific basis for formulating targeted prevention and control strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pig farm risk attribution, and more specifically, to a pig farm disease risk attribution method and system based on a knowledge graph. Background Art

[0002] In the livestock industry, especially in the field of pig farming, the operation and management of pig farms face many challenges. Among them, how to effectively identify and solve various problems in the farming process is crucial to improving farming efficiency, reducing farming costs and ensuring animal welfare. However, traditional farming management methods often rely on experience judgment and simple data analysis, which makes it difficult to deeply reveal the root cause of the problem, the so-called "diagnostic attribution problem."

[0003] In the process of biosafety incident management in pig farms, there are key issues such as the inability to fully integrate business knowledge and the difficulty of business units in locating, resulting in insufficient risk attribution of pig farms and the inability to implement the requirements of early detection and early diagnosis. In response to this problem, the present invention proposes the goal of disease attribution in pig farms. First, for non-diseased pig farms that are warned of medium and high risks, targeted risk summaries and actual risk items are provided. Second, for non-diseased pig farms that are warned of low risks or pig farms that have not been sick within 21 days after the warning, a review of excellent management experience is provided. The present invention proposes to provide a more logical analysis for the risk attribution task of pig farms based on the pig farm biosafety knowledge graph. Combining knowledge graph technology with pig farm risk attribution tasks can not only improve the accuracy and efficiency of problem attribution, but also provide more scientific and systematic decision support for pig farm management. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a pig farm disease risk attribution method and system based on knowledge graph, which aims to use the pig farm biosafety knowledge graph to discover the potential correlation between the existing problems in the pig farm and the biosafety manual, and provide a more logical analysis for the pig farm risk attribution task through reasoning and analysis of the graph, so as to help pig farm managers better cope with various breeding challenges and improve breeding efficiency.

[0005] The first aspect of the present invention provides a method for attributing disease risks in pig farms based on a knowledge graph, comprising:

[0006] Obtain the pig industry biosafety application, pig industry biosafety field knowledge base, risk level and risk probability of the pig farm, and all pig farm events within N days, and pre-process the acquired data;

[0007] Based on the large language model, different conceptual entities are mined from the knowledge base of pig biosafety applications and pig biosafety fields to build a hierarchical pig farm biosafety knowledge graph.

[0008] Taking all the pig farm events in the preset observation period as input, obtaining the nodes and node relationships in the pig farm biosafety knowledge graph, and deriving the attribution path based on the risk level and risk probability of the pig farm as constraints;

[0009] For low-risk pig farms or pig farms that have been warned of no disease, the corresponding attribution paths are used to conduct re-attribution, and for medium- and high-risk pig farms, the corresponding attribution paths are used to attribute disease risks.

[0010] In this solution, different conceptual entities are mined from the knowledge base of swine biosafety applications and swine biosafety fields based on the large language model, specifically:

[0011] Retrieve a large amount of text data related to pig industry biosafety, divide the retrieved text data into training data and pre-process the data, and train the initial large language model through the training data;

[0012] An instance-level relationship extraction task and a concept-level relationship extraction task are set in the initial large language model, and a large language model in the field of pig industry biosafety that masters pig industry professional terminology, concept system and logical relationships is obtained through iterative training;

[0013] The large language model in the field of swine industry biosafety is used to identify key entities and problem item events related to pig farm biosafety from swine industry biosafety applications and a knowledge base in the field of swine industry biosafety, and label information is set for the key entities and problem item events.

[0014] In this scheme, different conceptual entities are mined based on the ontology layer, concept layer and instance layer to construct a hierarchical pig farm biosafety knowledge graph, specifically:

[0015] The ontology layer is used to extract the semantic relations of different types of key entities and problem items from the knowledge base of swine biosafety applications and swine biosafety, and the path reasoning rules are extracted according to the semantic relations described in the text.

[0016] The concept layer is used to integrate the knowledge and define the concepts of key entities and problem items, and the key entities and problem items are divided according to the preset hierarchical rules to construct the pig industry knowledge tree;

[0017] Using the instance layer to save different types of pig farm event instances, making relationship connections with the pig industry knowledge tree, and performing attribution result analysis according to the path reasoning rules;

[0018] The swine industry knowledge tree and the path reasoning rules are combined to generate node information in a unified description form, and the node information is encoded and parsed using a large language model in the field of swine industry biosafety to output a probability value of the node relevance;

[0019] The probability value is compared with a preset threshold standard, and whether there is a connection relationship between the nodes is determined based on the comparison result, and the pig farm biosafety knowledge graph is constructed using the node information and the connection relationship between the nodes.

[0020] In this solution, the update of the pig farm biosafety knowledge graph is expressed as:

[0021] After feature extraction, the newly added question items are similarly calculated with different category clusters in the concept layer. When the similarity between the two is greater than the preset threshold, it means that the newly added question items are connected with the concept entities in the original concept layer. When it is less than the preset threshold, it means that the newly added question items are not connected with the concept entities in the original concept layer. At the same time, the concept entities of the new concept layer are added to update the concept layer.

[0022] The updated concepts are described according to the path reasoning rules to describe the newly added risk factors, disease types, management techniques and their interrelationships in the pig farm, and the knowledge map of pig farm biosafety is updated;

[0023] When entities at each layer need to be deleted, the entities to be deleted and the relationships between the entities are queried for deletion. When entities at each layer need to be modified, the entities at each layer are deleted first, and then entities at each layer are added.

[0024] In this plan, the early warning group determines the risk level and risk probability of the pig farm, specifically:

[0025] The LGBMClassifier was used to build the early warning group model, and the poisoning situation of the pig farm during the observation period, the surrounding epidemic situation, the pig farm detection data, and the video platform / PDCA inspection problem items were input as features to train the early warning group model;

[0026] The risk probability and risk level of the pig farm in the future period are predicted by the trained early warning group model, and the feature contribution of the problem item is obtained. The feature contribution is used as the morbidity contribution of each problem item, which is expressed as:

[0027] Contribution to disease incidence = B_index*(1 / remove_weight),

[0028] Where B_index = the number of occurrences of each problem item / the sum of the number of occurrences of all problem items, remove_weight = the number of unqualified times for each problem item / the number of occurrences of each problem item.

[0029] In this plan, management experience review is provided for pig farms that have not been affected by the disease and have been warned of medium and low risks, as well as pig farms that have not been affected within the preset period after the warning. Specifically:

[0030] According to the disease situation of the pig farm, the pig farm detection PDCA form, the video monitoring platform, and the detection data form, all the pig farm events in the preset observation period are obtained, and the nodes and node relationships of the pig farm biosafety knowledge map are obtained;

[0031] Starting from the problem node, a breadth-first search is used according to the predefined meta-path to obtain the explanation path of the attribution result. The contribution of the conceptual entities at both ends of the path is used as the path score to screen the attribution path.

[0032] When the warning is for a low-risk pig farm that has not fallen ill or a pig farm that has not fallen ill within a preset period after the warning, find out N key problem items that failed the inspection as the cause of the pig farm's illness according to the disease contribution corresponding to the concept entity at the instance level, and find out K key problem items that have been rectified or do not need to be rectified as excellent management experience for the pig farm, where K>N.

[0033] When the early warning is for a medium- or high-risk pig farm, N key problem items that failed the inspection are found as actual risk items for risk attribution based on the disease contribution corresponding to the concept entity at the instance level, and K key problem items that have been rectified or do not need to be rectified are found as excellent management experience for the pig farm, where K < N.

[0034] The second aspect of the present invention provides a pig farm disease risk attribution system based on knowledge graph, characterized in that the system comprises: a knowledge base data input module, a knowledge graph construction module, an early warning input module, a pig industry disease early warning attribution module and an attribution output module;

[0035] The knowledge base data input module is used to input data sources of various risks in the pig farm, and organize and classify multi-source data through different levels;

[0036] The knowledge graph construction module constructs a pig farm biosafety knowledge graph with a hierarchical structure;

[0037] The early warning input module is used to input farm events, risk levels and risk probabilities to assist in subsequent attribution tasks;

[0038] The swine disease early warning attribution module is used to infer and analyze the excellent management experience of the pig farm at low risk and the key problems and reasons leading to medium and high risks through the input pig farm events, risk levels and risk probabilities;

[0039] The attribution output module is used to output excellent management experience of the pig farm or key issues and reasons leading to medium and high risks.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention combines advanced large model technology with small sample learning methods. By introducing data enhancement technology based on large models, it can intelligently generate diverse high-quality training samples, effectively alleviate the overfitting problem in small sample learning, and significantly improve the generalization ability and robustness of the model. This strategy not only enriches the data source of the pig farm biosafety knowledge graph, but also makes the construction of the graph more comprehensive and adaptable, and can better cope with complex and changing data environments;

[0042] For the specific field of pig farm biosafety, the deep domain alignment between the big language model and pig farm biosafety is achieved. Through refined domain knowledge injection and customized training, the model can deeply understand the professional terms, rules and logical relationships in the field of pig farm biosafety, thereby showing higher professionalism and accuracy when extracting key information and constructing maps. This domain-specific LLM application provides scientific and efficient decision-making support for pig farm biosafety management;

[0043] Aiming at the insufficient risk attribution analysis capability and attribution scope of pig farms, the present invention designs a pig farm attribution method based on the pig industry disease knowledge graph, which can help discover the potential correlation between the problems existing in the pig farm and the biological manual. And through the analysis and reasoning of the graph, a more logical analysis can be provided for the pig farm risk attribution task. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the drawings required for use in the embodiments or exemplary descriptions will be briefly introduced below. 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 the drawings without paying creative work.

[0045] Figure 1 A flowchart of a pig farm disease risk attribution method based on a knowledge graph is shown;

[0046] Figure 2 A block diagram for training a large language model in the field of swine biosecurity is shown;

[0047] Figure 3 A flow chart for performing text attribution is shown;

[0048] Figure 4 A block diagram of a pig farm disease risk attribution system based on a knowledge graph is shown. DETAILED DESCRIPTION

[0049] In order to more clearly understand the above-mentioned purpose, 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 the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0050] 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 protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0051] Figure 1 A flow chart and schematic diagram of the pig farm disease risk attribution method based on knowledge graph are shown.

[0052] like Figure 1 As shown, this embodiment provides a pig farm disease risk attribution method based on a knowledge graph, including:

[0053] S102, obtaining swine biosafety applications, a knowledge base in the field of swine biosafety, the risk level and risk probability of the swine farm, and all swine farm events within N days, and preprocessing the obtained data;

[0054] S104, based on the large language model, different conceptual entities are mined from the pig industry biosafety application and pig industry biosafety field knowledge base to build a hierarchical pig farm biosafety knowledge graph;

[0055] S106, taking all pig farm events in a preset observation period as input, obtaining nodes and node relationships in the pig farm biosafety knowledge graph, and deriving an attribution path based on the risk level and risk probability of the pig farm as constraints;

[0056] S108, use the corresponding attribution path to conduct re-attribution for low-risk pig farms or pig farms that have been warned but have not yet developed the disease, and use the corresponding attribution path to conduct disease risk attribution for medium- and high-risk pig farms.

[0057] It should be noted that the data on swine biosafety applications and knowledge bases in the field of swine biosafety, the risk L and risk probability P of the pig farm, and all the pig farm events that occurred within N days of the input pig farm are obtained. The serial number punctuation of the data source, data that has no effect on the incidence rate (such as event promotions), and data related to blue ear disease prevention and control are removed.

[0058] It should be noted that in the process of constructing the knowledge graph of pig industry biosafety, in order to accurately construct the association between the instance layer and the concept layer, and significantly improve the prediction accuracy of the correlation between the two, a large language model (such as the GPT series) is used to comprehensively train the professional knowledge base and extensive corpus in the field of pig farm biosafety, so that it can accurately grasp the professional terms, complex semantic environment and internal logical relationships in the field of pig industry safety. In the classification and connection tasks, the large language model performs fine deep encoding and intelligent analysis on each pair of input concepts and instances, and outputs a highly reliable probability value of the correlation degree. By intelligently comparing this probability value with the preset threshold standard, the system can automatically and accurately determine whether an effective connection is established between the corresponding nodes in the graph, greatly improving the automation level and accuracy of graph construction. In addition, the automatic data annotation function based on the large language model further accelerates the expansion and improvement process of the graph, ensuring the timeliness and comprehensiveness of the graph content.

[0059] like Figure 2 As shown, a large amount of text data related to pig industry biosafety is retrieved, the retrieved text data is divided into training data and data preprocessed, and the initial large language model is trained through the training data; instance layer relationship extraction tasks and concept layer relationship extraction tasks are set in the initial large language model, and a large language model in the field of pig industry biosafety that masters pig industry professional terms, concept systems and logical relationships is obtained through iterative training; the large language model in the field of pig industry biosafety is used to identify key entities and problem item events related to pig farm biosafety from pig industry biosafety applications and pig industry biosafety knowledge bases, and label information is set for the key entities and problem item events. After pre-training, the large language model in the field of pig industry biosafety has mastered rich language knowledge and context understanding capabilities in related fields, and can identify and mark key information related to pig industry biosafety, such as disease symptoms, transmission routes and methods, prevention and control measures, etc. Using the semantic understanding ability of the large language model, these entities and problem item events are labeled or classified accordingly, such as "swine fever cases", "vaccination records", "environmental disinfection measures", etc. Finally, the accuracy and reliability of the annotation results are ensured through review and correction.

[0060] It should be noted that different conceptual entities in the three layers are mined from data sources such as swine biosafety applications and swine biosafety domain knowledge bases to construct three layers of hierarchical swine disease knowledge graphs, including the ontology layer, the concept layer, and the instance layer. They intuitively display the relationship between each instance and the concept layer through the swine disease knowledge tree, and the ontology layer displays the semantic relationship between concepts and specifies the rules for path reasoning. The ontology layer is used to extract the semantic relationships of different types of key entities and problem item events from swine biosafety applications and swine biosafety domain knowledge bases (for example: the relationship between definition objects and work behaviors and special operation concepts is the relationship between behavior objects; the relationship between positions and work behaviors and special operation concepts is the relationship between activity ranges, etc.), and path reasoning rules are extracted based on the semantic relationships described in the text; for example, rule 1: pig farm problem event → pig farm detection event; purpose: when the pig farm detection result is positive, according to this reasoning rule, it is possible to find out which problem events caused the positive detection event. Reasoning logic: For each pig farm's positive detection event in the past month, the corresponding pig farm problem event is found according to the location and object. Rule 2: Early warning of pig farm A → Early warning of pig farm B; Purpose: When some pig farms are in early warning status, it may generate potential early warning risks for other related pig farms; Prerequisite: Pig farm A and pig farm B are close in longitude and latitude or pig farm A and pig farm B are in the same fourth-level company; Reasoning logic 1: Pig farm A is in an outbreak state, resulting in early warning of pig farm B; Reasoning logic 2: There is an epidemic around pig farm A, resulting in early warning of pig farm B.

[0061] The concept layer is used to integrate knowledge and define concepts of key entities and problem items, and key entities and problem items are divided according to preset hierarchical rules. Knowledge is integrated based on data sources such as pig industry biosafety applications and pig industry biosafety field knowledge bases to construct a pig industry knowledge tree; the pig industry knowledge tree is divided into several layers, namely L0-L4. The L0 layer is a major knowledge classification category, including object class, daily work behavior class, biosafety special operation class, equipment class, location class, defense line checkpoint area class, and organization class. L1-L4 are subclasses further divided under the division of L0. For example, L1 is a subclass of L0, and the object class includes personnel, items and vehicles; L2 is a subclass of L1, and items include means of production, sundries, and daily necessities; L2 is a subclass of L1, and means of production include sampling materials, disinfection materials, etc.; L4 is a subclass of L3, and sampling materials include gauze, protective clothing, masks, etc.

[0062] The instance layer is used to save different types of pig farm event instances, such as basic information of the pig farm, pig farm problem events, pig farm detection events, epidemic conditions around the pig farm, and weather conditions of the pig farm, which are connected to the pig industry knowledge tree, and the attribution results are analyzed according to the path reasoning rules.

[0063] It should be noted that the knowledge graph construction model is trained using the big language model in the field of pig industry biosafety to achieve comprehensive integration and efficient use of knowledge in this field. The organized knowledge base in the field of pig industry biosafety and data such as pig industry biosafety applications are used to allow the big language model to deeply understand and analyze these data. The pig industry knowledge tree and path reasoning rules are combined to generate node information in a unified description form. The big language model in the field of pig industry biosafety is used to encode and parse the node information, and the probability value of the node relevance is output; the probability value is compared with the preset threshold standard, and the connection relationship between the nodes is judged according to the comparison results, and the entity, relationship and concept information therein are extracted. Then, the framework of the knowledge graph is constructed based on this information, and specific entity, relationship and concept nodes are filled in.

[0064] During the construction process, the semantic understanding and reasoning capabilities of the large language model played a key role. It can identify implicit relationships and contextual information in the data, thus helping us build a more accurate and complete knowledge graph. In addition, the large language model can also support the dynamic update and expansion of the knowledge graph, ensuring that the knowledge graph can be continuously improved with the addition of new data.

[0065] It should be noted that in the dynamic update of the knowledge graph, parameterized meta-path rules, that is, meta-path rules in the ontology layer (rules cover the common risk factor association patterns, such as pig farm problem events -> pig farm detection events), such as "pig farm problem events -> {problem type} -> {related factors} -> disease risk", describe the newly discovered pig farm risk factors, pig farm disease types, management technologies and their interrelationships. After the new problem items are extracted through features, the similarity is calculated with the different category clusters in the concept layer. When the similarity between the two is greater than the preset threshold, it means that the new problem items are connected to the concept entities in the original concept layer. When it is less than the preset threshold, it means that the new problem items are not connected to the concept entities in the original concept layer. At the same time, the concept entities of the new concept layer are added to update the concept layer; the updated concepts are described according to the path reasoning rules. The new risk factors, pig farm disease types, management technologies and their interrelationships of the pig farm are updated to update the pig farm biosafety knowledge graph; when new pig farm disease cases, new management technologies or market trends are discovered, the knowledge graph can respond quickly and incorporate these new knowledge. New node types (such as new pig farm diseases) and relationship types (such as the relationship between new pig farm management strategies and disease prevention and control) are directly injected into the knowledge graph. When entities need to be deleted at each layer, the entities to be deleted and the relationships connecting the entities are queried for deletion. When entities need to be modified at each layer, the entities at each layer are deleted first, and then the entities at each layer are added.

[0066] It should be noted that the early warning group determines the risk level and risk probability of the pig farm, specifically:

[0067] The LGBMClassifier is used to construct the early warning group model, and the poisoning situation of the pig farm during the specified observation period, the surrounding epidemic situation, the pig farm detection data, and the video platform / PDCA inspection problem items are input as features to train the early warning group model. Preferably, for the dirty data problems existing in the pdca and video platform, for example, some of the problems that are inspected have very few unqualified times, and these problems cannot distinguish the performance differences of each pig farm. Therefore, the problem items with an addition time of more than half a year and a number of unqualified times of less than or equal to 5 times are screened out. The training samples are constructed based on whether a pig farm has poisoning within the time [T-30, T-1], whether there is an epidemic in the surrounding area, the classification of sampled positive samples, and the unqualified problem items inspected on the pdca\video platform. The data set is divided into a training set and a test set and data preprocessing is performed; the LGBM Classifier uses a binary cross entropy loss function for training.

[0068] The risk probability and risk level of the pig farm in the future period are predicted by the trained early warning group model, and the feature contribution of the problem item is obtained. The feature contribution is used as the morbidity contribution of each problem item, which is expressed as:

[0069] Contribution to disease incidence = B_index*(1 / remove_weight),

[0070] Where B_index = the number of occurrences of each problem item / the sum of the number of occurrences of all problem items, remove_weight = the number of unqualified times for each problem item / the number of occurrences of each problem item.

[0071] Figure 3 A flow chart for performing text attribution is shown.

[0072] It should be noted that the nodes and node relationships of the knowledge graph of pig farm biosafety are obtained according to the risk level and risk probability of the pig farm and all the pig farm events within N days; multi-class meta-paths are designed in the constructed knowledge graph to explain the attribution results of the disease risk of the pig farm. Through the constructed knowledge graph, starting from the problem items that failed the inspection in the first 30 days of each pig farm, according to the defined meta-path, the key problem items given by the attribution results are searched, and the explanation path of the attribution results is obtained from the problem item node according to the predefined meta-path using breadth-first search. The attribution path is screened by using the size of the disease contribution of the conceptual entities at both ends of the path as the path score; after the path score is obtained, we can use the path starting point instance to explain the path end instance (attribution result).

[0073] Breadth-first search accurately traces back to the key problem items that have a decisive impact on the risk of disease. This process not only reveals the causal chain between problems, but also clearly shows how specific problem items act as triggers, triggering a series of chain reactions, and ultimately leading to an increase in the risk of disease, providing pig farm risk managers with an intuitive and powerful attribution explanation. The breadth-first search strategy efficiently selects the candidate paths that are most likely to become the attribution results from many potential explanatory paths. In order to further improve the accuracy and effectiveness of path screening, a path scoring mechanism based on disease contribution is introduced. This mechanism comprehensively considers the relative importance of the instances at both ends of the path in the risk of disease, and through quantitative evaluation, gives each path an objective and comparable score. Therefore, the paths with the highest scores and the strongest explanatory power can be selected from many candidate paths and presented to pig farm managers as the final attribution results.

[0074] After determining the optimal attribution path, the starting point instance of the path is used to provide an in-depth and specific explanation for the end point instance of the path (i.e., the attribution result). This process not only enhances the credibility of the attribution result, but also enables managers to clearly understand the ins and outs of the problem and the interaction between various problem items. Through such explanations, managers can more accurately locate the root cause of the problem and develop more effective and targeted prevention and control measures, thereby effectively reducing the risk of disease in the pig farm and improving the overall management level.

[0075] When the early warning is for a low-risk farm that has not been sick and a farm that has not been sick within the preset period after the early warning, N key problem items that failed the inspection are found as the cause of the disease in the farm according to the disease contribution corresponding to the problem item node, and K key problem items that have been rectified or do not need to be rectified are found as excellent management experience for the farm, where K> N. When the early warning is for a medium- and high-risk farm, N key problem items that failed the inspection are found as the actual risk items for risk attribution according to the disease contribution corresponding to the problem item node, and K key problem items that have been rectified or do not need to be rectified are found as excellent management experience for the farm, where K<N.

[0076] In a preferred embodiment of the present invention, the pig farm events within the previous N days are given on day T, and the re-attribution of the pig farm is given when the risk level L is warned as a low risk level or the pig farm has not been sick within 21 days before day T; the disease attribution of the pig farm is given when the risk level L is warned as a medium-high risk level. The problem items that have been rectified, the problem items that have not been rectified, and the test results of the sampling of a pig farm in the previous 30 days are given, and the risk level L of the pig farm is predicted to be low risk or there is no disease report in the pig farm within 21 days, then the excellent pig farm management method (re-attribution) of the pig farm is given; if the risk level L of the pig farm is predicted to be medium-high risk, the risk items that actually need to be rectified in the pig farm (risk attribution) are given. The goal of risk attribution and re-attribution of pig farms is achieved.

[0077] Reconstruct the risk probability of the pig farm with key problem items. From the problem items inspected in the previous 30 days of each pig farm, find the top N unrectified problem items with the highest contribution to the disease as negative problems, and the top K qualified and top K rectified problems as positive problems. Use these N+2K key problem items to reconstruct the risk probability of the pig farm. It is required that the risk probability of the disease caused by positive problems is negative, and the risk probability of the disease caused by negative problems is positive.

[0078] Positive problem risk reconstruction method:

[0079] ,

[0080] Negative problem item risk reconstruction method:

[0081] ,

[0082] Given the pig farm events in the previous N days on day T, the risk probability P and the risk level L (low, medium, and high risk) of the pig farm are obtained. When the pig farm is under risk level L warning and risk probability P, the reconstruction of the risk probability P by each attribution result is given to verify the rationality of the disease attribution of the pig farm.

[0083] Figure 4 A block diagram of a pig farm disease risk attribution system based on a knowledge graph is shown.

[0084] This embodiment provides a pig farm disease risk attribution system 4 based on knowledge graph, characterized in that the system includes: a knowledge base data input module 41, a knowledge graph construction module 42, an early warning input module 43, a pig industry disease early warning attribution module 44 and an attribution output module 45;

[0085] The knowledge base data input module is used to input data sources of various risks in the pig farm, and organize and classify multi-source data through different levels;

[0086] In a preferred embodiment of the present invention, the knowledge base data input module is used to obtain basic sow data: output pig husbandry data of a large farm, including 2,000 pigs, 700 sows, 1,500 reserve sows, etc.; disease history: input disease records of the pig farm, such as blue ear disease, classical swine fever, etc.; breeding management experience: input pig farm breeding data, such as immunization procedures, disinfection mechanisms, etc.

[0087] The knowledge graph construction module constructs a pig farm biosafety knowledge graph with a hierarchical structure; the pig farm biosafety knowledge graph can sort out the knowledge data of pig farm risks and locate the key issues for each pig farm. The hierarchical structure of this module can organize and classify pig farm events and entities of the biological knowledge manual as well as specific professional terms of pig farms at different levels, which facilitates the retrieval of attribution task information. Moreover, the knowledge graph can help identify and analyze the relationships and connections between different levels. Through reasoning and analysis of the knowledge graph, the reasons for the risks in the pig farm can be determined more accurately and logically, thereby achieving the attribution effect of business standards;

[0088] In a preferred embodiment of the present invention, the knowledge graph construction module constructs a pig farm biosafety knowledge graph based on the existing PDCA checklist, video monitoring platform, and biosafety manual knowledge base. All pig farm events within N days are input, and the risk level L and risk probability P of the pig farm are obtained according to Task 1; the factors causing the disease in the pig farm are found through the pig farm biosafety knowledge graph, and the disease text attribution of the pig farm is given according to a series of constraints such as the contribution ranking of the pig farm problems. For pig farms at medium and high risks, rectification and prediction can be carried out according to the risk items after attribution, and the excellent management experience of pig farms at low risk or pig farms that have not fallen ill after early warning can be summarized.

[0089] The early warning input module is used to input farm events, risk levels and risk probabilities to assist in subsequent attribution tasks;

[0090] In a preferred embodiment of the present invention, the occurrence of sow abortion in the pig farm is detected through the early warning input module, and the risk level is automatically calculated as medium risk, and the risk probability is 50%.

[0091] The swine disease early warning attribution module is used to infer and analyze the excellent management experience of low-risk pig farms and the key problems and reasons leading to medium and high risks through the input of pig farm events, risk levels and risk probabilities; the model of this module is trained through a rich knowledge base to give the module stronger reasoning and analysis capabilities;

[0092] In a preferred embodiment of the present invention, the swine disease early warning attribution module is used to receive early warning information: sow abortion events, medium risk level and 50% risk probability information, and the hierarchical structure and association relationship of the knowledge graph are used to analyze the factors that may be related to blue ear disease in sow abortion. Further inspection of the pig farm's breeding management practices revealed that the pig farm had not been immunized with blue ear disease vaccine, and the disinfection system was not strictly implemented, which increased the risk of disease transmission.

[0093] The attribution output module is used to output excellent management experience of the pig farm or key issues and reasons leading to medium and high risks.

[0094] In a preferred embodiment of the present invention, the attribution result output is: Excellent management experience: None. Risk point: sow abortion, medium risk. Suggested improvement methods: Check whether there is blue ear disease, strengthen immunization work, strictly implement disinfection system, and strengthen pig farm feeding management.

[0095] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0096] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0097] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0098] Those skilled in the art can understand that all or part of the steps of implementing the above method embodiments 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 method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0099] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0100] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A pig farm disease risk attribution method based on knowledge graph, characterized in that: The following steps are involved: Obtain the pig industry biosafety application, pig industry biosafety field knowledge base, risk level and risk probability of the pig farm, and all pig farm events within N days, and pre-process the acquired data; Based on the large language model, different conceptual entities are mined from the knowledge base of pig biosafety applications and pig biosafety fields to build a hierarchical pig farm biosafety knowledge graph. Taking all the pig farm events in the preset observation period as input, obtaining the nodes and node relationships in the pig farm biosafety knowledge graph, and deriving the attribution path based on the risk level and risk probability of the pig farm as constraints; For low-risk pig farms or pig farms that have not been warned of disease, the corresponding attribution path is used to conduct re-attribution, and for medium- and high-risk pig farms, the corresponding attribution path is used to attribute disease risks; Based on the large language model, different conceptual entities are mined from the knowledge base of swine biosafety applications and swine biosafety fields, specifically: Retrieve a large amount of text data related to pig industry biosafety, divide the retrieved text data into training data and pre-process the data, and train the initial large language model through the training data; An instance-level relationship extraction task and a concept-level relationship extraction task are set in the initial large language model, and a large language model in the field of pig industry biosafety that masters pig industry professional terminology, concept system and logical relationships is obtained through iterative training; Using the large language model in the field of swine biosafety, key entities and problematic events related to pig farm biosafety are identified from swine biosafety applications and a knowledge base in the field of swine biosafety, and label information is set for the key entities and problematic events; Based on the ontology layer, concept layer and instance layer, different conceptual entities are mined respectively to construct a hierarchical pig farm biosafety knowledge graph, which is as follows: The ontology layer is used to extract the semantic relations of different types of key entities and problem items from the knowledge base of swine biosafety applications and swine biosafety, and the path reasoning rules are extracted according to the semantic relations described in the text. The concept layer is used to integrate the knowledge and define the concepts of key entities and problem items, and the key entities and problem items are divided according to the preset hierarchical rules to construct the pig industry knowledge tree; Using the instance layer to save different types of pig farm event instances, making relationship connections with the pig industry knowledge tree, and performing attribution result analysis according to the path reasoning rules; The swine industry knowledge tree and the path reasoning rules are combined to generate node information in a unified description form, and the node information is encoded and parsed using a large language model in the field of swine industry biosafety to output a probability value of the node relevance; The probability value is compared with a preset threshold standard, and whether there is a connection relationship between the nodes is determined based on the comparison result, and the pig farm biosafety knowledge graph is constructed using the node information and the connection relationship between the nodes.

2. A pig farm disease risk attribution method based on knowledge graph according to claim 1, characterized in that: The update of the pig farm biosafety knowledge graph is expressed as: After feature extraction, the newly added question items are similarly calculated with different category clusters in the concept layer. When the similarity between the two is greater than the preset threshold, it means that the newly added question items are connected with the concept entities in the original concept layer. When it is less than the preset threshold, it means that the newly added question items are not connected with the concept entities in the original concept layer. At the same time, the concept entities of the new concept layer are added to update the concept layer. The updated concepts are described according to the path reasoning rules to describe the newly added risk factors, disease types, management techniques and their interrelationships in the pig farm, and the knowledge map of pig farm biosafety is updated; When entities at each layer need to be deleted, the entities to be deleted and the relationships between the entities are queried for deletion. When entities at each layer need to be modified, the entities at each layer are deleted first, and then entities at each layer are added.

3. A pig farm disease risk attribution method based on knowledge graph according to claim 1, characterized in that: The early warning group determines the risk level and risk probability of the pig farm, specifically: The LGBMClassifier was used to build the early warning group model, and the poisoning situation of the pig farm during the observation period, the surrounding epidemic situation, the pig farm detection data, and the video platform / PDCA inspection problem items were input as features to train the early warning group model; The risk probability and risk level of the pig farm in the future period are predicted by the trained early warning group model, and the feature contribution of the problem item is obtained. The feature contribution is used as the morbidity contribution of each problem item, which is expressed as: Contribution to disease incidence = B_index*(1 / remove_weight) Where B_index = the number of occurrences of each problem item / the sum of the number of occurrences of all problem items, remove_weight = the number of unqualified times for each problem item / the number of occurrences of each problem item.

4. A pig farm disease risk attribution method based on knowledge graph according to claim 1, characterized in that: For pig farms that have not been affected and have been warned of low risk, as well as pig farms that have not been affected within the preset period after the warning, management experience review is provided, specifically: According to the disease situation of the pig farm, the pig farm detection PDCA form, the video monitoring platform, and the detection data form, all the pig farm events in the preset observation period are obtained, and the nodes and node relationships of the pig farm biosafety knowledge map are obtained; Starting from the problem node, a breadth-first search is used according to the predefined meta-path to obtain the explanation path of the attribution result. The contribution of the conceptual entities at both ends of the path is used as the path score to screen the attribution path. When the warning is for a low-risk pig farm that has not fallen ill or a pig farm that has not fallen ill within a preset period after the warning, find out N key problem items that failed the inspection as the cause of the pig farm's illness according to the disease contribution corresponding to the concept entity at the instance level, and find out K key problem items that have been rectified or do not need to be rectified as excellent management experience for the pig farm, where K>N.

5. A method for attributing disease risk in pig farms based on knowledge graph according to claim 4, characterized in that: For pig farms with medium or high risk warnings, N key problem items that failed the inspection were found as actual risk items for risk attribution based on the disease contribution corresponding to the concept entity at the instance level, and disease risk attribution was performed. K key problem items that have been rectified or do not need to be rectified were found as excellent management experience for the pig farm, where K < N.

6. A pig farm disease risk attribution system based on knowledge graph, characterized in that: Implementing the pig farm disease risk attribution method based on knowledge graph as described in any one of claims 1 to 5, the system comprises: a knowledge base data input module, a knowledge graph construction module, an early warning input module, a pig industry disease early warning attribution module and an attribution output module; The knowledge base data input module is used to input data sources of various risks in the pig farm, and organize and classify multi-source data through different levels; The knowledge graph construction module constructs a pig farm biosafety knowledge graph with a hierarchical structure; The early warning input module is used to input farm events, risk levels and risk probabilities to assist in subsequent attribution tasks; The swine disease early warning attribution module is used to infer and analyze the excellent management experience of the pig farm at low risk and the key problems and reasons leading to medium and high risks through the input pig farm events, risk levels and risk probabilities; The attribution output module is used to output excellent management experience of the pig farm or key issues and reasons leading to medium and high risks.

Citation Information

Patent Citations

  • Food safety event risk research and judgment method and device based on knowledge graph reasoning

    CN111832922A