The invention relates to the technical field of
knowledge graph reasoning, in particular to a knowledge reasoning method and
system.The method comprises the steps that a user
query statement containing a
reasoning rule identifier is received, and the
reasoning rule identifier is recognized according to a preset rule; if yes, rule definition information containing reasoning condition information and a top-layer rule type is called from a rule
database based on the
reasoning rule identifier; if the
inference condition information contains a nested
inference rule identifier, converting the
inference condition information into a basic triple mode set layer by layer through
recursive analysis, then performing structured
processing on the set according to a top-layer rule type to obtain an intermediate query element, generating a
query statement in combination with an original
query statement of a user, and performing execution to obtain an inference result. The problems that due to the fact that a fixed framework of a traditional
inference engine is difficult to adapt to dynamics, the engine needs to be redeployed after a rule is updated, inference logic needs to be modified when a
data structure changes, and the application flexibility and expansion capacity of the
inference engine are limited are solved. The method has the effect of improving the flexibility and expansibility of knowledge reasoning.