Efficient knowledge base system
AssigneeXerox Corporation
InventorSalah Ait-Mokhtar
Life of this patent
Estimating the term…
Abstract
A knowledge base system is provided which includes a relations table which includes slots for a predicate identifier and first and second arguments of a respective relation. Each predicate identifier encodes a key for a respective entry in a predicate table. The predicate identifier also encodes argument types for the two arguments in the respective row of the relations table. Some of the argument types are associated with respective linked tables. This allows one of the arguments in a row of the relations table to serve as a key to an entry in the respective linked table on the condition that the predicate identifier for that row encodes the associated argument type.
Claims27
A knowledge base system comprising:
- memory which stores a knowledge base and a knowledge base management system which includes instructions for at least one of adding relations to the knowledge base and querying the knowledge base, the knowledge base comprising:
- a relations table and a plurality of linked tables, a first of the linked tables comprising a predicate table, the relations table including slots which, for each of a plurality of rows of the relations table, respectively store a relation identifier, a predicate identifier, and first and second arguments of a respective relation;
- wherein each predicate identifier in the respective predicate identifier slot is composed of:
- a first part which encodes a key for a respective entry in the predicate table,
- a second part which encodes a first argument type for the first of the arguments stored in the respective row of the relations table, and
- a third part which encodes a second argument type for the second of the arguments stored in the respective row of the relations table;
- wherein the first and second argument types are selected from a predefined set of argument types, one of the argument types in the set being associated with a second of the linked tables, another of the argument types in the set being associated with a third of the linked tables or with the predicate table, one of the first and second arguments in a row of the relations table serving as a key to an entry in the second linked table when the respective part of the predicate identifier for that row encodes the associated argument type for the second linked table and serving as a key to an entry in the third linked table or the predicate table when the respective part of the predicate identifier for that row encodes the associated argument type for the third linked table or the predicate table;
- and
- a processor which executes the instructions.
A knowledge base system comprising:
- memory which stores a knowledge base and a knowledge base management system which includes instructions for at least one of adding relations to the knowledge base and querying the knowledge base, the knowledge base comprising:
- a relations table and a plurality of linked tables, a first of the linked tables comprising a predicate table, the relations table including slots which, for each of a plurality of rows of the relations table, store a relation identifier, a predicate identifier, and first and second arguments of a respective relation;
- each predicate identifier encoding:
- a key for a respective entry in the predicate table
- a first argument type for the first of the arguments in the respective row of the relations table, and
- a second argument type for the second of the arguments in the respective row of the relations table;
- the first and second argument types being selected from a predefined set of argument types, one of the argument types in the set being associated with a second of the linked tables, one of the first and second arguments in a row of the relations table serving as a key to an entry in the second linked table when the predicate identifier for that row encodes the associated argument type;
- wherein the knowledge base management system includes instructions for adding relations to the knowledge base and the instructions are configured for:
- receiving a triple comprising first and second arguments and a predicate;
- determining if the predicate exists in the predicate table and if so, retrieving its predicate identifier;
- otherwise, providing for creation of a new entry in the predicate table with a respective new predicate identifier and retrieving the new predicate identifier;
- determining if argument types of the first and second arguments in the triple match the argument types encoded in the predicate identifier;
- if the argument types of the first and second arguments in the triple match the argument types encoded in the predicate identifier, for at least one of the arguments in the triple, determining if the argument exists in the linked table corresponding to the encoded argument type, and if so retrieving its identifier, and if the argument does not exist, adding the respective argument as a new entry in the entity table with a respective identifier;
- and
- if a record does not yet exist in the records table, creating a new record in the records table which includes the argument identifier of the at least one argument and the retrieved predicate identifier;
- and
- a processor which executes the instructions.
A method for updating a knowledge base comprising:
- providing a knowledge base comprising a relations table and a plurality of linked tables, a first of the linked tables comprising a predicate table, the relations table including slots which, for each of a plurality of rows of the relations table, store a relation identifier, a predicate identifier, and first and second arguments of a respective relation, each predicate identifier encoding a key for a respective entry in the predicate table, a first argument type for the first of the arguments in the respective row of the relations table, and a second argument type for the second of the arguments in the respective row of the relations table, the first and second argument types being selected from a predefined set of argument types, one of the argument types in the set being associated with a second of the linked tables, and one of the first and second arguments in a row of the relations table serving as a key to an entry in the second linked table when the predicate identifier for that row encodes the associated argument type;
- receiving a triple comprising first and second arguments and a predicate;
- with a processor, determining if the predicate exists in the predicate table and if so, retrieving its predicate identifier;
- otherwise, providing for creation of a new entry in the predicate table with a respective new predicate identifier and retrieving the new predicate identifier;
- determining if argument types of the first and second arguments in the triple match the argument types encoded in the predicate identifier;
- if the argument types of the first and second arguments in the triple match the argument types encoded in the predicate identifier, for at least one of the arguments in the triple, determining if the argument exists in the linked table corresponding to the encoded argument type, and if so retrieving its identifier, and if the argument does not exist, adding the respective argument as a new entry in the entity table with a respective identifier;
- and
- if a record does not yet exist in the records table, creating a new record in the records table which includes the argument identifier of the at least one argument and the retrieved predicate identifier.
A method for generating a knowledge base system comprising:
- providing in memory a knowledge base comprising a relations table and a plurality of linked tables, a first of the linked tables comprising a predicate table, the relations table including slots which, for each of a plurality of rows of the relations table, store a relation identifier, a predicate identifier, and first and second arguments of a respective relation;
- with a processor, for each a plurality of candidate relations to be added to the knowledge base, the candidate relation comprising first and second arguments and a predicate which links the arguments:
- determining if the predicate in the relation exists in a predicate table and if so, retrieving a corresponding predicate identifier from the predicate table, determining if argument types of the first and second arguments in the candidate relation match respective argument types that are encoded in the predicate identifier, the argument types being selected from a finite set of argument types;
- if the argument types of the first and second arguments in the candidate relation match the argument types encoded in the predicate identifier, for at least one of the arguments in the candidate relation, determining if the argument exists in a respective linked table corresponding to the encoded argument type, and if so retrieving its identifier, and if the argument does not exist, adding the respective argument as a new entry in the entity table with a respective identifier;
- and
- where a record does not yet exist in the records table which includes the candidate relation, creating a new record in the records table which includes the argument identifier of the at least one argument and the retrieved predicate identifier.
A knowledge base stored in non-transitory memory comprising:
- a predicate table including for each of a set of entries, a respective predicate identifier, each predicate identifier encoding:
- an order number for the predicate,
- a first argument type for the predicate, and
- a second argument type for the predicate, the first and second argument types each being selected from a predefined set of argument types;
- a relations table including slots which, for each of a plurality of rows of the relations table, store a respective one of the predicate identifiers, and first and second arguments of a respective relation, each argument comprising one of an argument identifier and a value;
- an entity table corresponding to one of the argument types in the set of argument types, the entity table comprising a set of entries, each entry comprising an entity identifier and a respective entity value;
- and
- a string table corresponding to another of the argument types in the set of argument types, the string table comprising a set of entries, each entry comprising a string identifier and a respective string value;
- the first and second arguments in the relations table serving as a key to an entry in one of the entity table and the string table only when that table's argument type is encoded as the respective first or second argument type in the predicate identifier of the respective row.
Dependencies are inferred from the claim text.