A poultry disease diagnosis system based on knowledge graph

Through the poultry disease diagnosis system based on the knowledge graph, crawling and structured processing technology are used to construct the poultry disease knowledge graph, combined with the decision tree and scoring system, which solves the problem that the existing system cannot satisfy users to quickly obtain accurate information, and achieves efficient Poultry disease diagnosis and treatment options are provided.

CN114610902BActive Publication Date: 2024-09-06南京市畜牧兽医站(南京市动物疫病预防控制中心)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210305715.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2024-09-06
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

The existing poultry disease diagnosis system cannot meet the needs of users to quickly obtain accurate and intuitive professional information. Especially when there are many types of poultry diseases and complex symptoms, the traditional expert system has poor robustness and cannot meet the rapid diagnosis of poultry farming users. need.

Method used

A poultry disease diagnosis system based on knowledge graph is designed. The poultry disease knowledge graph is constructed through the knowledge graph module. It combines the user submission module and disease diagnosis module, and uses crawling, structured processing, entity recognition and relationship extraction technologies to realize data Visualization and automatic diagnosis, using diagnostic algorithms of decision trees and scoring systems, provide accurate disease reports and treatment plans.

Benefits of technology

It greatly improves the efficiency and accuracy of poultry disease diagnosis, simplifies the information acquisition and screening process, presents information in the form of an intuitive knowledge graph, improves users' understanding of poultry diseases and access to treatment plans, and enhances the system's semantic understanding and Matching ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610902B
    Figure CN114610902B
Patent Text Reader

Abstract

The present invention proposes a poultry disease diagnosis system based on a knowledge graph, which includes a knowledge graph module, a user submission module, and a disease diagnosis module; wherein the signal input and output end of the knowledge graph module is connected to the first signal output and input end of the disease diagnosis module, and the second signal output and input end of the disease diagnosis module is connected to the signal input and output end of the user submission module; the knowledge graph module is used to construct a poultry disease knowledge graph. Aiming at the particularity of poultry disease texts, the present invention improves the knowledge extraction process, extracts the diversified features of entities and relationships in the text, and completes, corrects and updates the knowledge graph to achieve the effect of improving the accuracy rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a poultry disease diagnosis system based on knowledge graph, and belongs to the technical field of information knowledge graph. Background Art

[0002] In recent years, more and more poultry farms have been operated in my country's towns and rural areas, including the suburbs of second- and third-tier cities. In poultry farming, poultry health-related issues are encountered: the search for relevant information on various poultry diseases and the willingness to obtain health knowledge have expanded compared to the past. Therefore, for users, how to conveniently and accurately obtain poultry disease classification, pathological changes, clinical symptoms, treatment measures, preventive measures, and how to quickly screen and obtain accurate information is particularly important.

[0003] In the existing field of poultry disease diagnosis, there are methods based on image collection of poultry information to associate poultry disease data and compare them to achieve disease diagnosis; there are methods that use expert system precise reasoning or fuzzy reasoning to quantify the relationship between symptoms and diseases and achieve computer-aided diagnosis; the development of machine learning and artificial intelligence has promoted the field of poultry disease diagnosis from traditional model reasoning to model reasoning and system development with stronger learning ability, higher knowledge updating efficiency and more accurate conclusions; and methods for poultry disease diagnosis such as sample learning, subjective self-learning Bayesian, support vector machine, and CBR-RBR integrated method have been proposed.

[0004] Based on the current situation, how to meet the needs of poultry farming users to quickly obtain accurate professional information, present it in an intuitive and visual way, and automatically provide feedback on users' questions is rapidly expanding; currently, the more mainstream information query service methods are search engines and automatic question and answer. The former has problems with data accuracy and data classification in the acquisition of information, as well as manual screening and identification of information, which is a cumbersome process. The latter can directly return the required answers to users' questions instead of a collection of related web pages. By identifying and loading feature words, entities and attributes, it returns the information content of the questions required by users, which can better and faster meet users' needs for accurate information acquisition. Especially with the development of knowledge graphs, the automatic question and answer system has been significantly improved in data accuracy, data relevance, and data structuring after being embedded in knowledge graphs, enhancing the system's ability to understand and match problem semantics and knowledge semantics.

[0005] General knowledge graph-based question-answering systems all answer questions based on content questions formed by the system combined with the knowledge graph. However, this type of data cannot meet the needs of obtaining information in professional fields, the accuracy of the data cannot be guaranteed, and it cannot meet the user's requirements for obtaining poultry disease diagnosis information. The specific problems are that first, there are many types of poultry diseases, and the relationship between diseases and symptoms is complex and difficult to mine. Secondly, traditional expert systems are targeted diagnoses with poor robustness. Therefore, in order to meet the needs of poultry farming users to quickly obtain accurate and intuitive information in farming, the design and implementation of a poultry disease diagnosis system based on a knowledge graph is a topic that needs to be urgently addressed. Summary of the invention

