# US 2026/0252563 A1 · Device and method for extracting graph

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

- Number: US 2026/0252563 A1
- Document ID: US20260252563A1
- Status: Published application
- Kind: A1
- Application number: 19/416,000
- Filed: 2025-12-11
- Published: 2026-08-27
- Earliest claimed: 2025-02-27
- Assignees: GraphAI Co., Ltd.
- Applicants: GraphAI Co., Ltd.
- Inventors: Jeong Ho PARK; Min Soo KIM; Taek Yoon KIM; In Ju NA
- Web page: https://patentgrep.com/patent/US20260252563A1

## CPC

- G06F 16/24544: {Join order optimisation}
- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F 16/24535: {of sub-queries or views}
- G06F 16/24542: {Plan optimisation}
- G06F 16/2456: {Join operations}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are a device and method for extracting a graph. The device for extracting a graph performs a plurality of operations including receiving one or more first join queries for extracting a graph from a relational database (RDB), extracting at least one first common subquery included in common in the one or more first join queries, generating at least one first subplan on the basis of the at least one first common subquery, generating a plurality of second subplans by joining a plurality of non-common subqueries included in the at least one first subplan to at least one second common subquery corresponding to the at least one first common subquery, determining a second subplan with a lowest cost as an optimal plan by comparing costs required for executing the plurality of second subplans, and determining the optimal plan as a graph extraction query set.

## Claims

### Claim 1

A device for extracting a graph, comprising:
at least one memory including a plurality of instructions; and
at least one processor electrically connected to the at least one memory and configured to execute the plurality of instructions,
wherein, when the plurality of instructions are executed by the at least one processor, the at least one processor performs a plurality of operations including:
receiving one or more first join queries for extracting a graph from a relational database (RDB);
extracting at least one first common subquery included in common in the one or more first join queries;
generating at least one first subplan on the basis of the at least one first common subquery;
generating a plurality of second subplans by joining a plurality of non-common subqueries included in the at least one first subplan to at least one second common subquery corresponding to the at least one first common subquery;
determining a second subplan with a lowest cost as an optimal plan by comparing costs required for executing the plurality of second subplans; and
determining the optimal plan as a graph extraction query set.

### Claim 2 (depends on 1)

The device of claim 1, wherein the at least one second common subquery include the at least one first common subquery and a materialized view storing a computation result of the at least one first common subquery, and
the plurality of second subplans include a join sharing-outer join query acquired by performing an outer join on the second common subquery and the plurality of non-common subqueries and a join sharing-materialized view query acquired by performing an inner join on the materialized view and the plurality of non-common subqueries.

### Claim 3 (depends on 2)

The device of claim 2, wherein the generating of the plurality of second subplans comprises:
decomposing the at least one first subplan into the first common subquery and the non-common subqueries; and
setting the second common subquery corresponding to the first common subquery as an outer table and performing an outer join on the non-common subqueries and the second common subquery to generate the join sharing-outer join query.

### Claim 4 (depends on 2)

The device of claim 2, wherein the generating of the plurality of second subplans comprises:
generating the computation result of the first common subquery as the materialized view;
electrically storing the materialized view in the at least one memory; and
generating the join sharing-materialized view query by performing an inner join on the materialized view and the plurality of non-common subqueries.

### Claim 5 (depends on 2)

The device of claim 2, wherein the determining of the second subplan with the lowest cost as the optimal plan comprises:
calculating a baseline cost for a baseline subplan solely on the basis of the one or more first join queries;
calculating a total sum of a computational cost for the second common subquery, a computational cost for the plurality of non-common subqueries, and a computational cost for the outer join as at least one outer join application cost for each of the second subplans;
calculating a total sum of a computational cost for the first common subquery for generating the materialized view, a cost for storing the materialized view in one of the at least one memory, and a computational cost for the join sharing-materialized view query as at least one view join application cost for each second subplan; and
comparing the baseline cost, the at least one outer join application cost, and the at least one view join application cost to determine a second subplan corresponding to a lowest cost as a first optimal plan.

### Claim 6 (depends on 5)

The device of claim 5, wherein the plurality of operations further include:
updating the first optimal plan with a new baseline subplan;
reperforming the extracting of the at least one first common subquery, the generating of the at least one first subplan, the generating of the plurality of second subplans, and the determining of the second subplan with the lowest cost as the optimal plan, on the basis of a query included in the updated baseline subplan;
repeating the updating and the reperforming until a second optimal plan derived through the reperforming becomes identical to the baseline subplan; and
determining the second optimal plan as the optimal plan that is the graph extraction query set when the baseline subplan is identical to the second optimal plan.

### Claim 7 (depends on 1)

