# US 2019/0317965 A1 · Methods and apparatus to facilitate generation of database queries

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0317965 A1
- Document ID: US20190317965A1
- Status: Published application
- Kind: A1
- Application number: 16/457,203
- Filed: 2019-06-28
- Published: 2019-10-17
- Earliest claimed: 2019-06-28
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Luis Carlos Maria Remis; Ignacio Javier Alvarez; Li Chen; Javier Felip Leon; David Israel Gonzalez Aguirre; Justin Gottschlich; Javier Sebastian Turek
- Web page: https://patentgrep.com/patent/US20190317965A1

## CPC

- G06F 16/3322: {using system suggestions (G06F16/3325 takes precedence)}
- G06F 16/90328: {using search space presentation or visualization, e.g. category or range presentation and selection}
- G06F 16/24578: {using ranking}
- G06F 16/367: {Ontology}
- G06F 16/9038: Presentation of query results
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and apparatus to facilitate generation of database queries are disclosed. An example apparatus includes a generator to generate a global importance tensor. The global importance tensor based on a knowledge graph representative of information stored in a database. The knowledge graph includes objects and connections between the objects. The global importance tensor includes importance values for different types of the connections between the objects. The example apparatus further includes an importance adaptation analyzer to generate a session importance tensor based on the global importance tensor and a user query, and a user interface to provide a suggested query to a user based on the session importance tensor.

## Claims

### Claim 1

An apparatus comprising:
a generator to generate a global importance tensor, the global importance tensor based on a knowledge graph representative of information stored in a database, the knowledge graph including objects and connections between the objects, the global importance tensor including importance values for different types of the connections between the objects;
an importance adaptation analyzer to generate a session importance tensor based on the global importance tensor and a user query; and
a user interface to provide a suggested query to a user based on the session importance tensor.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the importance values in the global importance tensor are based on at least one of a number of each different type of object in the knowledge graph, a number of each different type of connection in the knowledge graph, an average number of the connections associated with each different type of object, or a standard deviation of a number of the connections associated with ones of the objects corresponding to each different type of object.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the importance tensor generator is to:
calculate a first weight for a first one of the objects;
calculate a second weight for a second one of the objects;
calculate a third weight for a first one of the connections between the first and second objects; and
calculate a first one of the importance values in the global importance tensor by multiplying the first, second, and third weights.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein the first object corresponds to a first object type, the importance tensor generator to calculate the first weight by:
calculating a first number of the objects in the knowledge graph corresponding to the first object type;
calculating an average number of the connections associated with each of the objects in the knowledge graph corresponding to the first object type; and
calculating a standard deviation of a number of the connections associated with each of the objects corresponding to the first object type.

### Claim 5 (depends on 4)

The apparatus of claim 4, wherein the importance tensor generator is to calculate the first weight by:
normalizing the first number relative to a total number of the objects in the knowledge graph; and
normalizing the average number relative to numbers of connections associated with individual ones of the objects corresponding to the first object type; and
normalizing the standard deviation relative to standard deviations of numbers of the connections associated with ones of the objects corresponding to other types of objects different than the first object type.

### Claim 6 (depends on 3)

The apparatus of claim 3, wherein the first connection corresponds to a first connection type, the importance tensor generator to calculate the third weight by:
calculating a number of the connections in the knowledge graph corresponding to the first connection type; and
normalizing the number relative to a total number of the connections in the knowledge graph.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the user query is a first user query and the suggested query is a first suggested query, the importance adaptation analyzer to modify the session importance tensor based on a second user query, the user interface to provide a second suggested query to the user based on the modified session importance tensor.

### Claim 8 (depends on 1)

The apparatus of claim 1, wherein the importance adaptation analyzer is to generate the session importance tensor by:
defining the session importance tensor as corresponding to the global importance tensor;
calculating a loss function for the session importance tensor based on ones of the objects and associated ones of the connections identified in the user query; and
updating the session importance tensor by the negative gradient of the loss function.

### Claim 9 (depends on 1)

The apparatus of claim 1, further including a query generator to:
determine a first path in the knowledge graph, the first path defined by a first series of connections including one or more of the connections;
calculate a first importance of the first path by multiplying the importance values associated with the connections in the first series of connections;
determine a second path in the knowledge graph, the second path defined by a second series of connections including one or more of the connections;
calculate a second importance of the second path by multiplying the importance values associated with the connections in the second series of connections;
rank the first path and second path based on the first importance and the second importance; and
select one of the first path or the second path as a basis for the suggested query based on the ranking.

### Claim 10 (depends on 1)

The apparatus of claim 1, further including a query generator to:
identify a first object of the objects as a beginning of a path within the knowledge graph;
define hops in the path corresponding to the connections from the first object to a second one of the objects at an ending of the path, the connections associated with one or more intermediate ones of the objects between the first and second objects along the path; and
generate the suggested query based on the path.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the query generator is to identify subsequent ones of the one or more intermediate objects in the path based on the importance values corresponding to the connections associated with an immediately preceding object in the path.

### Claim 12 (depends on 10)

