Domain Q&A technology is one of the popular research fields in artificial intelligence.Q&A in the field of food safety can help stakeholders find the answers they want in the massive and complex food safety big data.There are currently problems in the field of food safety,such as a lack of knowledge graph on foodborne diseases,low accuracy of Q&A,inability to apply unstructured text information,and poor interpretability.This article constructs a knowledge graph related to foodborne diseases and combines it with multi hop inference technology.Based on the triple network of food safety knowledge graph and unstructured natural language text for food safety,two multi hop inference methods are proposed.The main tasks are as follows:(1)A dual module iterative multi hop inference model is proposed based on a knowledge graph triplet network.Firstly,extract entities and relationships from unstructured and semi-structured knowledge based on food safety accident data,and establish a food safety knowledge graph network.Secondly,for a triplet network,a dual module iterative multi hop inference model is established: the relationship edges of a pair of entities in a module are filtered based on weight arrangement;Module 2updates the hidden representation of entities using a graph attention network model;Double module iteration for multi hop reasoning,and finally probability calculation for the entity to obtain the answer.The model can deeply mine food safety information and improve the accuracy of reasoning.(2)A novel food safety decision support system is proposed based on unstructured food safety texts.Firstly,the BERT model is used to extract the next inference entity and related description paragraphs from the decision problem;Secondly,a graph neural network is used to aggregate feature vectors of entity nodes,calculate the correlation between nodes and the problem,and guide the next hop extraction of the BERT model;Finally,predict the answer probability for all entities and select the candidate entity with the highest probability as the final answer.The proposed method can effectively handle multiple multi hop inference scenarios in food safety case texts,and can provide inference processes while maintaining high accuracy.(3)Based on the research and experiments of the two reasoning methods mentioned above,combined with the food safety police research and judgment platform for major events,a visual application of food safety knowledge graph and a question and answer reasoning display were carried out based on actual food safety scenarios.This technology can provide information retrieval,problem suggestions,and decision support for relevant stakeholders,assist in determining the nature of accidents,and take targeted prevention,control,and treatment measures,effectively reducing the occurrence of food safety accidents and reducing food safety risks. |