[0006] The present invention proposes a poultry disease diagnosis system based on knowledge graph, which aims to effectively improve the efficiency and accuracy of poultry disease diagnosis, facilitate the query of treatment plans, and improve the efficiency of poultry disease treatment.

[0007] The technical solution of the present invention is: a poultry disease diagnosis system based on a knowledge graph, the system comprising a knowledge graph module, a user submission module, and a disease diagnosis module; wherein the signal input and output end of the knowledge graph module is connected to the first signal output and input end of the disease diagnosis module, and the second signal output and input end of the disease diagnosis module is connected to the signal input and output end of the user submission module; the knowledge graph module is used to construct a poultry disease knowledge graph.

[0008] Furthermore, the poultry disease diagnosis system based on knowledge graph also includes a poultry disease knowledge graph, a poultry disease database, and a user diagnosis database; the signal input end of the knowledge graph module is connected to the signal output end of the poultry disease knowledge graph; the signal input end and output end of the disease diagnosis module are respectively connected to the signal output end and input end of the poultry disease database; the signal output end of the user submission module is connected to the signal input end of the user diagnosis database.

[0009] Furthermore, the knowledge graph module includes crawling relevant poultry disease data, structured processing of poultry disease data, entity recognition and relationship extraction of poultry disease data, integration of poultry disease structured data, and construction of a poultry disease knowledge graph, ultimately achieving data visualization and data interaction with the disease diagnosis module. Specifically, after the disease diagnosis module sends a diagnosis request, the knowledge graph module can use the poultry disease knowledge graph for query.

[0010] Furthermore, the user submission module includes the user's input of poultry disease symptom information and the extraction of background data, which together complete the acquisition and analysis of the user-submitted data; in addition, the complete disease diagnosis data submitted by the user will be saved in the user diagnosis database and displayed on the public help page to facilitate community communication and provide data support for the accuracy of subsequent follow-up visits; the complete disease diagnosis data submitted by the user is transmitted to the disease diagnosis module through the output end of the user submission module and the input end of the disease diagnosis module. This process is the preliminary work of disease diagnosis.

[0011] Furthermore, the implementation of the disease diagnosis module includes two parts. First, the information extracted by the user submission module is preprocessed, that is, the poultry disease symptom information submitted by the user is filtered and pattern matched to form preprocessed standard symptom keywords, and then combined with poultry disease knowledge graph search and reasoning, a more accurate disease report and corresponding treatment plan are returned through a diagnosis algorithm based on a decision tree and a scoring system. This data is transmitted to the user submission module through the output end of the disease diagnosis module and the input end of the user submission module. After receiving the data, the user submission module will display it to the user on the WeChat applet page, thereby forming a relatively complete and systematic poultry disease diagnosis system.

[0012] Furthermore, the working process of the knowledge graph module includes the following:

[0013] (101) Search relevant veterinary websites and crawl relevant disease symptom data corpus;

[0014] (102) Preprocessing the relevant disease symptom corpus data in the disease symptom data corpus and converting them into standard unstructured data; the unstructured data refers to a paragraph without punctuation marks and spaces, and based on this, summarizing it into a small diagnosis book;

[0015] (103) Perform named entity recognition and relation extraction on small diagnosis books. Use the BiLSTM-CRF model to perform named entity recognition on poultry diseases, identify the corresponding disease and symptom entities based on sequence annotations, and use word-based dependency relationships for relation extraction.

[0016] (104) Integrate and refine the identified entities and extracted relationships, separate the attribute words, and summarize them into a JSON file;

[0017] (105) Design a reasonable knowledge graph construction program and use the integrated and refined JSON files to build a poultry disease knowledge graph. Specifically, use the Python programming language and embed cypher statements to create entities and relationships of poultry disease data in the graph database software neo4j.

[0018] Furthermore, the step (104) integrates and refines the identified entities and extracted relationships, separates the attribute words, and summarizes them into a JSON file; the specific process includes the following:

[0019] Given a set of poultry disease feature words C = {C1, C2, ..., C n}, the extracted symptom entity set is S = {S1, S2, ..., S n}, calculate the word frequency CF of all characteristic words of current poultry disease symptoms through fuzzy matching, as follows:

[0020]

