摘要
食品安全与人民的生活息息相关,随着生活水平的提高,人们的食品安全意识也逐渐提升,提供可靠且有效的信息问答成为了社会的迫切需求。该文针对由食品添加剂使用不当引起的食品安全问题,提出一种基于知识图谱的食品安全知识问答方法,并构建了一个食品安全知识问答系统。首先,利用互联网中的开源数据构造了一个面向食品安全的知识图谱;然后,为了更好地对食品安全文本表征,该文通过收集食品安全语料库对词向量模型进行预训练;随后,设计了一种语义相似度匹配算法,通过计算问题文本的关键词向量与实体向量之间的重叠字得分和相似度得分,提取食品安全实体,实现对模糊问题语义的理解;最后,通过随机构建的食品安全知识问答库进行实验,以准确率、Hits@3和Hits@5为评价指标进行消融实验,证明了所提方法的有效性。基于知识图谱的食品安全问答方法可以有效地回答人们在食品安全和食品添加剂上的问题,在提高时间效率的同时节约了人力资源。
Food safety is closely bound up with people’s lives.With the improvement of living standards,people’s awareness of food safety has been gradually improved.It is an urgent need in society to provide trustworthy and effective question answering for information.To solve food safety problems caused by the improper use of food additives,we propose a method for food safety question answering based on knowledge graph and construct a question answering system for food safety knowledge.First of all,the open source data provided by the Internet is gained to construct the knowledge graph for food safety.Secondly,a food safety corpus is collected to pre-train the word vector model so that food safety text can be characterized preferably.Subsequently,in order to extract the food safety entities from the question texts,we design a semantic similarity matching algorithm by calculating the overlapping scores and similarity scores between the key word vectors of question and the entity vectors.Finally,the experiments are carried out by constructing the food safety knowledge question-and-answer database randomly.Accuracy,Hits@3 and Hits@5 are used as evaluation indicators to carry out ablation experiments,and the results of ablation experiments prove the effectiveness of the proposed method.The knowledge graph-based food safety question and answer method effectively addresses inquiries regarding food safety and additives,enhancing time efficiency and optimizing human resources utilization.
作者
王迪
李海生
李勇
李萌战
WANG Di;LI Hai-sheng;LI Yong;LI Meng-zhan(School of Computer Science and Engineering,Beijing Technology and Business University,Beijing 100048,China;Beijing Key Laboratory of Big Data Technology for Food Safety,Beijing 100048,China;National Engineering Laboratory for Agri-product Quality Traceability,Beijing 100048,China;School of Integrated Circuits and Electronics,Beijing Institute of Technology,Beijing 100081,China)
出处
《计算机技术与发展》
2024年第6期118-124,共7页
Computer Technology and Development
基金
北京市教委-市自然基金委联合资助项目(KZ202110011017)
国家自然科学基金面上项目(62277001)。
关键词
问答
知识图谱
食品安全
语义相似度
食品添加剂
question answering
knowledge graph
food safety
semantic similarity
food additives