The device of claim 1, wherein the plurality of operations further include:
defining a graph model on the basis of the one or more first join queries; and
extracting the graph corresponding to the graph extraction query set from the RDB,
wherein the graph model includes information on a plurality of vertices and one or more edges defined by the one or more first join queries.

### Claim 8 (depends on 7)

The device of claim 7, wherein the extracting of the graph comprises:
computing the graph extraction query set from the RDB;
extracting the plurality of vertices and the one or more edges from a computation result table of the graph extraction query set; and
converting the plurality of extracted vertices and the one or more extracted edges into the graph,
wherein the number of types of one or more edges is equal to the number of one or more first join queries.

### Claim 9

The device of claim, 8, wherein the graph includes one or more edges having a pattern of a star structure or a cyclic structure.

### Claim 10

A method of extracting a graph by a graph extraction device including at least one memory including a plurality of instructions and at least one processor electrically connected to the at least one memory and configured to execute the plurality of instructions, the method comprising:
receiving one or more first join queries for extracting a graph from a relational database (RDB);
extracting at least one first common subquery included in common in the one or more first join queries;
generating at least one first subplan on the basis of the at least one first common subquery;
generating a plurality of second subplans by joining a plurality of non-common subqueries included in the at least one first subplan to at least one second common subquery corresponding to the at least one first common subquery;
determining a second subplan with a lowest cost as an optimal plan by comparing costs required for executing the plurality of second subplans; and
determining the optimal plan as a graph extraction query set.

### Claim 11 (depends on 10)

The method of claim 10, wherein the at least one second common subquery includes the at least one first common subquery and a materialized view storing a computation result of the at least one first common subquery, and
the plurality of second subplans include a join sharing-outer join query acquired by performing an outer join on the second common subquery and the plurality of non-common subqueries and a join sharing-materialized view query acquired by performing an inner join on the materialized view and the plurality of non-common subqueries.

### Claim 12 (depends on 11)

The method of claim 11, wherein the generating of the plurality of second subplans comprises:
decomposing the at least one first subplan into the first common subquery and the non-common subqueries; and
setting the second common subquery corresponding to the first common subquery as an outer table and performing an outer join on the non-common subqueries and the second common subquery to generate the join sharing-outer join query.

### Claim 13 (depends on 11)

The method of claim 11, wherein the generating of the plurality of second subplans comprises:
generating the computation result of the first common subquery as the materialized view;
electrically storing the materialized view in the at least one memory; and
generating the join sharing-materialized view query by performing an inner join on the materialized view and the plurality of non-common subqueries.

### Claim 14 (depends on 11)

The method of claim 11, wherein the determining of the second subplan with the lowest cost as the optimal plan comprises:
calculating a baseline cost for a baseline subplan solely on the basis of the one or more first join queries;
calculating a total sum of a computational cost for the second common subquery, a computational cost for the plurality of non-common subqueries, and a computational cost for the outer join as at least one outer join application cost for each second subplan including the join sharing-outer join query;
calculating a total sum of a computational cost for the first common subquery for generating the materialized view, a cost for storing the materialized view in one of the at least one memory, and a computational cost for the join sharing-materialized view query as at least one view join application cost for each second subplan including the join-sharing materialized view query; and
comparing the baseline cost, the at least one outer join application cost, and the at least one view join application cost to determine a second subplan corresponding to a lowest cost as a first optimal plan.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
updating the first optimal plan with a new baseline subplan;
reperforming the extracting of the at least one first common subquery, the generating of the at least one first subplan, the generating of the plurality of second subplans, and the determining of the second subplan with the lowest cost as the optimal plan, on the basis of a query included in the updated baseline subplan;
repeating the updating and the reperforming until a second optimal plan derived through the reperforming becomes identical to the baseline subplan; and
determining the second optimal plan as the optimal plan that is the graph extraction query set when the baseline subplan is identical to the second optimal plan.

### Claim 16 (depends on 10)

The method of claim 10, further comprising:
defining a graph model on the basis of the one or more first join queries; and
extracting the graph corresponding to the graph extraction query set from the RDB,
wherein the graph model includes information on a plurality of vertices and one or more edges defined by the one or more first join queries.

### Claim 17 (depends on 16)

The method of claim 16, wherein the extracting of the graph comprises:
computing the graph extraction query set from the RDB;
extracting the plurality of vertices and the one or more edges from a computation result table of the graph extraction query set; and
converting the plurality of extracted vertices and the one or more extracted edges into the graph,
wherein the number of types of one or more edges is equal to the number of one or more first join queries.

### Claim 18 (depends on 17)

The method of claim 17, wherein the graph includes one or more edges having a pattern of a star structure or a cyclic structure.

### Claim 19 (depends on 10)

A computer program stored in a computer-readable recording medium to perform the method according to claim 10 in combination with hardware.