[0021] Where S(s j =c k ) is a sample containing poultry disease feature words in the symptom entity set, CF k Poultry disease characteristic word C k The word frequency, k = 1, 2, ..., n, since not all poultry disease characteristic words are included in the symptom entity set, the number of attribute word sets formed according to the symptom entity set is less than the number of poultry disease characteristic words.

[0022] Furthermore, the formation of the attribute word set includes: performing similarity matching on all symptom entities and dividing them into several sets, aggregating the attribute word sets into clusters according to the attribute vocabulary and common semantics summarized by poultry disease experts, counting high-frequency words, and giving a reasonable value k according to the statistical results, wherein the k value is determined according to the median of the total word frequency, and then extracting poultry disease feature words with a vocabulary frequency higher than k, removing some irrelevant words (in this system, nouns are irrelevant words, and verbs are related words, such as extracting "bleeding" from "heart bleeding"), to form an attribute word set for associating messy symptoms, wherein the attribute word set is sorted from high to low according to the word frequency of the attribute words.

[0023] Furthermore, the working process of the user submission module includes the following:

[0024] (201) The user fills in a disease diagnosis form on the WeChat mini program, where the content includes the main symptoms; the content filled in when filling in the disease diagnosis form also includes one or more of the following data: breeding farm, breeding species, date of onset, age of onset, number of onset, number of breeding, number of deaths, description of main symptoms, and help desired; the content filled in when filling in the disease diagnosis form also includes uploading pictures (such as photos of chickens when they are sick); the description of the main symptoms is a required item;

[0025] (202) The backend of the mini program obtains the disease diagnosis form data filled out by the user and saves it into the MYSQL database, and publicly asks for help to show the help they hope to get;

[0026] (203) The mini program sends the data in the disease diagnosis form to the server through a request, and the web page backend obtains the user's symptom description data through a request and transmits it to the diagnosis algorithm.

[0027] Furthermore, the working process of the disease diagnosis module includes the following:

[0028] (301) Reconstructing the symptom description input by the user into a standard symptom description unit;

[0029] (302) According to the symptom attributes in the poultry disease knowledge graph, the attribute words in the symptom description input by the user are extracted, and a user description attribute word set is constructed. According to the frequency of the attribute words in the knowledge graph module, the standard symptom description units are sorted, and according to the actual situation of the data, the scoring algorithm and the decision tree algorithm are combined to make a diagnosis;

[0030] (303) Determine and diagnose the disease and search the poultry disease database for relevant disease treatment options and prevention measures.

[0031] Furthermore, the specific implementation process of step (301) includes the following:

[0032] The symptom description entered by the user is X. The Chinese word segmentation tool Jieba is used to perform full-mode word segmentation processing and match it with the common symptom descriptions in the poultry disease symptom corpus to form a set {X1, X2, ..., X k},For example <X m (noun)>+ <X n <attribute)>, reorganized into clearer standard symptom description units; the X m (noun) refers to organs or parts such as the heart, liver, small intestine, etc.; n (Attribute) Refers to words that express symptoms such as bleeding and congestion.

[0033] Furthermore, the specific process of step (302) includes the following:

[0034] The input standard symptom description unit is segmented in search engine mode using the Chinese word segmentation tool jieba. The entity set after segmentation is matched according to the symptom attributes in the poultry disease knowledge graph, and the attribute words in the symptom description, such as <bleeding> and <swelling>, are extracted to determine the attributes included in this round of diagnosis decision tree.

[0035] Rearrange the entity set according to the significance of the attribute, such as <heart bleeding>, <lung enlargement>, and sort them according to "bleeding" > "enlargement"; if the attribute word cannot be found in the entity, put it at the end and arrange it in sequence; according to the attribute set in the symptom description, query and match in the poultry disease knowledge graph in sequence, first query the symptom set contained in the attribute set of this round of symptom description, and determine the alternative symptoms and diseases of this round; if there is more than one alternative disease in the preliminary scan, perform a decision tree algorithm in the determined data set, if the last disease is empty, then this algorithm is not suitable, and the scoring algorithm is used instead; if the alternative disease in the preliminary scan is empty or unique, then the scoring algorithm is used in the entire data set.

[0036] The decision tree algorithm is specifically as follows: input a symptom entity set, set the symptom entity set as S, set the disease set as D, and set the initial value of D to be all disease sets; loop the symptom entity set S, with the subscript i, and call the cypher statement each time to query the disease entity D associated with the current symptom entity i , update the disease set D, where D: =D∩D i (Therefore, the scope of target diseases will be narrowed each time the cycle is repeated, that is, the target diseases after the cycle will become more and more accurate), until the cycle is completed, and the final disease set D is obtained. The process is as follows Figure 7 .

