Disclosed are a
data query method and
system, and a related device, relating to the field of
artificial intelligence. The method comprises the following steps: a
data query system acquires input data; obtains, on the basis of the input data,
metrics to be queried as requested by a user; uses, on the basis of said
metrics, a multi-agent
collaborative processing strategy to confirm a
data query result, the multi-agent
collaborative processing strategy being used for indicating a manner of implementing
data retrieval on the basis of at least one of a
graph model and a vector
database; and presents the data query result, wherein the
graph model expresses, in a graph-based form, correspondences between the
metrics and between the metrics and
database table data, and the vector
database expresses, in a vector-based form, descriptive texts and computational formulas of the metrics. In this way, even if the expression of input data differs from the expression of fields in the database, or if metrics to be read are not present in the database, corresponding
SQL statements can still be obtained by means of the
graph model or the vector database, thereby reducing the error rate of
natural language query, and meeting the query requirements of users.