# US 2015/0149507 A1 · Stream data multiprocessing method

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

- Number: US 2015/0149507 A1
- Document ID: US20150149507A1
- Status: Published application
- Kind: A1
- Application number: 14/398,622
- Filed: 2012-09-14
- Published: 2015-05-28
- Earliest claimed: 2012-09-14
- Assignees: Hitachi, Ltd.
- Inventors: Tsuneyuki Imaki; Itatu Nishizawa
- Web page: https://patentgrep.com/patent/US20150149507A1

## CPC

- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F 16/24568: {Data stream processing; Continuous queries}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A query parser that converts query definition into a query graph and decides the execution order of operators is installed, a set of consecutive operators in the execution order is called a stage, the total of calculation costs of operators configuring each stage is called a calculation cost of the stage, the query graph is divided into multiple stages such that the calculation cost of each stage becomes a value less than a value dividing the total cost of all operators by the number of calculation cores, and each calculation core extracts tuples one by one from an input stream, and, when taking charge of and executing processing of the tuples from the entrance to exit of the query graph, before the execution of each stage, confirms whether processing of the stage is completed for a tuple previous to a charge tuple.

## Claims

### Claim 1

A stream data multiprocessing method by a stream data processing system which includes a query parser that converts query definition defined by a user for a stream that is a sequence of a tuple with a time stamp into a query graph and decides an execution order of operators configuring the query graph and which includes multiple query execution threads in which any of multiple stages that are a set of the operators configuring the query graph can be executed, the method comprising:
dividing the query graph into the multiple stages that are a set of multiple consecutive operators, respectively;
extracting a first tuple in which a first thread in an execution stop state among the query execution threads is positioned in a head of the stream at that time point;
continuing sequential processing until the first query execution thread completes processing of all of the multiple stages with respect to the first tuple, the sequential processing confirming whether processing in a first stage which is to be executed first among the multiple stages is completed for a second tuple positioned previous to the first tuple in the stream, executing processing of the first stage on the first tuple as soon as completion of the processing is confirmed, confirming whether processing in a second stage which is to be executed next is completed for the second tuple as soon as the processing of the first stage is completed, and executing the second stage with respect to the first tuple as soon as completion of the processing is confirmed; and
executing processing of queries extracted by the respective multiple query execution threads in parallel simultaneously.

### Claim 2 (depends on 1)

The stream data multiprocessing method according to claim 1, wherein processing of dividing the query graph into the multiple stages includes a procedure of:
setting a value equal to or less than a value dividing a sum of processing costs of all of the operators by a query execution thread number, as a cost threshold; and
dividing the query graph into respective stages such that, in order from a head arranged according to the execution order of the operators, a total processing cost of operators configuring each stage does not exceed the set cost threshold.

### Claim 3 (depends on 2)

The stream data multiprocessing method according to claim 2, further comprising setting a product of a value dividing the total processing cost of all of the operators by the query execution thread number and a coefficient which is greater than 0 and equal to or less than 1.0 and which is selected by the user, as the cost threshold.

### Claim 4 (depends on 1)

The stream data multiprocessing method according to claim 1, wherein, when the query graph includes an interrupted-ignition-type operator like a time window and a delay operator, a time stamp of a tuple which is generated by the interrupted-ignition-type operator and a time stamp of a head tuple of the input stream are compared, and processing is performed in order from a tuple of an earlier time stamp.

### Claim 5 (depends on 1)

The stream data multiprocessing method according to claim 1, wherein, slightly before completion of the processing of the first stage, the first query execution thread confirms whether the processing in the second stage is completed for the second tuple, and prefetches an execution state of the processing of the second stage in a cache memory.

### Claim 6 (depends on 1)

The stream data multiprocessing method according to claim 1, wherein
the first query execution thread in the execution stop state extracts multiple tuples which are consecutively positioned in a head of the stream at that time point and which have an identical time stamp, and
the first query execution thread continues the sequential processing until processing of all stages is completed for the multiple tuples.

### Claim 7 (depends on 1)

The stream data multiprocessing method according to claim 1, wherein the first query execution thread in the execution stop state extracts multiple tuples which are consecutively positioned in a head of the stream at that time point within a time stamp range designated by the user, and the first query execution thread continues the sequential processing until processing of all stages is completed for the multiple tuples.

### Claim 8

A stream data processing method by a stream data processing system which includes a plurality of processors which execute parallel processing of a plurality of operators for a stream that is a sequence of a data, the method comprising:
dividing the plurality of the operators into the multiple stages that are a set of more than one operator, respectively;
deciding the number of the stages based on the number of the processors; binding the data, which is inputted to the stream data processing system, to one of the processors; and,
executing processing of all of the stages for the data by the processor to which the data is bound.

### Claim 9 (depends on 8)

The stream data processing method according to claim 8, further comprising, when each of the processors execute processing of each stage for the data, confirming processing state of another processor, which is one of the processors bound another data inputted to the stream data processing system immediately prior to the data; and,
executing processing of first stage, which is one of the stages, for the data when a completion of executing processing of the first stage for the another data is confirmed.