[0037] The scoring algorithm is specifically as follows: input a symptom entity set, loop the symptom entity set, call the cypher statement each time to query the disease associated with the current symptom, and build a disease queue; then call the cypher statement to query the score corresponding to the current symptom and the disease in the disease queue, and add it to the queue <disease, score>, until the symptom array loop ends; after the symptom array loop ends, start looping the queue <disease, score>, and determine whether the current disease appears in the score array each time. If not, add the current disease to the score array and assign an initial score value; if yes, accumulate the score and update the corresponding disease score value until the queue <disease, score> loop ends; after the queue <disease, score> loop ends, sort the score array, and calculate and output the disease with the highest score. The process is as follows Figure 6 .

[0038] Beneficial effects of the present invention:

[0039] The present invention discloses a poultry disease diagnosis system based on knowledge graph, which provides users with functional modules such as knowledge graph module, disease diagnosis module, user submission module, etc.; by crawling information, the information of poultry diseases is obtained in the corresponding information consultation platform, and the unstructured and semi-structured data are visualized in the knowledge graph with the help of neo4j; the questions of system users are preprocessed, and in the diagnosis process, the information of the knowledge graph is embedded, and the information is presented to the user in the form of the most intuitive and visualized graph, so that the system user can obtain the cause of the disease, the classification of the disease, the treatment method, and the preventive measures through screening through the basic symptoms of poultry; the corresponding disease is searched The linear knowledge base of poultry disease diagnosis methods, disease causes and preventive measures can be obtained; the whole process is presented in the form of a visual knowledge graph. Through the data structuring of the knowledge graph, users can understand the information more intuitively, and obtain the corresponding data content through automatic search, which greatly simplifies the user's work of information acquisition, information screening, and information classification. The graph embedding method of the knowledge graph is combined with the sentence matching method to integrate a complete poultry disease automatic diagnosis system; the present invention improves the knowledge extraction process according to the particularity of poultry disease texts, extracts the diversified features of entities and relationships in the text, and completes, corrects and updates the knowledge graph to achieve the effect of improving the accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Attached Figure 1 It is a system structure block diagram of the present invention.

[0041] Attached Figure 2 It is the poultry disease knowledge graph and backend data interaction graph of the present invention.

[0042] Attached Figure 3 A flow chart is constructed for the poultry disease knowledge graph of the present invention.

[0043] Attached Figure 4 This is a flow chart of the "Disease Diagnosis" user function of the present invention.

[0044] Attached Figure 5 It is a disease diagnosis flow chart of the present invention.

[0045] Attached Figure 6 The figure is a flow chart of the scoring algorithm of the present invention.

[0046] Attached Figure 7 It is a flow chart of the decision tree algorithm of the present invention. DETAILED DESCRIPTION

[0047] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.

[0048] This embodiment uses the WeChat applet platform as a diagnostic medium and neo4j as a graph database for knowledge graphs as an example for explanation; Figure 1 As shown, the poultry disease diagnosis system based on the knowledge graph includes a knowledge graph module, a user submission module, and a disease diagnosis module. First, the preprocessed data is used to construct the knowledge graph. When the user diagnoses a poultry disease, the symptom information is submitted through the disease diagnosis module of the mini program to complete the system's entry of poultry symptom data. The data is first standardized through natural language processing, and then the previously constructed poultry disease symptom knowledge graph is used, and further calculations are performed using the scoring algorithm and decision tree algorithm. The calculated results are packaged and output to the mini program interface.

[0049] 1. Knowledge graph module, including data crawling, data induction, knowledge extraction, knowledge graph construction, and importing neo4j database.

[0050] 1.1 Data crawling: Data crawling mainly uses network modules such as HTTP and TCP protocols. Crawler is designed to crawl text description data of poultry diseases from poultry disease websites; text data related to poultry diseases is crawled from poultry disease websites through crawler technology.

[0051] 1.2 Data Summarization: The text data of poultry diseases is converted into standard unstructured data, which refers to paragraphs without punctuation and spaces, and summarized into small diagnosis books, as shown in the following table:

[0052] Disease name: Newcastle disease

[0053]

[0054] In this embodiment, data on 28 common diseases, including Newcastle disease, highly pathogenic avian influenza, avian influenza, etc., are crawled from the Veterinary Assistant Information Platform and the China Veterinary Network to obtain clinical symptoms: including age of onset, skin symptoms, respiratory symptoms, etc.; obtain pathological changes: including changes in the digestive tract, respiratory tract, heart, etc.; control measures; corresponding information on preventive measures.

