# US 2019/0171670 A1 · System and method for managing graph data

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

- Number: US 2019/0171670 A1
- Document ID: US20190171670A1
- Status: Published application
- Kind: A1
- Application number: 16/092,924
- Filed: 2016-06-07
- Published: 2019-06-06
- Earliest claimed: 2016-04-25
- Assignees: GraphSQL, Inc.
- Applicants: Graphsql, Inc.
- Inventors: Zixuan ZHUANG; Like GAO; Mingxi WU; Yu XU
- Web page: https://patentgrep.com/patent/US20190171670A1

## CPC

- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F 16/213: {with details for schema evolution support}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/24542: {Plan optimisation}
- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system for managing graph data and methods for making and using same. A loading plan can be generated according to a loading job. Source data can be loaded into the graph model based on the loading plan. The loading job can be defined declaratively. An interpreter can encode the loading job to generate the loading plan having a tree structure. The loading plan can instruct a loading engine to load the source data. The loading engine can be compiled independent of the loading plan. Advantageously, the loading engine can be compiled no more than once. The compiled loading engine can interpret any loading plan. The compiled loading engine can filter or transform the source data at runtime of the loading. Advantageously, time for compiling the loading engine and reading source data can be saved. Graph data loading can have high flexibility and high performance.

## Claims

### Claim 1

A method for managing graph data, comprising:
generating a loading plan according to a loading job; and
loading source data into a graph model based on the loading plan.

### Claim 2 (depends on 1)

The method of claim 1, wherein said loading includes loading the source data into the graph model defined based on one or more vertex types, one or more edge types, one or more attributes of the vertex types, one or more attributes of the edge types or a combination thereof.

### Claim 3 (depends on 1)

The method of claim 1, wherein said loading includes loading the source data into the graph model via a loading engine.

### Claim 4 (depends on 3)

The method of claim 3, further comprising compiling the loading engine into native machine code independently of the loading plan.

### Claim 5

(canceled)

### Claim 6 (depends on 4)

The method of claim 4, further comprising interpreting the loading plan via the compiled loading engine, wherein said loading includes loading the source data via the compiled loading engine, wherein the compiled loading engine uses a reader for extracting the source data and a writer for sending the extracted source data to a graph store.

### Claim 7

(canceled)

### Claim 8 (depends on 1)

The method of claim 1, further comprising obtaining the loading job, wherein the loading job includes one or more loading statements for mapping the source data to the graph model.

### Claim 9

(canceled)

### Claim 10 (depends on 8)

The method of claim 8, wherein said obtaining the loading job includes:
obtaining one or more vertex loading statements for mapping the source data to one or more vertex types in the graph model;
obtaining one or more edge loading statement for mapping the source data to one or more edge types in the graph model; or
a combination thereof.

### Claim 11 (depends on 10)

The method of claim 10, wherein said generating the loading plan includes generating a vertex type configuration based on the vertex loading statements, an edge type configuration based on the edge loading statements or a combination thereof.

### Claim 12 (depends on 11)

The method of claim 11, wherein said generating the loading plan includes arranging the vertex type configuration, the edge type configuration in a tree structure or a combination thereof, or wherein said generating the loading plan includes:
encoding the vertex loading statements to provide the encoded vertex loading statements in the vertex type configuration;
encoding the edge loading statements to provide the encoded edge loading statements in the edge type configuration; or
a combination thereof.

### Claim 13

(canceled)

### Claim 14 (depends on 8)

The method of claim 8, wherein said obtaining includes obtaining the loading job defined in a declarative language.

### Claim 15 (depends on 8)

The method of claim 8, further comprising obtaining the source data having one or more tokens in a tabular format.

### Claim 16 (depends on 15)

The method of claim 15, wherein said obtaining the loading job includes obtaining one or more loading statements for mapping positions of the tokens in the tabular format to a target schema of the graph model, or wherein said loading includes filtering the source data based upon a condition function in a selected loading statement of the one or more loading statements.

### Claim 17

(canceled)

### Claim 18

The method of claimer 16, further comprising translating the condition function into a Boolean token function, or wherein said filtering includes:
providing a selected token of the source data to the condition function;
receiving an output of the condition function; and
determining whether to accept or reject a row of the source data associated with the token based on the output of the condition function.

### Claim 19

(canceled)

### Claim 20 (depends on 18)

The method of claim 18, further comprising compiling the Boolean token function into native machine code prior to said loading.

### Claim 21 (depends on 15)

The method of claim 15, wherein said loading includes transforming at least one of the tokens based upon a token transformation function in a selected loading statement of the one or more loading statements.

### Claim 22 (depends on 21)

The method of claim 21, wherein said transforming includes transforming the token via a plurality of nested token transformation functions, or wherein said transforming includes:
providing a token of the source data to the token transformation function; and
loading an output of the token transformation function to the graph model.

### Claim 23 (depends on 21)

The method of claim 21, further comprising providing an application programming interface (API) for customizing the token transformation function or further comprising compiling the token transformation function into native machine code prior to said loading.

### Claim 24

(canceled)

### Claim 25

(canceled)

### Claim 26

(canceled)

### Claim 27 (depends on 8)

The method of claim 8, further comprising locating one or more sources of the source data via the one or more loading statements.

### Claim 28 (depends on 27)

The method of claim 27, wherein said locating includes locating a source file containing the source data, wherein said locating includes locating a network data stream containing the source data or wherein said loading includes:
grouping the one or more loading statements based at least partially on the sources;
reading each source to extract the source data; and
sharing the extracted source data among one or more selected loading statements that locate a same source.

### Claim 29

(canceled)

### Claim 30

(canceled)

### Claim 31 (depends on 28)

The method of claim 28, wherein said reading includes deserializing each source to obtain one or more tokens from the source data for loading, wherein said deserializing includes deserializing each source once to obtain one or more tokens from the source data for loading.

### Claim 32

(canceled)
