主权项 |
1. An ontology-based query method, wherein a plurality of key-value pairs constructed according to a triple of an ontology described with a resource description framework (RDF) are stored in a plurality of computing nodes respectively, each of the plurality of key-value pairs comprising a key and a key value, the key value comprising three elements of the triple, and the key comprising one of the three elements of the triple, the method comprising:
acquiring at least one to-be-queried triple input by a user, wherein a known element in the to-be-queried triple is a query condition, and at least one unknown element in the to-be-queried triple is a query object; searching, in the key-value pairs stored in each of the plurality of computing nodes, for at least one key-value pair matching the query condition; determining an element corresponding to the query object from three elements comprised in a key value of the matched key-value pair, to acquire elements corresponding to the query objects determined in each of the plurality of computing nodes; and acquiring a query result according to the elements corresponding to the query objects determined in each of the plurality of computing nodes. |