[0055] 1.3 Knowledge extraction: Entity naming recognition In the knowledge graph based on the poultry disease automatic diagnosis system, the crawled data is structured and the entities and attributes of the knowledge graph are constructed. In the early data crawling process, it is necessary to use the summarized small diagnosis books to extract the knowledge of disease symptoms, specifically named entity recognition and relationship extraction.

[0056] This example uses the BiLSTM-CRF model to perform named entity recognition of poultry diseases. The model is divided into three layers: the BiLSTM layer encodes the output data of the embedding layer, inputs the output vector into the CRF layer for sequence labeling, and outputs the entity label with the highest probability.

[0057] (1) Embedding layer

[0058] First, the sequence annotation output is sent to the embedding layer. Through a random pre-trained word vector file, each word is compressed into a 100-dimensional low-dimensional vector space, representing the semantic information of each word in 100 dimensions. Before passing it to the BiLSTM layer, the dropout value is set to solve the overfitting problem.

[0059] (2) BiLSTM layer

[0060] The output of the Embedding layer is input to the BiLSTM layer. First, the vector character representation sequence generated by the Embedding layer is input to the BiLSTM layer, and the forward and reverse LSTM outputs are concatenated accordingly to form a regular output matrix. Before inputting the CRF layer, the dropout value needs to be set to prevent overfitting. Each sequence in the BiLSTM layer is a multi-label probability value.

[0061] (3) CRF layer

[0062] The role of the CRF layer is to perform sequence labeling on the multi-label probabilities input by the BiLSTM layer. First, the CRF layer can learn the characteristics of each sequence output by the BiLSTM layer, including the logical relationship between words. Through the CRF layer, the logic of each sequence label becomes stronger. CRF will increase label restrictions and reduce illegal sequence labels.

[0063] Firstly, the CBOW model is used to conduct unsupervised training on the corpus and compare word vectors of different dimensions. Finally, the model performance is best when the dimension is 100. The word vector features of 100 dimensions of poultry disease text are obtained through pre-training, which are applied to named entity recognition in the field of poultry diseases. Secondly, the vector x of the word embedding layer will be used as the input of the Bi-LSTM layer at time t. The forward LSTM output feature sequence and the reverse output sequence are used to obtain the concatenated vector of the hidden layer, and the final output is obtained by weighting the tanh activation function. Finally, the output of the Bi-LSTM is used as the input of the CRF layer, and the state transition matrix is ​​used to predict the current label. The conditional probability of the final sequence is obtained by using the Softmax function. The Viterbi algorithm is used to take the sequence with the highest score as the final labeling result of the model.

[0064] The identified entities and extracted relationships are integrated and refined, attribute words are separated, and summarized. The specific process is as follows: given a set of poultry disease feature words C = {C1, C2, ..., C n}, the extracted symptom entity set is S = {S1, S2, ..., S n}, calculate the frequency CF of all characteristic words of the current poultry disease symptoms through fuzzy matching, as follows:

[0065]

[0066] Where S(s j =c k ) is a sample containing poultry disease feature words in the symptom entity set, CF k Poultry disease characteristic word C k The word frequency of , k = 1, 2, ..., n.

[0067] The formation of the attribute word set includes: performing similarity matching on all symptom entities and dividing them into several categories, aggregating the attribute word set into clusters according to the attribute vocabulary and common semantics summarized by poultry disease experts, and counting high-frequency words. According to the system, there are about 40 attribute words for poultry disease symptoms, among which the median of the attribute word frequency is about 5, so the k value is 5, and then the poultry disease feature words with a frequency higher than 5 are extracted and integrated into an attribute word set, wherein the attribute word set is sorted from high to low according to the attribute word frequency.

[0068] The entities of the knowledge graph in this system correspond to various diseases, symptoms and symptom attributes of chickens. For example, Newcastle disease information is an entity (disease), heart bleeding symptom information is an entity (symptoms), and bleeding is a symptom attribute entity (properties). The corresponding attribute values ​​are: prevention measures (precaution), clinical manifestations (pathology) and treatment measures (precaution_way). Each attribute defines its attribute value.

[0069] This system uses word-based dependency parsing for relationship extraction; the extracted relationships include disease symptoms (has_symptom), clinical manifestations (has_pathology), etc. On this basis, it is also necessary to add the attribution relationship from the symptom attribute entity to the symptom entity.

[0070] 1.4 Build a knowledge graph: After completing the acquisition of poultry disease data and classifying it, define the JSON file. This system takes laying hens as an example:

[0071] {"animaltype":2,"illaddition":"…","kind":"…","illage":"…","illproperties","illsymptoms":"…","illsymptoms_score":"…","illpathology":"…","illpathology_score":"…","precaution_way":"…","cure_way":"…"}

