Information query method and device
First Claim
1. An information query method, comprising:
- converting a query text in a natural language inputted by a user into a structured statement in an abstract query language;
converting the structured statement in the abstract query language into a basic query statement or multiple iterated basic query statements;
executing a query operation against a database structure and according to the basic query statement or the multiple iterated basic statements, wherein the database structure comprises an entity database and a category database, the category database comprises a plurality of entity category data and category tags, the plurality of entity category data are divided into a plurality of levels, comprising the entity category data in a low level subordinate to the entity category data associated therewith in a higher level, wherein an entry for an entity in the entity database comprises a meta-information field storing a category tag of the plurality of entity category tags corresponding to the entity category data for describing a category of the entity, wherein the entry further comprises a variable attribute field storing entity attribute data;
wherein the basic query statement or the multiple iterated basic statements comprises;
an entity information query statement, which is used for querying entity information related to a designated entity;
an entity attribute query statement, which is used for querying a designated attribute of the designated entity; and
an entity reverse query statement, which is used for reversely querying a corresponding entity according to a designated attribute filtering condition and a designated category, wherein executing the entity reverse query statement comprises retrieving in the entity database the entry satisfying the following conditions;
the category tag is a category tag corresponding to the entity category data representing the designated category or a category tag corresponding to the entity category data subordinate to the designated category; and
the entity attribute data satisfies the designated attribute filtering condition; and
when the designated attribute related to the designated attribute filtering condition belongs to the entity attribute data defined by the designated category, executing the query operation according to the entity reverse query statement.
2 Assignments
0 Petitions
Accused Products
Abstract
An information query method and device. The method comprises: converting a query text in a natural language entered by a user, into a structured statement in an abstract query language; converting the statement in an abstract query language into a basic query statement or multiple iterated basic query statements (S200); and for a prepared database, performing query operations according to the basic query statement or the multiple iterated basic statements. Intentional analysis can be performed firstly on query texts in a natural language entered by a user to filter out a text requiring no query, a query text meeting the intention is converted into a statement in a abstract query language, then the statement in the abstract query language is converted into a basic query statement or multiple iterated basic query statements, most query intentions can be covered, complex logical and reasoning query can be achieved, and query results can be returned conveniently.
7 Citations
15 Claims
-
1. An information query method, comprising:
-
converting a query text in a natural language inputted by a user into a structured statement in an abstract query language; converting the structured statement in the abstract query language into a basic query statement or multiple iterated basic query statements; executing a query operation against a database structure and according to the basic query statement or the multiple iterated basic statements, wherein the database structure comprises an entity database and a category database, the category database comprises a plurality of entity category data and category tags, the plurality of entity category data are divided into a plurality of levels, comprising the entity category data in a low level subordinate to the entity category data associated therewith in a higher level, wherein an entry for an entity in the entity database comprises a meta-information field storing a category tag of the plurality of entity category tags corresponding to the entity category data for describing a category of the entity, wherein the entry further comprises a variable attribute field storing entity attribute data; wherein the basic query statement or the multiple iterated basic statements comprises; an entity information query statement, which is used for querying entity information related to a designated entity; an entity attribute query statement, which is used for querying a designated attribute of the designated entity; and an entity reverse query statement, which is used for reversely querying a corresponding entity according to a designated attribute filtering condition and a designated category, wherein executing the entity reverse query statement comprises retrieving in the entity database the entry satisfying the following conditions; the category tag is a category tag corresponding to the entity category data representing the designated category or a category tag corresponding to the entity category data subordinate to the designated category; and the entity attribute data satisfies the designated attribute filtering condition; and when the designated attribute related to the designated attribute filtering condition belongs to the entity attribute data defined by the designated category, executing the query operation according to the entity reverse query statement. - View Dependent Claims (2, 3, 4, 5)
-
-
6. An information query device, comprising at least one processor and at least one memory including computer program instructions, the at least one memory and the computer program instructions, with the at least one processor, causing the information query device at least to perform operations comprising:
-
converting a query text in a natural language inputted by a user into a structured statement in an abstract query language; converting the structured statement in the abstract query language into a basic query statement or multiple iterated basic query statements; executing a query operation against a database structure and according to the basic query statement or the multiple iterated basic statements, wherein the database structure comprises an entity database and a category database, the category database comprises a plurality of entity category data and category tags, the plurality of entity category data are divided into a plurality of levels, comprising the entity category data in a low level subordinate to the entity category data associated therewith in a higher level, wherein an entry for an entity in the entity database comprises a meta-information field storing a category tag of the plurality of entity category tags corresponding to the entity category data for describing a category of the entity, wherein the entry further comprises a variable attribute field storing entity attribute data; wherein the basic query statement or the multiple iterated basic statements comprises; an entity information query statement, which is used for querying entity information related to a designated entity; an entity attribute query statement, which is used for querying a designated attribute of the designated entity; and an entity reverse query statement, which is used for reversely querying a corresponding entity according to a designated attribute filtering condition and a designated category, wherein executing the entity reverse query statement comprises retrieving in the entity database the entry satisfying the following conditions; the category tag is a category tag corresponding to the entity category data representing the designated category or a category tag corresponding to the entity category data subordinate to the designated category; and the entity attribute data satisfies the designated attribute filtering condition; and when the designated attribute related to the designated attribute filtering condition belongs to the entity attribute data defined by the designated category, executing the query operation according to the entity reverse query statement. - View Dependent Claims (7, 8, 9)
-
-
10. An information query method, comprising:
-
performing an intentional analysis on a query text in a natural language inputted by a user, which is then converted into a structured query statement; converting the query statement into a basic query statement or multiple iterated basic query statements; executing a query operation against a database structure and according to the basic query statement or the multiple iterated basic statements, wherein the database structure comprises an entity database and a category database, the category database comprises a plurality of entity category data and category tags, the plurality of entity category data are divided into a plurality of levels, comprising the entity category data in a low level subordinate to the entity category data associated therewith in a higher level, wherein an entry for an entity in the entity database comprises a meta-information field storing a category tag of the plurality of entity category tags corresponding to the entity category data for describing a category of the entity, wherein the entry further comprises a variable attribute field storing entity attribute data, wherein the basic query statement or the multiple iterated basic statements comprises; an entity information query statement, which is used for querying entity information related to a designated entity; an entity attribute query statement, which is used for querying a designated attribute of the designated entity; and an entity reverse query statement, which is used for reversely querying a corresponding entity according to a designated attribute filtering condition and a designated category, wherein executing the entity reverse query statement comprises retrieving in the entity database the entry satisfying the following conditions; the category tag is a category tag corresponding to the entity category data representing the designated category or a category tag corresponding to the entity category data subordinate to the designated category; and the entity attribute data satisfies the designated attribute filtering condition; and when the designated attribute related to the designated attribute filtering condition belongs to the entity attribute data defined by the designated category, executing the query operation according to the entity reverse query statement. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A computer program product comprising at least one non-transitory computer-readable storage medium having computer-executable program code portions stored therein, the computer-executable program code portions comprising program code instructions configured to:
-
convert the structured statement in the abstract query language into a basic query statement or multiple iterated basic query statements; execute a query operation against a database structure and according to the basic query statement or the multiple iterated basic statements, wherein the database structure comprises an entity database and a category database, the category database comprises a plurality of entity category data and category tags, the plurality of entity category data are divided into a plurality of levels, comprising the entity category data in a low level subordinate to the entity category data associated therewith in a higher level, wherein an entry for an entity in the entity database comprises a meta-information field storing a category tag of the plurality of entity category tags corresponding to the entity category data for describing a category of the entity, wherein the entry further comprises a variable attribute field storing entity attribute data; wherein the basic query statement or the multiple iterated basic statements comprises; an entity information query statement, which is used for querying entity information related to a designated entity; an entity attribute query statement, which is used for querying a designated attribute of the designated entity; and an entity reverse query statement, which is used for reversely querying a corresponding entity according to a designated attribute filtering condition and a designated category, wherein executing the entity reverse query statement comprises retrieving in the entity database the entry satisfying the following conditions; the category tag is a category tag corresponding to the entity category data representing the designated category or a category tag corresponding to the entity category data subordinate to the designated category; and the entity attribute data satisfies the designated attribute filtering condition; and when the designated attribute related to the designated attribute filtering condition belongs to the entity attribute data defined by the designated category, executing the query operation according to the entity reverse query statement.
-
Specification