The apparatus of claim 10, wherein the query generator is to:
compare the importance values corresponding to different ones of the connections associated with the first object;
select a first connection of the different ones of the connections associated with the first object as a first hop in the path based on the comparison; and
identify subsequent hops in the path based on subsequent comparisons of the importance values corresponding to different ones of the connections associated with ones of the objects at an end of preceding hops in the path.

### Claim 13

(canceled)

### Claim 14

(canceled)

### Claim 15 (depends on 10)

The apparatus of claim 10, wherein the query generator is to translate the objects and the connections along the path into a structured format corresponding to a syntax of a query language associated with the database, the suggested query provided to the user including the structured format.

### Claim 16 (depends on 15)

The apparatus of claim 15, further including a query summary generator to generate a summary of the suggested query to the user that is not based on the syntax of the query language, the summary identifying the first and second objects in the path and at least one of a first one of the hops or a first one of the intermediate objects, the user interface to provide the summary to the user.

### Claim 17

(canceled)

### Claim 18 (depends on 1)

The apparatus of claim 1, further including an object-level summary generator to generate an object-level graph summarization of the knowledge graph, the object-level graph summarization indicative of clusters of the objects for each type of the connections, the user to provide the object-level graph summarization to the user.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the object-level summary generator is to:
generate a low-rank representation of the knowledge graph based on Laplacian embedding of each type of connection; and
implement a cluster analysis on the low-rank representation to identify the clusters for the object-level graph summarization.

### Claim 20 (depends on 1)

The apparatus of claim 1, further including a connection-level summary generator to generate a connection-level graph summarization of the knowledge graph, the connection-level graph summarization indicative of at least one of similarities or dissimilarities between different types of the connections across the objects in the knowledge graph, the user to provide the connection-level graph summarization to the user.

### Claim 21 (depends on 20)

The apparatus of claim 20, wherein the connection-level summary generator is to:
define connection-type-specific graphs corresponding to ones of the connection in the knowledge graph corresponding to particular types of the connections;
determine distances between different pairs of the connection-type-specific graphs based on graph matching;
identify features within a distance matrix using a sparse autoencoder, the distance matrix containing the distances between the different pairs of the connection-type-specific graphs; and
implement a cluster analysis on the identified features to identify the at least one of the similarities or the dissimilarities between the different types of the connections.

### Claim 22

A non-transitory computer readable medium comprising instructions that, when executed, cause a machine to at least:
generate a global importance tensor, the global importance tensor based on a knowledge graph representative of information stored in a database, the knowledge graph including objects and connections between the objects, the global importance tensor including importance values for different types of the connections between the objects;
generate a session importance tensor based on the global importance tensor and a user query; and
provide a suggested query to a user based on the session importance tensor.

### Claim 23

(canceled)

### Claim 24 (depends on 22)

The non-transitory computer readable medium of claim 22, wherein the instructions further cause the machine to:
calculate a first weight for a first one of the objects;
calculate a second weight for a second one of the objects;
calculate a third weight for a first one of the connections between the first and second objects; and
calculate a first one of the importance values in the global importance tensor by multiplying the first, second, and third weights.

### Claim 25

(canceled)

### Claim 26

(canceled)

### Claim 27

(canceled)

### Claim 28 (depends on 22)

The non-transitory computer readable medium of claim 22, wherein the user query is a first user query and the suggested query is a first suggested query, the instructions to further cause the machine to:
modify the session importance tensor based on a second user query; and
provide a second suggested query to the user based on the modified session importance tensor.

### Claim 29

(canceled)

### Claim 30

(canceled)

### Claim 31 (depends on 22)

The non-transitory computer readable medium of claim 22, wherein the instructions further cause the machine to:
identify a first object of the objects as a beginning of a path within the knowledge graph;
define hops in the path corresponding to the connections extending from the first object to a second one of the objects at an ending of the path, the connections associated with one or more intermediate ones of the objects between the first and second objects along the path; and
generate the suggested query based on the path.

### Claim at position 32

32-42. (canceled)

### Claim 43

A method comprising:
generating, by executing an instruction with at least one processor, a global importance tensor, the global importance tensor based on a knowledge graph representative of information stored in a database, the knowledge graph including objects and connections between the objects, the global importance tensor including importance values for different types of the connections between the objects;
generating, by executing an instruction with the at least one processor, a session importance tensor based on the global importance tensor and a user query; and
providing, by executing an instruction with the at least one processor, a suggested query to a user based on the session importance tensor.

### Claim 44

(canceled)

### Claim 45 (depends on 43)

The method of claim 43, further including:
calculating a first weight for a first one of the objects;
calculating a second weight for a second one of the objects;
calculating a third weight for a first one of the connections between the first and second objects; and
calculating a first one of the importance values in the global importance tensor by multiplying the first, second, and third weights.

### Claim at position 36

46-48. (canceled)

### Claim 49 (depends on 43)

The method of claim 43, wherein the user query is a first user query and the suggested query is a first suggested query, further including:
modifying the session importance tensor based on s second user query; and
providing a second suggested query to the user based on the modified session importance tensor.

### Claim at position 38

50-63. (canceled)