[0072] Import 28 common diseases into the json file one by one to complete the classification of the data. After the acquired data is classified, build a knowledge graph, read the defined json file, and read the defined file according to the classified data to define each node of the entity; that is, define the disease name, clinical symptoms, pathological changes, disease prevention and treatment information.

[0073] After completing the creation of the entity, define the relationship between the entity and the node, the symptom relationship, pathological change relationship, prevention relationship and treatment relationship corresponding to the entity; loop through the matching data, read the node information of the disease from the defined json file, read the node data into it, and loop through each file in turn; after completing the node definition, complete the creation of the edge of each node; in actual situations, the same disease has the same or similar symptoms or preventive measures, and different entities in the knowledge graph may have the same node, so it is only counted as one. Therefore, after defining the nodes and edges of the entity, it is necessary to eliminate one of the associated edges and traverse the edges. If there are identical edges, deduplication is required.

[0074] 1.5 Import neo4j database: After completing the creation of entities and attributes of the knowledge graph, present them in a visual form in the graph database neo4j. After completing the download and installation of the neo4j database, enter neo4j.bat console in the command window to run it, carrying the server IP address; the definition and creation of nodes have been completed in the construction of the knowledge graph, call the python interface, enter the server address "http: / / localhost:7474" to complete the import and construction of the graph database knowledge graph.

[0075] 2. User submission module, including mini-program module and back-end interaction module, is mainly used to provide interactive pages for users and obtain user submitted data;

[0076] 2.1 Mini Program Module: This system uses WeChat Mini Program as a display platform, and mainly provides a disease diagnosis form for users to fill in; the content to be filled in includes the breeding farm, breeding species, date of onset, age of onset, number of onset, number of breeding, number of deaths, main symptoms, desired help and picture upload, among which the main symptoms are required;

[0077] 2.2 Back-end interaction module: The mini program back-end obtains the disease diagnosis form data filled out by the user and saves it into the user diagnosis database, and displays the help they hope to get in the public help request. The mini program sends the form data to the server through a request, and the web page back-end obtains the user's symptom description data through a request and transmits it to the diagnosis algorithm; the back-end is built with Python's Django framework.

[0078] 3. The disease diagnosis module includes two stages: diagnosis calculation and diagnosis question and answer. First, the user's symptom description data is used as input, and the data is preprocessed and then calculated using the diagnosis algorithm to obtain the answer and call the diagnosis reply to return the result of the mini program.

[0079] 3.1 Diagnostic calculation: Diagnostic calculation mainly uses the diagnostic algorithm that combines decision trees and scoring systems to complete disease reasoning. The flowchart is as follows Figure 5 As shown, it mainly includes the following processes:

[0080] (1) Data preprocessing: First, the received user symptom description data is preprocessed, which mainly includes the following steps: The first step is to use the Chinese word segmentation tool jieba to perform full-mode word segmentation on the user's sentence, match the word segmentation set with the attributes in the poultry disease knowledge graph, and construct an attribute entity set to facilitate the determination of the search attributes of this round of diagnosis decision tree; the second step is to reorganize the user symptom description data after word segmentation according to the corresponding parts of speech to form a symptom description field, and perform pattern matching on the field with the symptom entity in the poultry disease diagnosis knowledge base. The entities after successful matching constitute the symptom entity set. The matching adopts the AC multi-mode matching algorithm, which adopts the string matching mode and is used in combination with the disease symptom entity dictionary. It is essentially a dictionary-based matching idea. The disease entities contained in the user's natural language questions are matched and extracted by referring to the dictionary. When the match fails, the semantic similarity calculation method is used to obtain entities with higher similarity to avoid the phenomenon of no answer in the system and enhance the system's responsiveness;

[0081] (2) Calling the diagnosis algorithm: First, search for the symptom attribute in the knowledge graph according to the attribute entity set, determine the scope of the attribute search in this round of decision tree, and use R to represent the search scope, which contains the relevant attribute entity, the symptoms associated with it, and the disease S associated with the symptom. Reorder the symptom entity set according to the significance of the attribute in the determined R range, such as <heart bleeding> and <lung enlargement>, sorted by "bleeding" > "enlargement"; if the attribute word cannot be found in the entity, put it at the end and arrange it in sequence; if there is more than one candidate disease in the preliminary scan, the decision tree algorithm is performed in the determined data set. If the disease is empty at the end, this algorithm is not suitable and the scoring algorithm is performed instead; if the candidate disease in the preliminary scan is empty or unique, the scoring algorithm is performed in the entire data set. The decision tree algorithm is specifically described as follows: set the sorted symptom entity set to S, the inferred disease set to D, call the neo4j query statement match to match the symptoms, and each cycle combines the disease set of the previous search with the disease set of the current search to narrow the range of diseases included in the symptoms until the cycle ends or the disease is empty. The scoring algorithm is specifically described as follows: set S of all symptom description entities, call the neo4j query statement match to match the symptoms, query the disease score c corresponding to the matched symptoms, form a set containing <disease, symptom, score>, then count the total scores of all diseases and calculate the disease with the highest score.

