The invention provides an intelligent question and answer method and
system based on a
knowledge graph, and relates to the technical field of knowledge graphs, the method comprises the following steps: S1, integrating multi-source heterogeneous data to construct an initial
knowledge graph; s2, analyzing the questions of the user, executing single-hop query and judging whether a result meets requirements or not; if not, entering S3, performing multi-hop
dynamic search based on an adaptive path extension
algorithm, and generating a reasoning path and evidence; s4, calling a large
language model to combine with an attention mechanism to perform
semantic matching on a result or a path, and screening an optimal answer; and S5, correcting the
knowledge graph and performing closed-loop feedback to the query process to realize
continuous optimization. Through cooperation of the knowledge graph and the large
language model and combination of dynamic
path search and
semantic matching, the problems that a traditional method is insufficient in knowledge coverage, low in reasoning efficiency and poor in answer
interpretability are solved, the method has the advantages of being efficient, accurate and self-optimized, and the performance and user experience in a complex scene are remarkably improved.