The present application relates to the technical field of
knowledge graph reasoning, and particularly relates to a knowledge reasoning method and
system, comprising: receiving a user query
sentence containing a
reasoning rule identifier, identifying the
reasoning rule identifier according to a preset rule, if the
reasoning rule identifier exists, based on the reasoning rule identifier, calling rule definition information containing reasoning condition information and a top rule type from a rule
database; if the reasoning condition information contains a nested reasoning rule identifier, converting it into a basic triple pattern set layer by layer through
recursive analysis, and then structurally
processing the set according to the top rule type to obtain intermediate query elements, combining the original query
sentence of the user to generate a query
sentence, and executing to obtain a reasoning result. The fixed architecture of the traditional reasoning engine is difficult to adapt to dynamics, resulting in the need to redeploy the engine after updating the rules, and the need to modify the reasoning logic when the
data structure changes, thereby limiting the application flexibility and expansion capability of the reasoning engine. The present application has the effect of improving the flexibility and expansion of knowledge reasoning.