[0082] 3.2: Diagnostic Q&A: The disease given by the diagnostic algorithm is searched in the poultry disease database for detailed information on the relevant disease and treatment measures, and then returned to the user on the mini program side.

[0083] The embodiments are only for illustrating the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. A poultry disease diagnosis system based on knowledge graph, characterized by It includes a knowledge graph module, a user submission module, and a disease diagnosis module; wherein the signal input and output end of the knowledge graph module is connected to the first signal output and input end of the disease diagnosis module, and the second signal output and input end of the disease diagnosis module is connected to the signal input and output end of the user submission module; the knowledge graph module is used to construct a poultry disease knowledge graph; the working process of the disease diagnosis module includes the following: (301) Reconstructing the symptom description input by the user into a standard symptom description unit. The specific implementation process includes the following: The symptom description entered by the user is X. The Chinese word segmentation tool Jieba is used to perform full-mode word segmentation processing and match it with the common symptom descriptions in the poultry disease symptom corpus to form a set {X1, X2, ..., X k }; (302) According to the symptom attributes in the poultry disease knowledge graph, the attribute words in the symptom description input by the user are extracted, and a user description attribute word set is constructed. According to the frequency of the attribute words in the knowledge graph module, the standard symptom description units are sorted. According to the actual situation of the data, the scoring algorithm and the decision tree algorithm are combined for diagnosis. The specific process includes the following: The input standard symptom description unit is segmented by the Chinese word segmentation tool Jieba in search engine mode, and the entity set after segmentation is matched according to the symptom attributes in the poultry disease knowledge graph, and the attribute words in the symptom description are extracted to determine the attributes included in this round of diagnosis decision tree; Rearrange the entity set according to the significance of the attribute; if the attribute word cannot be found in the entity, put it at the end and arrange it in order; according to the attribute set in the symptom description, query and match in the poultry disease knowledge graph in turn, first query the symptom set contained in the attribute set of the symptom description of this round, and determine the candidate symptoms and diseases of this round; if there is more than one candidate disease in the preliminary scan, perform a decision tree algorithm in the determined data set, if the last disease is empty, then this algorithm is not suitable, and the scoring algorithm is used instead; if the candidate disease in the preliminary scan is empty or unique, perform a scoring algorithm in the entire data set; (303) Determine and diagnose diseases and search for relevant disease treatment options and prevention measures in the poultry disease database; The decision tree algorithm is specifically as follows: input a symptom entity set, set the symptom entity set as S, set the disease set as D, and set the initial value of D to be all disease sets; loop the symptom entity set S, with the subscript i, and call the cypher statement each time to query the disease entity D associated with the current symptom entity i , update the disease set D, where D: =D∩D i , until the cycle ends and the final disease set D is obtained; The scoring algorithm is specifically as follows: input a symptom entity set, loop the symptom entity set, call a cypher statement each time to query the disease associated with the current symptom, and build a disease queue; then call a cypher statement to query the score corresponding to the current symptom and the disease in the disease queue, and add it to the queue <disease, score>, until the symptom array loop ends; after the symptom array loop ends, start looping the queue <disease, score>, each time loop determines whether the current disease appears in the score array, if not, add the current disease to the score array, and assign an initial score value; if yes, accumulate the score, update the corresponding disease score value, until the queue <disease, score> loop ends; after the queue <disease, score> loop ends, sort the score array, and calculate and output the disease with the highest score.

2. A poultry disease diagnosis system based on knowledge graph according to claim 1, characterized in that It also includes a poultry disease knowledge graph, a poultry disease database, and a user diagnosis database; the signal input end of the knowledge graph module is connected to the signal output end of the poultry disease knowledge graph; the signal input end and output end of the disease diagnosis module are respectively connected to the signal output end and input end of the poultry disease database; the signal output end of the user submission module is connected to the signal input end of the user diagnosis database.

