This article describes the reasoning queries related concepts, analyzes the deficiencies in Jena general rule, as well as the need for custom rules. Then put forward a set custom rules constructor. Finally, designs the corresponding SPARQL query specification to ach...