3. A poultry disease diagnosis system based on knowledge graph according to claim 1, characterized in that The knowledge graph module includes crawling relevant poultry disease data, structured processing of poultry disease data, entity recognition and relationship extraction of poultry disease data, integration of poultry disease structured data, and construction of poultry disease knowledge graph, and finally realizes data visualization and interacts with the disease diagnosis module. Specifically, after the disease diagnosis module sends a diagnosis request, the knowledge graph module uses the poultry disease knowledge graph to query; The user submission module includes the user's input of poultry disease symptom information and the extraction of background data, which together complete the acquisition and analysis of the user-submitted data; In addition, the complete disease diagnosis data submitted by the user will be saved in the user diagnosis database and displayed on the public help page to facilitate community communication and provide data support for the accuracy of subsequent follow-up visits; the complete disease diagnosis data submitted by the user is transmitted to the disease diagnosis module through the output end of the user submission module and the input end of the disease diagnosis module. This process is the preliminary work of disease diagnosis; The implementation of the disease diagnosis module includes two parts. The first is to preprocess the information extracted by the user submission module, that is, to filter and pattern match the poultry disease symptom information submitted by the user to form preprocessed standard symptom keywords, and then combine the poultry disease knowledge graph search and reasoning, and return a more accurate disease report and corresponding treatment plan through the diagnosis algorithm based on the decision tree and scoring system. This data is transmitted to the user submission module through the output end of the disease diagnosis module and the input end of the user submission module. After receiving the data, the user submission module will display it to the user on the WeChat applet page, thereby forming a complete and systematic poultry disease diagnosis system.

4. A poultry disease diagnosis system based on knowledge graph according to claim 1, characterized in that The working process of the knowledge graph module includes the following: (101) Search relevant veterinary websites and crawl relevant disease symptom data corpus; (102) Preprocessing the relevant disease symptom corpus data in the disease symptom data corpus and converting them into standard unstructured data; the unstructured data refers to a paragraph without punctuation marks and spaces, and based on this, summarizing it into a small diagnosis book; (103) Perform named entity recognition and relation extraction on small diagnosis books. Use the BiLSTM-CRF model to perform named entity recognition on poultry diseases, identify the corresponding disease and symptom entities based on sequence annotations, and use word-based dependency relationships for relation extraction. (104) Integrate and refine the identified entities and extracted relationships, separate the attribute words, and summarize them into a JSON file; (105) Design a reasonable knowledge graph construction program and use the integrated and refined JSON files to build a poultry disease knowledge graph. Specifically, use the Python programming language and embed cypher statements to create entities and relationships of poultry disease data in the graph database software neo4j.

5. A poultry disease diagnosis system based on knowledge graph according to claim 4, characterized in that The (104) integrates and refines the identified entities and extracted relationships, separates the attribute words, and summarizes them into a JSON file; the specific process includes the following: Given a set of poultry disease feature words C = {C1, C2, ..., C n }, the extracted symptom entity set is S = {S1, S2, ..., S n }, calculate the word frequency CF of all characteristic words of current poultry disease symptoms through fuzzy matching, as follows: Where S(s j =c k ) is a sample containing poultry disease feature words in the symptom entity set, CF k Poultry disease characteristic word C k The word frequency, k = 1, 2, ..., n, since not all poultry disease characteristic words are included in the symptom entity set, the number of attribute word sets formed according to the symptom entity set is less than the number of poultry disease characteristic words.

6. A poultry disease diagnosis system based on knowledge graph according to claim 5, characterized in that The formation of the attribute word set includes: performing similarity matching on all symptom entities and dividing them into several category sets, aggregating the attribute word sets into clusters according to the attribute vocabulary and common semantics summarized by poultry disease experts, counting high-frequency words, and giving a reasonable value k according to the statistical results, wherein the k value is determined according to the median of the total word frequency, and then extracting poultry disease characteristic words with a vocabulary frequency higher than k, removing some irrelevant words, and forming an attribute word set for associating messy symptoms, wherein the attribute word set is sorted from high to low according to the word frequency of the attribute words.

7. The poultry disease diagnosis system based on knowledge graph according to claim 1 is characterized in that The working process of the user submission module includes the following: (201) The user fills in a disease diagnosis form on the WeChat mini program, where the content includes the main symptoms; the content filled in when filling in the disease diagnosis form also includes one or more of the following data: breeding farm, breeding species, date of onset, age of onset, number of onset, number of breeding, number of deaths, description of main symptoms, and help desired; the content filled in when filling in the disease diagnosis form also includes uploading pictures; the description of main symptoms is a required item; (202) The backend of the mini program obtains the disease diagnosis form data filled out by the user and saves it into the MYSQL database, and publicly asks for help to show the help they hope to get; (203) The mini program sends the data in the disease diagnosis form to the server through a request, and the web page backend obtains the user's symptom description data through a request and transmits it to the diagnosis algorithm.