WO2017037773A1 - Query development assistance method and query development assistance device - Google Patents
Query development assistance method and query development assistance device Download PDFInfo
- Publication number
- WO2017037773A1 WO2017037773A1 PCT/JP2015/074372 JP2015074372W WO2017037773A1 WO 2017037773 A1 WO2017037773 A1 WO 2017037773A1 JP 2015074372 W JP2015074372 W JP 2015074372W WO 2017037773 A1 WO2017037773 A1 WO 2017037773A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- query
- template
- time
- time characteristic
- characteristic
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Definitions
- the present invention relates to a technique for generating a query for processing stream data from a template.
- Stream data processing is known as a technique for processing data from a large number of sensors, etc., and data related to settlement and trading at financial institutions.
- a query is first registered in the system, and the query is continuously executed when data arrives.
- CQL Continuous QueryLanguage
- CQL Continuous QueryLanguage
- Patent Document 1 a technique for creating a template for a stream data processing query described in CQL is known (for example, Patent Document 1).
- template input and data source schema are associated in advance.
- the template presents the input stream candidates for the template selected by the developer, thereby supporting template-based query development.
- the present invention is a query development support method for supporting the development of a query for stream data processing in a computer comprising a processor and a memory, wherein the computer describes one or more predetermined processes for the stream data processing in advance.
- a first step of accepting a template call query including a template of the second, a second step of accepting characteristic information of an input stream of the stream data processing by the computer, and a calculator of stream data processing from the template call query.
- Query development in the development of a query using a template in stream data processing, based on a constraint condition such as a temporal constraint, by determining whether or not the template has been edited and specifying the editing location by a computer, Query development can be facilitated.
- a constraint condition such as a temporal constraint
- FIG. 1 is a block diagram illustrating an example of a computer system according to a first embodiment of this invention.
- FIG. FIG. 3 is a block diagram illustrating a relationship between input and output of the computer system according to the first embodiment of this invention. It is a figure which shows the 1st Example of this invention and shows an example of the template of an event filter. It is a figure which shows the 1st Example of this invention and shows an example of the template of an autocorrelation. It is a figure which shows the 1st Example of this invention and shows an example of the template of correlation analysis. It is a figure which shows the 1st Example of this invention and shows an example of the query which calls a template.
- FIG. 1 is a block diagram illustrating an example of a computer system according to the first embodiment.
- a stream processing execution server 101 that executes processing of stream data, via a network 108, a stream data processing development server 107 that generates a stream processing query based on the template 110, a terminal 130 that operates the template 110, and the like, Connected to a data source 140 that supplies stream data.
- the data source 140 for example, a sensor, a sensor network system, or the like can be employed.
- the stream processing execution server 101 includes a CPU 104 that performs arithmetic processing, a memory 102 that stores data and programs, a storage 105 that stores programs and data, and an I / O interface 106 connected to a network 108.
- a stream data processing engine 103 as a program is loaded into the memory 102 and executed by the CPU 104. Note that the stream data processing engine 103 can be stored in the storage 105.
- the stream data processing engine 103 continuously executes the stream data processing query generated by the stream data processing development server 107 to process the stream data received from the data source 140, as will be described later.
- the stream data processing query for example, the above-mentioned CQL (Continuous QueryLanguage) can be used.
- CQL Continuous QueryLanguage
- the stream data processing development server 107 includes a CPU 121 that performs arithmetic processing, a memory 122 that stores data and programs, a storage 123 that stores programs and data, and an I / O interface 124 connected to the network 108. .
- a query generation unit 109 as a program is loaded into the memory 122 and executed by the CPU 121.
- the storage 123 stores a template 110, a delay time constraint (hereinafter, time constraint) 111, and a generated stream processing query 501. Note that the query generation unit 109 as a program can be stored in the storage 123.
- each functional unit of the query generation unit 109 is loaded into the memory 122 as a program.
- the CPU 121 operates as a functional unit that provides a predetermined function by performing processing according to the program of each functional unit.
- the CPU 121 functions as the query generation unit 109 by performing processing according to the query generation program.
- the CPU 121 also operates as a function unit that provides each function of a plurality of processes executed by each program.
- a computer and a computer system are an apparatus and a system including these functional units.
- Information such as programs and tables for realizing each function of the stream data processing development server 107 includes a storage device such as a storage 123, a nonvolatile semiconductor memory, a hard disk drive, an SSD (Solid State Drive), an IC card, an SD card, It can be stored in a computer-readable non-transitory data storage medium such as a DVD.
- a storage device such as a storage 123, a nonvolatile semiconductor memory, a hard disk drive, an SSD (Solid State Drive), an IC card, an SD card, It can be stored in a computer-readable non-transitory data storage medium such as a DVD.
- the main processing performed in the stream data processing development server 107 is that the query developer 201 operating the terminal 130 selects one or more templates 110 and generates a template call query 203 that combines the templates 110. Further, the query developer 201 sets a time characteristic 204 of the input stream related to delay as information representing the characteristic of the input stream.
- the query developer 201 inputs the template call query 203 and the time characteristic 204 of the input stream related to the delay from the terminal 130 to the stream data processing development server 107, and starts the query generation unit 109.
- the query generation unit 109 analyzes the data flow of the operator in the template 110 described in the template call query 203, and based on the input stream time characteristic 204 regarding the given delay, calculates the time characteristic in each stream between operators. calculate.
- the query generation unit 109 reads the time constraint 111 (constraint condition) set in advance for each template 110 by the template developer 202, determines whether or not the calculated time characteristic satisfies the constraint condition, and satisfies If not, the template editing part candidate 212 is generated and output.
- the query developer 201 can easily specify the part where the template 110 is edited by referring to the template editing part candidate 212 on the terminal 130.
- the terminal 130 is a computer including a CPU, memory, storage, I / O interface, and input / output device (not shown) and accepts an operation of a user or an administrator.
- FIG. 2 is a block diagram illustrating an example of the input / output relationship of the query generation unit 109.
- the query generator 205 receives the template call query 203, acquires the template 110 specified by the query 203 from the storage 123, and performs a stream data processing query ( A generation query 206) is generated.
- the template 110 is a program in which the template developer 202 describes a functional part (or predetermined process) of stream data processing in advance for each function type and processing content.
- the query developer 201 combines and combines templates 110 having desired functions from among a plurality of types of templates 110 stored in the storage 123, specifies parameters, etc., and inputs them to the query generation unit 109.
- a desired stream data processing query can be generated.
- the query parser 207 analyzes the generated query 206 and generates an operator tree 208 indicating the connection relationship of operators.
- the query parser 207 may be the same as the parser (not shown) installed in the stream data processing engine 103, or may be a parser emulator.
- a query time characteristic calculation unit (hereinafter referred to as a query time characteristic calculation unit) 209 relating to delay tracks the flow of data of the operator in the template 110 from the analyzed operator tree 208, and As will be described later, a query time characteristic (hereinafter referred to as query time characteristic) 210 relating to delay is calculated.
- a time constraint condition determination unit (hereinafter referred to as a time constraint condition determination unit) 211 related to a delay is added to the calculated query time property 210 as a time characteristic (hereinafter referred to as an input stream) related to an input delay.
- the time characteristic of the template process taking into account the input stream time characteristic) 204 is calculated.
- the time constraint condition determination unit 211 determines whether or not the time characteristics of the template processing satisfy the time constraint 111 set in advance for each template 110.
- the time constraint condition determination unit 211 identifies the template 110 that needs to be edited and edits the template when the time property of the template process that takes the input stream time property 204 into the query time property 210 does not satisfy the time constraint 111
- the part candidate 212 is output to the terminal 130.
- the query generation unit 109 uses a template developer when the template call query 203 generated by the query developer 201 is operated with the input stream time characteristic 204 set by the query developer 201.
- the query generation unit 109 uses a template developer when the template call query 203 generated by the query developer 201 is operated with the input stream time characteristic 204 set by the query developer 201.
- 202 does not satisfy the set time constraint 111, a part to be edited in the template 110 and a parameter to be reviewed are specified.
- the query developer 201 when the query developer 201 develops a query using one or more templates 110, the query developer 201 can quickly generate a query that satisfies the time constraint set by the template developer 202.
- FIGS. 3A, 3B, and 3C an example of the template 110 used in the first embodiment is shown in FIGS. 3A, 3B, and 3C.
- an example is shown in which an event filter and three types of templates 110-1 to 110-3 for autocorrelation and correlation analysis are used.
- the generic name of the template is indicated by reference numeral “110”.
- FIG. 3A is a diagram showing an example of an event filter template 110-1.
- the template 110-1 defines the ID (nodeId) of the sensor node that acquires data and the Id (eventId) of the event that acquires data, as indicated by the SELECT statement.
- the event filter template 110-1 makes it possible to acquire stream data output by a specific sensor node ID for each event ID.
- FIG. 3B is a diagram showing an example of an autocorrelation template 110-2.
- the template 110-2 acquires and compares two events (cur. $ Key, after. $ Key) from the same sensor node within a predetermined window size ($ windowSize) as indicated by the SELECT statement. Autocorrelation is shown.
- FIG. 3C is a diagram illustrating an example of a correlation analysis template 110-3.
- the template 110-3 receives two input streams of $ input1 and $ input2 within a predetermined window size ($ windowSize) and analyzes the correlation of the output between the templates 110.
- FIG. 4 is a diagram illustrating an example of the template call query 203.
- the template call query 203 of the first embodiment shows an example in which stream data from two sensor nodes A and B are detected as one event string.
- the template call query 203 is first defined as a sensor node event (input stream) definition 401, in which an input stream includes a sensor node ID, a stream data time stamp, an event ID, and a log.
- the event filter template call 402 receives an event from the sensor node A as an input stream using the event filter template 110-1 shown in FIG. 3A and outputs an eventA stream.
- the autocorrelation template call 403 receives eventA as an input stream using the autocorrelation template 110-2 shown in FIG. 3B.
- the autocorrelation template call 403 receives two events A1 and A2 within 30 seconds of the window size, it outputs an eventSequenceA stream.
- the event filter template call 404 receives the event B1 from the sensor node B as an input stream using the event filter template 110-1 shown in FIG. 3A, and outputs an eventB stream.
- the correlation analysis template call 405 receives eventSequenceA and eventB as input streams using the correlation analysis template 110-3 shown in FIG. 3C. Then, when the correlation analysis template call 405 receives two events within 30 seconds of the window size, it outputs an eventSequenceAB stream.
- FIG. 5 is a diagram illustrating an example of the generated query 206 generated by the query generator 205 from the template call query 203.
- an input stream is defined by a sensor node event (input stream) definition (501) corresponding to the sensor node event (input stream) definition 401 of FIG.
- the event extraction (502) of the node A is a query corresponding to the event filter template call 402 of FIG. 4, and receives the event A from the sensor node A as an input stream and outputs the eventA stream.
- Event A1 ⁇ Event A2 within 30 s corresponds to the autocorrelation template call 403 in FIG. 4 and accepts eventA as an input stream.
- the query receives two events A1 and A2 within 30 seconds of the window size, it outputs an eventSequenceA stream.
- the event extraction (504) of the node B corresponds to the event filter template call 404 of FIG. 4, accepts the event B1 from the sensor node B as an input stream, and outputs an eventB stream.
- Event B1 at the same time as event A1 is detected (505), corresponding to the correlation analysis template call 405 in FIG. 4, and eventSequenceA and eventB are accepted as input streams.
- the query receives two events within 30 seconds of the window size, it outputs an eventSequenceAB stream.
- FIG. 6 is a diagram illustrating an example of the time characteristic 204 of the input stream.
- the illustrated input stream time characteristic 204 sets that the delay time of the event from the sensor node A and the event from the sensor node B is 10 seconds at maximum.
- This input stream time characteristic 204 is set by the query developer 201 from the terminal 130.
- the delay time indicates a difference between the time stamp of the event (tuple) from the sensor node A and the time stamp of the event (tuple) from the sensor node B.
- FIG. 7 is a diagram illustrating an example of the time constraint 111.
- the time constraint 111 is a constraint condition set in advance for each template 110 by the template developer 202.
- a temporal condition of the input stream and a temporal condition of the input stream and the output stream are set. If the execution condition of the operator generated from the template 110 satisfies the time constraint 111, it is guaranteed that the stream data processing is reliably executed.
- the time constraint 111 includes an example including a template name 701 and a time constraint 702.
- the template name 701 indicates correlation analysis
- the time constraint 702 of the correlation analysis template 110-3 is the time difference (absolute value) between the input stream 1 ($ input1) and the input stream 2 ($ input2). Is within the window size ($ windowSize).
- the time constraint 111 can be set for each template 110.
- FIG. 8 is a diagram illustrating an example of the operator tree 208.
- the operator tree 208 has a tree structure generated by the query parser 207 analyzing the generated query 206.
- the entire generation query 206 is identified by STREAM: event 801.
- the query event A 802 corresponds to the query “event extraction 502 of node A” shown in FIG.
- the Query event A 802 is a tuple of the NOW_WINDOW operator 810 that acquires an event from the sensor node, a Filter operator 1811 that selects only data of the sensor node A from the output of the NOW_WINDOW operator 810, and the output of the filter operator 811 as a tuple of the event A 804 of the output stream. Contains the operator of the ISTREAM operator 812 to be added.
- the query event B 803 corresponds to the query of “Extract Node 1 event 1” (505) shown in FIG.
- the Query event B 803 includes a NOW_WINDOW operator 813 that acquires an event from the sensor node, a Filter operator 814 that selects only data of the sensor node A from the NOW_WINDOW operator 813, and an ISTREAM operator that adds the output of the Filter operator 814 to the event B 805 of the output stream. 815.
- Query eventSequence A 806 corresponds to the query “Detect event A2 within event A1 ⁇ 30s” (503) shown in FIG.
- the query event sequence A 806 includes a NOW_WINDOW operator 816 and a TIME_WINDOW operator 817 that accept the output stream event A 804, a JOIN operator 818 that combines the output of the NOW_WINDOW operator 816 and the output of the TIME_WINDOW operator 817, and an output of the JOIN output 8 ce Iu u 818 Ace Iu 818 Ace An operator 819.
- Query eventSequence AB 808 corresponds to the query “Detect event B1 at the same time as event A1” (505) shown in FIG.
- the query event sequence AB 808 is an output of the NOW_WINDOW operator 820 that accepts the output stream event sequence A 807, the TIME_WINDOW operator 821 that accepts the output stream event B 805, and the output of the operator 182 and the output of the TIME_WINDOW 8 operator 821 An ISTREAM operator 823 to be added to the stream eventSequenceAB809.
- FIG. 9 is a diagram illustrating an example of the query time characteristic 210.
- the query time characteristic 210 indicates a time characteristic for each query calculated by the query time characteristic calculation unit 209.
- the entry 902 of the query time characteristic 210 indicates that the delay of the Query event A 802 shown in FIG. That is, the time difference between the event from the sensor node A as the input stream and the event A 804 as the output stream is zero.
- the entry 903 of the query time characteristic 210 indicates that the delay of the query event sequence A 806 is 30 seconds at the maximum. That is, the time difference from eventA804 as an input stream to eventSequenceA806 as an output stream is shown.
- the entry 904 of the query time characteristic 210 indicates that the delay of the Query event B 803 shown in FIG. This shows that the time difference between the event from the sensor node B as the input stream and the event B 805 as the output stream is zero.
- the entry 905 of the query time characteristic 210 indicates that the delay of the query event sequence AB 808 is almost zero for the event stream A 807 shown in FIG. That is, the time difference between event sequence A 807 as an input stream and event sequence AB 809 as an output stream is 0.
- the entry 906 in the query time characteristic 210 indicates that the delay of the query event sequence AB 808 is 30 seconds at the maximum for the event B 805 shown in FIG. That is, the maximum time difference between event B805 as an input stream and eventSequenceAB809 as an output stream is 30 seconds.
- the query time characteristic calculation unit 209 can calculate the delay time in each query or operator as the query time characteristic 210 based on the operator tree 208. Although not shown, it is assumed that the template 110 or query name or identifier corresponding to each entry 902 to 906 is associated with each other.
- FIG. 10 is a screen 1001 showing an example of candidates for editing locations of the template 110.
- the screen 1001 is generated by the time constraint condition determination unit 211 of the query generation unit 109 and transmitted to the terminal 130.
- the terminal 130 displays a screen 1001 on an input / output device (not shown).
- the screen 1001 showing an example of candidates for editing locations of the template 110 in the generation query 206 includes an area 1002 for displaying candidates for editing positions in the generation query 206 and an area 1003 for pointing out specific editing locations.
- the area 1002 is an area for displaying candidates for edit locations in the generated query 206 shown in FIG.
- event Event A 503 for detecting “Event A 1-> Event A 2 within 30 s” and event Sequence AB 505 for detecting “Event B 1 at the same time as Event A 1” are edited.
- the example which became a candidate of is shown.
- the area 1003 suggesting a specific editing point indicates that the query eventSequenceA on the 18th line is delayed by 30 seconds with respect to eventA. Furthermore, in the area 1003, in the query eventSequenceAB on the 32nd line, it is pointed out that the eventSequenceA does not satisfy the time constraint 111 which is a constraint condition because there is a possibility that the eventSequenceA may be delayed by 40s from the eventB.
- the event A1 from the sensor node A is processed by NOW_WINDOW816, the event A1 from the sensor node A is processed by NOW_WINDOW816, and the event A2 from the sensor node A is processed by TIME_WINDOW817 for 30 seconds. Therefore, the event sequence A807 of the output stream is delayed by a maximum of 30 seconds with respect to the input stream eventA.
- the event B of the sensor node B has a delay of up to 10 seconds with respect to the event A of the sensor node A, so that eventSequenceA or eventSequenceAB is delayed up to 40 seconds with respect to the event B To do.
- the time constraint condition determination unit 211 recommends that the terminal 130 edit the query eventSequenceA or the query eventSequenceAB in the template 110.
- FIG. 11 is a flowchart illustrating an example of processing performed by the query generator 205. This process is executed when the query generation unit 109 receives the template call query 203 (1101).
- the query generator 205 reads the received template call query 203 (1102). Next, the query generator 205 specifies the template 110 to be called with reference to the template call query 203. Then, the query generator 205 reads the identified template 110 from the storage 123 (1103).
- the query generator 205 embeds the read template 110 in a place where the template 110 is used in the template call query 203 (1104). Then, the query generator 205 sets an input stream and an output stream corresponding to each template for the template 110 embedded in the template call query 203 (1105).
- the query generator 205 sets parameters (for example, window size, etc.) for the template 110 embedded in the template call query 203 (1106).
- the query generator 205 embeds the template 110 in the template call query 203 received by the above processing, sets input / output and parameters, and outputs the generated query 206 shown in FIG.
- FIG. 12 is a flowchart showing an example of processing performed by the query parser 207. This process is executed when the query generator 205 outputs the generated query 206 (1201).
- the query parser 207 reads the generated query 206 output from the query generator 205 (1202).
- the query parser 207 generates the operator tree 208 as shown in FIG. 8 by performing lexical analysis and syntax analysis of the generation query 206 (1203).
- the operator tree 208 that actually processes the stream data is calculated by the query parser 207 based on the template call query 203.
- FIG. 13 is a flowchart illustrating an example of processing performed by the query time characteristic calculation unit 209. This process is executed when the query parser 207 outputs the operator tree 208 (1301).
- the query time characteristic calculation unit 209 includes a double loop of a loop (1302 to 1309) that performs processing for each operator tree 208 and a loop (1303 to 1308) that sequentially performs processing in units of queries in the operator tree 208. .
- the query time characteristic calculation unit 209 reads one query in the operator tree 208. If the query includes a JOIN operator or a DSTREAM operator, the query time characteristic calculation unit 209 delays the output stream with respect to the input stream according to the window size value (1304).
- the query time characteristic calculation unit 209 calculates a time (delay time) in which the output stream is delayed with respect to the input stream according to the window size.
- the query time characteristic calculation unit 209 delays the output stream with respect to the input stream based on the output interval set in RSTREAM (1305). That is, the query time characteristic calculation unit 209 calculates a time (delay time) in which the output stream is delayed with respect to the input stream according to the output interval.
- the query time characteristic calculation unit 209 sets the delay time of the output stream with respect to the input stream to 0 (1306).
- the query time characteristic calculation unit 209 adds the relationship of the delay time of the output stream to the input stream calculated by the query as an entry of the query time characteristic 210 (1307).
- the query time characteristic calculation unit 209 executes the above processing for each query, and when a plurality of operator trees 208 are generated, the processing is performed for the next operator tree 208 when the above processing is completed for one operator tree. When the above processing is completed for all operator trees 208, the query time characteristic 210 is output and the process is terminated.
- the delay time set for the operator included in the query of the operator tree 208 is generated as the query time characteristic 210 for each query corresponding to the template 110.
- FIG. 14A is a diagram illustrating an example of a query including a JOIN operator related to delay calculation.
- the illustrated query Q1 (1401) shows an example in which stream data is received from each sensor node in two 30-second windows, and stream data combined by the JOIN operator is output.
- FIG. 14B is a diagram illustrating an example of an operator tree 1402 including a JOIN related to delay calculation.
- the operator tree 1402 is generated from the query Q1 (1401) shown in FIG. 14A by the query parser 207 of the stream data processing development server 107.
- the two window operators 1403 and 1404 each accept an input stream with a window size of 30 seconds and output it to the JOIN operator 1405.
- the JOIN operator 1405 combines the input streams from the two window operators 1403 and 1404 and outputs them as ISTREAM 1406.
- FIG. 14C is a diagram illustrating an example of calculation of the delay of the JOIN operator of the query Q1 illustrated in FIG. 14A according to the first embodiment of this invention.
- the stream data A1 is first input to the window operator 1403, and the stream data A2 is input to the window operator 1404 after 30 seconds.
- the JOIN operator 1405 combines the stream data A1 and A2 received as input streams from the window operators 1403 and 1404 having a window size of 30 seconds, and outputs them as one stream data.
- the delay of the output stream with respect to the input stream is 30 seconds at the maximum.
- FIG. 15A is a diagram illustrating an example of a query including an RSTREAM operator related to delay calculation.
- the illustrated query Q2 (1501) shows an example in which stream data is received from a single sensor node in a 10-second window, and a stream aggregated every 10 seconds by an RSTREAM operator is output.
- FIG. 15B is a diagram illustrating an example of an operator tree 1502 including an RSTREAM regarding delay calculation.
- the operator tree 1502 is generated from the query Q2 (1501) shown in FIG. 15A by the query parser 207 of the stream data processing development server 107.
- the window operator 1503 receives an input stream with a window size of 10 seconds and outputs it to the GROUP_BY operator 1504.
- the GROUP_BY operator 1504 collects and outputs the input streams received from the window operator 1503.
- the STRREAM operator 1505 outputs the input stream from the GROUP_BY operator 1504 every 10 seconds.
- FIG. 15C is a diagram illustrating an example of calculation of the delay of the RSTREAM operator of the query Q2 illustrated in FIG. 15A according to the first embodiment of this invention.
- stream data A1, A2, and A3 are sequentially input to the window operator 1503 within 0 to 10 seconds.
- the stream data input to the window operator 1503 is collected into one group and input to the RSTREAM operator 1505.
- the STRREAM operator 1505 outputs stream data grouped every 10 seconds as stream data A1 to A3 at the time of 10 seconds.
- the delay of the output stream with respect to the earliest stream data A1 is 10 seconds.
- FIG. 16A is a diagram illustrating an example of a query including a DSTREAM operator related to delay calculation.
- the illustrated query Q3 (1601) shows an example in which stream data is received from one sensor node in a 5-second window, and stream data deleted from the aggregated stream is output.
- FIG. 16B is a diagram illustrating an example of an operator tree 1602 including DSTREAM relating to delay calculation.
- the operator tree 1602 is generated from the query Q3 (1601) shown in FIG. 16A by the query parser 207 of the stream data processing development server 107.
- the window operator 1603 receives an input stream with a window size of 5 seconds and outputs it to the GROUP_BY operator 1604.
- the GROUP_BY operator 1604 aggregates and outputs the input streams received from the window operator 1603.
- the DSTREAM operator 1605 outputs the stream data deleted from the input stream of the GROUP_BY operator 1604 as stream data at the current time.
- FIG. 16C is a diagram illustrating an example of calculation of the delay of the DSTREAM operator of the query Q3 illustrated in FIG. 16A according to the first embodiment of this invention.
- the stream data A1 is sequentially input to the window operator 1603 within 5 seconds, and the stream data A1 after 5 seconds is deleted.
- the stream data input to the window operator 1603 is collected into one group and input to the DSTREAM operator 1605.
- the DSTREAM operator 1605 outputs the stream data deleted by the window operator 1603 as stream data A1 at the time of 5 seconds.
- the delay of the output stream with respect to the input stream is 5 seconds.
- FIG. 17 is a flowchart illustrating an example of processing performed by the time constraint condition determination unit 211. This process is executed when the query time characteristic 210 is output from the query time characteristic calculation unit 209 (1701).
- the time constraint condition determination unit 211 includes two loops (1702 to 1710) that perform processing for each template 110 in the template call query 203 and loops (1703 to 1709) that perform processing in units of time constraints 111 in the template 110. Has a heavy loop.
- the time constraint condition determination unit 211 reads the template call query 203 and specifies the template 110 to be called.
- the time constraint condition determination unit 211 reads the time constraint 111 corresponding to the identified template 110 from the storage 123. Further, the time constraint condition determination unit 211 acquires a query time characteristic 210 corresponding to the identified template 110.
- the time constraint condition determination unit 211 reads the input stream time characteristic 204 that has been input and the generated generation query 206.
- the time constraint condition determination unit 211 sets the value described in the template call query 203 as the corresponding parameter (1704).
- the time constraint condition determination unit 211 calculates the time characteristics of the input stream and the output stream in the template 110 as the time characteristics of the template processing from the input stream time characteristics 204 and the query time characteristics 210 for the template 110 (1705). .
- the time constraint condition determination unit 211 adds the input stream time characteristic 204 to the query time characteristic 210 of the template 110 to obtain the delay time of the output stream with respect to the input stream in the template 110. calculate. Note that the delay time of the input stream time characteristic 204 may be added only to the query time characteristic 210 of the template 110 that is affected by the input stream time characteristic 204.
- step 1705 a value obtained by adding a delay time corresponding to the input stream time characteristic 204 to a delay time specific to the template 110 can be calculated as a time characteristic of template processing.
- the time constraint condition determination unit 211 determines whether or not the time characteristic of the template process calculated in step 1705 satisfies the time constraint 111 (1706). If the time characteristic of the template processing satisfies the time constraint 111, the process proceeds to step 1709 or 1710 and the above processing is repeated for the next time constraint 111 or template 110.
- step 1708 the time constraint condition determination unit 211 outputs the portion corresponding to the template 110 in the generated query 206 as a candidate for an edit location and outputs it to the area 1003 indicating the edit location shown in FIG. 10.
- the time constraint condition determination unit 211 may use the template 110 as a candidate for a part to be edited, and add information regarding the time characteristics (delay) of template processing.
- the time constraint condition determination unit 211 may output the name of the template 110 as an edit location and add a time characteristic of template processing for the time constraint 111.
- the time constraint condition determination unit 211 calculates the time characteristics of the template processing that takes the input stream time characteristics 204 into consideration for each template 110, and when the time characteristics of the template processing do not satisfy the time constraints 111,
- the template 110 can be specified as a candidate for an edit location and output as a candidate for an edit location.
- FIG. 18 is a diagram illustrating an example of processing performed by the time constraint condition determination unit 211 regarding delay.
- the time characteristic 1801 of the template processing is the setting of the input stream time characteristic 204 in which the event of the sensor node A (event A) and the event of the sensor node B (event B) shown in FIG.
- An example applied to the template 110-2 (autocorrelation template call 403) of eventSequenceA (806) is shown.
- the delay of the output stream (eventSequenceA) with respect to the event A of the input stream is as shown in FIG. As indicated by entry 906, the maximum is 30 seconds.
- the time constraint condition determination unit 211 outputs the portion corresponding to the correlation analysis template in the generated query 206 to the region 1003 shown in FIG.
- the eventSequenceAB which is the autocorrelation template 110, does not satisfy the time constraint 111 and is output to the area 1003 as a candidate for an edited part.
- the query developer 201 can easily grasp a candidate for an edit location that does not satisfy the time constraint 111 that is a constraint condition by referring to the region 1003 and the region 1002 displayed on the screen 1001 of the terminal 130.
- the query developer 201 can know the part that does not satisfy the constraint condition and the value in the area 1003. It becomes possible to specify easily.
- the query developer 201 can satisfy the constraint condition by reviewing the window size of the template 110.
- the input stream time characteristic 204 set by the query developer 201 and the template 110 selected by the query developer 201 are input to the query generation unit 109, and the query generation unit 109 inputs the template 110.
- a query time characteristic 210 for each time is calculated, and further, a time characteristic of template processing that takes into account the time characteristic 204 of the input stream is calculated.
- the query generation unit 109 compares the time characteristic of the template process with the time characteristic 204 of the input stream with the time constraint 111 (constraint condition) set by the template developer 202, and the time characteristic of the template process is determined. Determine whether the constraints are met.
- the query generation unit 109 identifies the template 110 whose template processing time characteristics do not satisfy the constraint condition, and outputs the template 110 to the terminal 130.
- the query developer 201 using the template 110 can determine whether or not the template 110 has been edited and specify the editing location in template-based query development in stream data processing based on constraints such as time constraints. It is possible to facilitate the development of queries by performing the above with a computer.
- the input stream time characteristic 204 indicating the time delay of the input stream is used as the input stream characteristic information.
- the second embodiment an example in which the time interval of the input stream data is used as the characteristic information of the input stream instead of the time delay of the first embodiment.
- the time constraint 2400 related to the data interval is used instead of the time constraint 111 related to the delay in the first embodiment, and the query time characteristic calculation unit 209 related to the delay and the time constraint condition determination unit 211 related to the delay in the first embodiment. Is replaced with a query time characteristic calculation unit 1903 related to the data interval and a time constraint condition determination unit 1905 related to the data interval. Other configurations are the same as those in the first embodiment. Further, the query developer 201 inputs a time characteristic 2301 related to the data interval to the query generation unit 109 instead of the input stream time characteristic related to the delay.
- FIG. 19 is a block diagram showing the input / output relationship of the computer system.
- the query generation unit 109 receives a template call query 2101 and a time characteristic related to a data interval (hereinafter, input stream time characteristic) 2301 from the terminal 130 operated by the query developer 201.
- the query generator 205 receives the template call query 2101, acquires the template 110 specified by the query 2101 from the storage 123, and generates a query (generation query 2201) including the operator defined in each template 110.
- the query parser 207 analyzes the generated query 2201 and generates an operator tree 2500 indicating the connection relationship between operators.
- a query time characteristic calculation unit (hereinafter referred to as a query time characteristic calculation unit) 2800 related to the data interval tracks the flow of data of the operator in the template 110 from the analyzed operator tree 2500, as will be described later.
- a query time characteristic 2600 related to the data interval is calculated.
- a time constraint condition determination unit (hereinafter referred to as a time constraint condition determination unit) 3000 regarding the data interval has a query time characteristic 2600 regarding the calculated data interval and an input stream time regarding the input data interval. A time characteristic of the template processing taking the characteristic 2301 into consideration is calculated. Then, the time constraint condition determination unit 3000 determines whether or not the time constraint of the template processing and the time constraint 2400 regarding the data interval set in advance for each template 110 are satisfied.
- the time constraint condition determination unit 3000 identifies the part of the template 110 that needs to be edited and serves as the template editing part candidate 212 as the terminal 130. Output to.
- the query generation unit 109 uses the template call query 203 generated by the query developer 201 with the input stream time characteristic 2301 related to the data interval set by the query developer 201. If the time constraint 2400 regarding the data interval set by the template developer 202 is not satisfied, the part to be edited in the template 110 and the parameter to be reviewed are specified.
- the query developer 201 when the query developer 201 develops a query using one or more templates 110, the query developer 201 can quickly generate a query that satisfies the time constraint set by the template developer 202.
- FIGS. 20A and 20B an example of the template 110 used in the second embodiment is shown in FIGS. 20A and 20B.
- an example is shown in which two types of templates 110-1A and 110-2A of event total 2001 and node total physician 2002 are used.
- the generic name of the template is indicated by reference numeral “110”.
- FIG. 20A is a diagram showing an example of a template 110-1A for totaling events.
- the template 110-1A sets the ID (nodeId) of the sensor node that acquires the stream data and the Id (eventId) of the event that acquires the data, receives the stream data in the window, and sets the sensor node ID and the event ID. Is aggregated (partial aggregation). Then, the template 110-1A outputs a result aggregated every time specified by the window size.
- FIG. 20B is a diagram showing an example of a node-by-node aggregation template 110-2A.
- the template 110-2A sets the ID (nodeId) of the sensor node that acquires the stream data, receives the stream data in the window, and aggregates (totally aggregates) each sensor node ID. Then, the template 110-2A outputs a result aggregated every time specified by the window size.
- FIG. 21 is a diagram showing an example of the template call query 2101.
- a template call query 2101 according to the second embodiment shows an example in which stream data from sensor nodes is aggregated and output for each event at intervals of 2 minutes, and a result of aggregation for each sensor node is output at intervals of 1 minute.
- the template call query 2101 is first defined as a sensor node event (input stream) definition 2111, in which an input stream includes a sensor node ID, a stream data time stamp, an event ID, and a log.
- event totaling template call 2112 using the event totaling template 110-1A shown in FIG. 20A, events from the sensor node are received as an input stream in a 120 second window, and partial at 60 second intervals. Output the aggregated result.
- the node-by-node aggregation template call 2113 accepts countPerEvent as an input stream in a 60-second window using the node-by-node aggregation template 110-2A shown in FIG. 20B. Then, the node-by-node aggregation template call 2113 outputs the result of aggregation at intervals of 60 seconds.
- FIG. 22 is a diagram illustrating an example of a generation query 2201 generated from the template call query 2101 by the query generator 205.
- an input stream is defined by a sensor node event (input stream) definition (2211) corresponding to the sensor node event (input stream) definition 2111 of FIG.
- totaling for each event (2212) is a query corresponding to the totaling event calling template 2112 shown in FIG. 21, and an event from a sensor node is accepted as an input stream in a 120-second window, and the input stream is input at 120-second intervals. The result of totaling is output.
- tabulation for each node (2213) corresponds to node-by-node tabulation template call 2113 in FIG. 21, and accepts countPerEvent, which is an output stream of the tabulation template for each event, as an input stream in a 60-second window. Then, the query outputs the result of counting the input streams at 60-second intervals.
- FIG. 23 is a diagram illustrating an example of the input stream time characteristic 2301 related to the data interval.
- the input stream time characteristic 2301 relating to the illustrated data interval is set such that events from the sensor node occur at intervals of 10 seconds.
- the input stream time characteristic 2301 regarding the data interval is set by the query developer 201 from the terminal 130.
- FIG. 24 is a diagram illustrating an example of the time constraint 2400 regarding the data interval.
- the time constraint 2400 regarding the data interval is set in advance by the template developer 202 on the terminal 130.
- the time constraint 2400 regarding the data interval includes a template name 701 and a time constraint 702.
- the time constraint 2400 regarding the data interval can be set for each template 110.
- the time constraint 2402 of the aggregation per node indicates that the time of the input stream ($ input1) is within the window size.
- FIG. 25 is a diagram illustrating an example of the operator tree 2500.
- the operator tree 2500 has a tree structure generated by the query parser 207 analyzing the generated query 2201.
- the entire generation query 2201 is identified by “STREAM: event” (2501).
- Query countPerEvent (2502) corresponds to the query “Aggregate by event” (2212) shown in FIG.
- Query countPerNode corresponds to the query “Aggregate by Node” (2212) shown in FIG.
- FIG. 26 is a diagram illustrating an example of the query time characteristic 2600.
- a query time characteristic 2600 indicates a time characteristic of a query unit calculated by the query time characteristic calculation unit 209.
- the entry 2602 of the query time characteristic 2600 indicates that the data interval of the Query countPerEvent (2502) shown in FIG. 25 is 120 seconds at the maximum.
- the entry 2603 of the query time characteristic 2600 indicates that the data interval of the Query countPerNode (2502) shown in FIG. 25 is a maximum of 60 seconds. That is, the time difference from eventA804 as an input stream to eventSequenceA806 as an output stream is shown.
- the query time characteristic calculation unit 2800 can calculate the processing frequency of stream data in each query or operator from the query time characteristic 2600 based on the operator tree 2500. Although not shown, it is assumed that the template 110 or query name or identifier corresponding to each entry 2601 to 2603 is associated with each other.
- FIG. 27 shows a screen 1011 that shows an example of candidate edit locations of the template 110.
- the screen 1011 is the same as that in FIG. 10 of the first embodiment, and is generated by the time constraint condition determination unit 211 of the query generation unit 109 and transmitted to the terminal 130.
- the terminal 130 displays a screen 1011 on an input / output device (not shown).
- the screen 1011 that shows an example of the editing part candidate of the template 110 in the generation query 2201 includes an area 1012 for displaying the editing part candidate in the generation query 2201 and an area 1013 for indicating a specific editing part.
- the area 1012 is an area for displaying candidates for edit locations in the generated query 2201 shown in FIG.
- an example is shown in which, in the generated query 2201 shown in FIG.
- the area 1013 that suggests a specific edit location satisfies the constraint time constraint 2400 ($ windowSize> $ input) with the query countPerEvent on the 10th row at 120s intervals and the query countPerNode on the 17th row at 60s intervals. Not pointed out.
- events from the sensor node are input as an input stream at 10-second intervals, received in a 120-second window, aggregated at 120-second intervals by the RSTREAM operator 2505, and a stream of the time at the time of output ( output as countPerEvent).
- the RSTREAM operator 2510 aggregates the streams (countPerEvent) received at 120-second intervals, aggregates the streams for each sensor node, and outputs them as countPerNode. However, since the aggregation interval is 60 seconds, the aggregation calculation is performed every time. It cannot be executed.
- the time constraint condition determination unit 3000 recommends that the terminal 130 edit the query countPerEvent 221 that uses the 120-second window operator 2503 in the template 110.
- FIG. 28 is a flowchart illustrating an example of processing performed by the query time characteristic calculation unit 2800. This process is executed when the query parser 207 outputs the operator tree 2500 (2801).
- the query time characteristic calculation unit 2800 includes a double loop of a loop (2802 to 2808) that performs processing for each operator tree 2500 and a loop (2803 to 2807) that sequentially performs processing in units of queries in the operator tree 2500. .
- the query time characteristic calculation unit 2800 reads one query in the operator tree 2500.
- the query time characteristic calculation unit 2800 uses the data interval of the output stream as the data interval of the input stream and the maximum value of the output interval of the RSTREAM as the data interval ( 2804).
- the query time characteristic calculation unit 2800 sets the data interval of the input stream and the data interval of the output stream to be the same (2805).
- the query time characteristic calculation unit 2800 adds the relationship between the data interval between the input stream and the output stream calculated by the query as an entry of the query time characteristic 2600 (2806).
- the query time characteristic calculation unit 2800 executes the above processing for each query, and when a plurality of operator trees 2500 are generated, the processing is performed for the next operator tree 2500 when the above processing is completed for one operator tree. When the above processing is completed for all the operator trees 2500, the query time characteristic 2600 is output and the processing ends.
- FIG. 29A is a diagram illustrating an example of a query including an RSTREAM operator regarding calculation of a data interval.
- the illustrated query Q2 (2901) shows an example in which stream data is received from a sensor node by a 10-second window operator, and a stream aggregated by the RSTREAM operator at 10-second intervals is output.
- FIG. 29B is a diagram illustrating an example of an operator tree 1502 including an RSTREAM regarding calculation of a data interval.
- the operator tree 1502 is generated from the query Q2 (2901) shown in FIG. 29A by the query parser 207 of the stream data processing development server 107.
- the window operator 2903 receives the input stream with a window size of 10 seconds and outputs it to the GROUP_BY operator 2904.
- the GROUP_BY operator 1504 collects and outputs the input streams received from the window operator 1503.
- the STRREAM operator 1505 outputs the input stream from the GROUP_BY operator 1504 as current time data at 10-second intervals.
- FIG. 29C is a diagram showing an example of calculation of the data interval of the RSTREAM operator of the query Q2 shown in FIG. 29A.
- stream data A1, A2, and A3 are sequentially input to the window operator 2903 within 0 to 10 seconds.
- the stream data input to the window operator 2903 is collected into one group (2904) and input to the RSTREAM operator 2905.
- the RSTREAM operator 2905 outputs stream data grouped at intervals of 10 seconds as stream data A1 to A3 at the time of 10 seconds.
- FIG. 30 is a flowchart illustrating an example of processing performed by the time constraint condition determination unit 3000. This process is executed when the query time characteristic 2600 is output from the query time characteristic calculation unit 2800 (3001).
- the time constraint condition determination unit 3000 includes two loops (3002 to 3010) for performing processing for each template 110 in the template call query 2101 and loops (3003 to 3009) for performing sequential processing in units of time constraints 2400 in the template 110. Has a heavy loop.
- the time constraint condition determination unit 3000 reads the template call query 2101 and identifies the template 110 to be called.
- the time constraint condition determination unit 3000 reads the time constraint 2400 corresponding to the identified template 110 from the storage 123. Further, the time constraint condition determination unit 3000 acquires the query time characteristic 2600 corresponding to the identified template 110.
- the time constraint condition determination unit 3000 reads the input stream characteristic 2301 that has been input and the generated query 2201 that has been generated.
- the time constraint condition determination unit 3000 sets the value described in the template call query 2101 as the corresponding parameter (3004).
- the time constraint condition determination unit 3000 calculates the time characteristic of the template processing for the template 110 from the input stream time characteristic 2301 and the query time characteristic 2600 (3005).
- the time constraint condition determination unit 3000 calculates the data interval between the input stream and the output stream when the input stream time characteristic 2301 is applied in the template 110.
- the input stream time characteristic 2301 may be applied only to the query time characteristic 2600 of the template 110 that is affected by the input stream time characteristic 2301.
- the time constraint condition determination unit 3000 determines whether or not the time characteristic of the template process calculated in step 3005 satisfies the time constraint 2400 (3006). If the time characteristic of the template processing satisfies the time constraint 2400, the process proceeds to step 3009 or 3010 and the above processing is repeated for the next time constraint 2400 or template 110.
- step 3008 the time constraint condition determination unit 3000 outputs the portion corresponding to the template 110 in the generated query 2201 as a candidate for an editing portion and outputs it to the area 1013 indicating the editing portion shown in FIG.
- the time constraint condition determination unit 3000 may use the template 110 as a candidate for a location to be edited, and add information regarding the time characteristics (data interval) of the template processing.
- the time constraint condition determination unit 3000 may output the name of the template 110 as an edit location and add the template processing time characteristic for the time constraint 2400.
- the time constraint condition determination unit 3000 calculates the time characteristics (data interval) of the template processing in consideration of the input stream time characteristics 2301 for each template 110, and the time characteristics of the template processing do not satisfy the time constraints 2400.
- the target template 110 can be specified as a candidate for an edit location and output as a candidate for an edit location.
- FIG. 31 is a diagram illustrating an example of processing performed by the time constraint condition determination unit 3000 regarding the data interval.
- a time characteristic (data interval) 3101 of the template processing indicates an example in which the setting of the input stream time characteristic 2301 illustrated in FIG. 23 is applied to the template 110 (aggregationPerEvent (3102)) of the Query countPerEvent 2212.
- the data interval of the input stream is 10 seconds
- the Query countPerEvent 2212 aggregates data at intervals of 120 seconds and outputs the stream.
- the time constraint 2400 is $ WindowSize> $ input
- the window size must be set larger than the data interval of the input stream.
- the input stream is at intervals of 120 seconds, so the time constraint 2400 cannot be satisfied.
- the time constraint condition determination unit 3000 outputs the portion corresponding to the countPerEvent 2212 in the generated query 2201 to the area 1013 shown in FIG.
- the query developer 201 can easily grasp a candidate for an edited portion that does not satisfy the time constraint 2400 that is a constraint condition by referring to the region 1013 and the region 1012 displayed on the screen 1011 of the terminal 130.
- the query developer 201 can know the part that does not satisfy the constraint condition and the value in the area 1013. It becomes possible to specify easily.
- the time constraint 2400 is not satisfied because the data interval of countPerEvent 2212 is 120 seconds. Therefore, the query developer 201 can satisfy the time constraint 2400 by reviewing the data interval of the template 110 of countPerEvent 2212.
- the input stream time characteristic 2301 set by the query developer 201 and the template 110 selected by the query developer 201 are input to the query generation unit 109, and the query generation unit 109 receives the template 110.
- a query time characteristic 2600 for each time is calculated, and further, a time characteristic of template processing taking into account the input stream time characteristic 2301 is calculated.
- the query generation unit 109 compares the time characteristic of the template process with the time constraint 2400 (constraint condition) set by the template developer 202, and determines whether the time characteristic of each template process satisfies the constraint condition. Determine.
- the query generation unit 109 identifies the template 110 whose template processing time characteristics do not satisfy the constraint condition, and outputs the template 110 to the terminal 130.
- the query developer 201 using the template 110 can determine whether or not the template 110 has been edited and specify the editing location in template-based query development in stream data processing based on constraints such as time constraints. It is possible to facilitate the development of queries by performing the above with a computer.
- the template developer 202 generates a definition for the time characteristic of the template 110 and stores it in the storage 123 as the template definition time characteristic 3200.
- the time constraint condition determination unit 211 replaces the query time characteristic 210 with the template definition time characteristic 3200 and performs comparison with the time constraint 111.
- Other configurations are the same as those of the first embodiment.
- the autocorrelation template 110-2 shown in FIG. 3B of the first embodiment is the query eventSequenceA 806 shown in FIG. 8, and the output of the NOW_WINDOW operator 816 and the TIME_WINDOW operator 817 of 30 seconds is combined by the JOIN operator 818.
- the event Sequence A 806 corresponds to the generation query 206 503 in FIG. 5 and is a query that detects the event A2 within 30 seconds after the event A1 is detected.
- the template developer 202 When a 30-second window is used, there is no correlation with an event 30 seconds after the present, and there may be only a correlation with an event 30 seconds before the present. .
- Such an autocorrelation template does not need to maintain a 30 second window. Therefore, in such a case, the template developer 202 generates a template definition time characteristic 3200 and changes the time constraint of the autocorrelation template 110-2.
- FIG. 33 is a diagram showing an example of the template definition time characteristic 3200.
- the template definition time characteristic 3200 includes a template name 3201 and a time constraint 3202 and is set for each template 110.
- the template definition time characteristic 3200 is information including a parameter relating to a time set by the template developer 202 according to the actual operation of the template 110.
- FIG. 34 is a flowchart illustrating an example of processing performed by the time constraint condition determination unit 211.
- step 3401 and step 3402 are added between step 1705 and step 1706 shown in FIG. 17 of the first embodiment, and other processes are the same as those in the first embodiment.
- step 1705 the time constraint condition determination unit 211 determines the time characteristics of the input stream and the output stream in the template 110 from the input stream time characteristics 204 and the query time characteristics 210 for the template 110, and the time characteristics of the template processing. Calculate as
- step 3401 the time constraint condition determination unit 211 determines whether or not the template definition time characteristic 3200 corresponding to the template 110 exists in the storage 123. If the template definition time characteristic 3200 does not exist, the time constraint condition determination unit 211 proceeds to step 1706 and performs the same processing as in the first embodiment.
- the time constraint condition determination unit 211 reads the template definition time characteristic 3200 corresponding to the template 110 in step 3402. Then, the time constraint condition determination unit 211 overwrites the calculated template processing time characteristic with the template definition time characteristic 3200.
- the time constraint condition determination unit 211 determines whether or not the content of the template definition time characteristic 3200 satisfies the time constraint 111.
- FIG. 35 is a diagram illustrating an example of processing performed by the time constraint condition determination unit 211.
- the template processing time characteristic 1802 is overwritten with the template processing time characteristic 1802.
- eventA-eventSequenceA 0
- the template 110 can be used in an environment where the time characteristic is limited. As a result, the environment for using the template 110 can be expanded, and the development of a query for stream data can be facilitated.
- this invention is not limited to the above-mentioned Example, Various modifications are included.
- the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described.
- a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment.
- any of the additions, deletions, or substitutions of other configurations can be applied to a part of the configuration of each embodiment, either alone or in combination.
- each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
- each of the above-described configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function.
- Information such as programs, tables, and files that realize each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
- control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
According to the present invention, a computer: receives both characteristic information about an input stream, and a template call query that includes one or more templates describing predetermined processing for a stream data process; generates stream data processing queries from the template call query; generates an operator tree from each stream data processing query; calculates inter-operator time characteristics from each operator tree, which is generated from a respective stream data processing query, said calculated inter-operator time characteristics being set as query time characteristics of the stream data processing query; calculates time characteristics of the template process performed for each template, on the basis of the query time characteristics of each stream data processing query generated for the template and on the basis of the characteristic information about the input stream; and determines whether the calculated time characteristics of each template process satisfy a constraint condition preset for the template.
Description
本発明は、ストリームデータを処理するクエリをテンプレートから生成する技術に関する。
The present invention relates to a technique for generating a query for processing stream data from a template.
ストリームデータ処理は、多数のセンサなどからのデータや、金融機関などの決済や売買に関するデータを処理する技術として知られている。ストリームデータ処理では、まずクエリをシステムに登録しておき、データが到来するとクエリが継続的に実行される。このクエリを記述する言語の好適な例として、CQL(Continuous QueryLanguage)が知られている。
Stream data processing is known as a technique for processing data from a large number of sensors, etc., and data related to settlement and trading at financial institutions. In stream data processing, a query is first registered in the system, and the query is continuously executed when data arrives. CQL (Continuous QueryLanguage) is known as a preferred example of a language for describing this query.
ストリームデータ処理の利用範囲を拡大するために、CQLで記述したストリームデータ処理のクエリをテンプレート化する技術が知られている(例えば、特許文献1)。
In order to expand the use range of stream data processing, a technique for creating a template for a stream data processing query described in CQL is known (for example, Patent Document 1).
このテンプレートの技術では、予めテンプレートの入力と、データソースのスキーマを対応付けておく。そして、開発者が選択したテンプレートに対して、計算機が入力ストリームの候補を提示することで、テンプレートベースのクエリ開発を支援する。
In this template technology, template input and data source schema are associated in advance. The template presents the input stream candidates for the template selected by the developer, thereby supporting template-based query development.
しかしながら、ストリームデータ処理では、入力ストリームとテンプレートの入力でスキーマが合っているだけでなく、テンプレートが想定している時間的制約(許容できる遅延、間隔)を、入力ストリームが満足する必要がある。
However, in stream data processing, not only the input stream and template input match the schema, but also the input stream needs to satisfy the time constraints (acceptable delay and interval) assumed by the template.
このため、上記特許文献1の技術では、必要に応じてテンプレートの修正や、パラメータ値の見直しが必要になる。しかしながら、テンプレートのユーザが、当該テンプレートに対応するデータソースのスキーマに対して、時間制約を満たしているのか否かを判定することは難しい、という問題があった。また、テンプレートの編集やパラメータ値の見直しが必要になった場合、ユーザが編集または見直しを行う部分を容易に特定することは難しい、という問題があった。
For this reason, in the technique of the above-mentioned Patent Document 1, it is necessary to correct the template and review the parameter values as necessary. However, there is a problem that it is difficult for the user of the template to determine whether or not the schema of the data source corresponding to the template satisfies the time constraint. In addition, when it is necessary to edit a template or review parameter values, there is a problem that it is difficult for a user to easily specify a portion to be edited or reviewed.
本発明は、プロセッサとメモリとを備えた計算機で、ストリームデータ処理のクエリの開発を支援するクエリ開発支援方法であって、前記計算機が、前記ストリームデータ処理の所定の処理を予め記述した1以上のテンプレートを含むテンプレート呼び出しクエリを受け付ける第1のステップと、前記計算機が、前記ストリームデータ処理の入力ストリームの特性情報を受け付ける第2のステップと、前記計算機が、前記テンプレート呼び出しクエリからストリームデータ処理のクエリを生成する第3のステップと、前記計算機が、前記ストリームデータ処理のクエリからオペレータツリーを生成する第4のステップと、前記計算機が、前記オペレータツリーから前記テンプレートのクエリ単位でオペレータ間の時間特性をクエリ時間特性として算出する第5のステップと、前記計算機が、前記クエリ時間特性と、前記入力ストリームの特性情報から前記テンプレート毎にテンプレート処理の時間特性を算出する第6のステップと、前記計算機が、前記テンプレート処理の時間特性が予め設定したテンプレートの制約条件を満足しているかを判定する第7のステップと、を含む。
The present invention is a query development support method for supporting the development of a query for stream data processing in a computer comprising a processor and a memory, wherein the computer describes one or more predetermined processes for the stream data processing in advance. A first step of accepting a template call query including a template of the second, a second step of accepting characteristic information of an input stream of the stream data processing by the computer, and a calculator of stream data processing from the template call query. A third step of generating a query; a fourth step in which the computer generates an operator tree from the stream data processing query; and a time period between operators in query units of the template from the operator tree. Characteristics as query time characteristics A sixth step of calculating the time characteristic of template processing for each template from the query time characteristic and the characteristic information of the input stream, and the computer And a seventh step of determining whether or not the time characteristic of the template processing satisfies a preset template constraint condition.
本発明によれば、ストリームデータ処理におけるテンプレートを用いたクエリの開発において、時間的制約などの制約条件に基づいて、テンプレートの編集の有無の判定や、編集箇所の特定を計算機で行うことにより、クエリの開発を容易にすることができる。
According to the present invention, in the development of a query using a template in stream data processing, based on a constraint condition such as a temporal constraint, by determining whether or not the template has been edited and specifying the editing location by a computer, Query development can be facilitated.
以下、本発明の一実施形態について添付図面を用いて説明する。
Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.
図1は、第1の実施例の計算機システムの一例を示すブロック図である。ストリームデータの処理を実行するストリーム処理実行サーバ101は、ネットワーク108を介して、テンプレート110に基づいてストリーム処理クエリを生成するストリームデータ処理開発サーバ107と、テンプレート110の操作等を行う端末130と、ストリームデータを供給するデータソース140に接続される。なお、データソース140としては、例えば、センサやセンサネットワークシステム等を採用することができる。
FIG. 1 is a block diagram illustrating an example of a computer system according to the first embodiment. A stream processing execution server 101 that executes processing of stream data, via a network 108, a stream data processing development server 107 that generates a stream processing query based on the template 110, a terminal 130 that operates the template 110, and the like, Connected to a data source 140 that supplies stream data. As the data source 140, for example, a sensor, a sensor network system, or the like can be employed.
ストリーム処理実行サーバ101は、演算処理を行うCPU104と、データやプログラムを保持するメモリ102と、プログラムやデータを格納するストレージ105と、ネットワーク108に接続されるI/Oインターフェース106と、を有する。メモリ102にはプログラムとしてのストリームデータ処理エンジン103がロードされて、CPU104によって実行される。なお、ストリームデータ処理エンジン103は、ストレージ105に格納することができる。
The stream processing execution server 101 includes a CPU 104 that performs arithmetic processing, a memory 102 that stores data and programs, a storage 105 that stores programs and data, and an I / O interface 106 connected to a network 108. A stream data processing engine 103 as a program is loaded into the memory 102 and executed by the CPU 104. Note that the stream data processing engine 103 can be stored in the storage 105.
ストリームデータ処理エンジン103は、後述するように、ストリームデータ処理開発サーバ107で生成されたストリームデータ処理クエリを継続的に実行し、データソース140から受信したストリームデータを処理する。
The stream data processing engine 103 continuously executes the stream data processing query generated by the stream data processing development server 107 to process the stream data received from the data source 140, as will be described later.
ストリームデータ処理クエリとしては、例えば、上述のCQL(Continuous QueryLanguage)を用いることができる。以下では、CQLでストリーム処理を行うクエリを記述する例を示す。
As the stream data processing query, for example, the above-mentioned CQL (Continuous QueryLanguage) can be used. In the following, an example is described in which a query for performing stream processing in CQL is described.
ストリームデータ処理開発サーバ107は、演算処理を行うCPU121と、データやプログラムを保持するメモリ122と、プログラムやデータを格納するストレージ123と、ネットワーク108に接続されるI/Oインターフェース124と、を有する。メモリ122にはプログラムとしてのクエリ生成部109がロードされて、CPU121によって実行される。
The stream data processing development server 107 includes a CPU 121 that performs arithmetic processing, a memory 122 that stores data and programs, a storage 123 that stores programs and data, and an I / O interface 124 connected to the network 108. . A query generation unit 109 as a program is loaded into the memory 122 and executed by the CPU 121.
ストレージ123には、テンプレート110と、遅延に関する時間制約(以下、時間制約)111及び生成されたストリーム処理クエリ501が格納される。なお、プログラムとしてのクエリ生成部109は、ストレージ123に格納することができる。
The storage 123 stores a template 110, a delay time constraint (hereinafter, time constraint) 111, and a generated stream processing query 501. Note that the query generation unit 109 as a program can be stored in the storage 123.
ここで、クエリ生成部109の各機能部はプログラムとしてメモリ122にロードされる。CPU121は、各機能部のプログラムに従って処理を行うことによって、所定の機能を提供する機能部として稼働する。例えば、CPU121は、クエリ生成プログラムに従って処理することでクエリ生成部109として機能する。他のプログラムについても同様である。さらに、CPU121は、各プログラムが実行する複数の処理のそれぞれの機能を提供する機能部としても稼働する。計算機及び計算機システムは、これらの機能部を含む装置及びシステムである。
Here, each functional unit of the query generation unit 109 is loaded into the memory 122 as a program. The CPU 121 operates as a functional unit that provides a predetermined function by performing processing according to the program of each functional unit. For example, the CPU 121 functions as the query generation unit 109 by performing processing according to the query generation program. The same applies to other programs. Further, the CPU 121 also operates as a function unit that provides each function of a plurality of processes executed by each program. A computer and a computer system are an apparatus and a system including these functional units.
ストリームデータ処理開発サーバ107の各機能を実現するプログラム、テーブル等の情報は、ストレージ123や不揮発性半導体メモリ、ハードディスクドライブ、SSD(Solid State Drive)等の記憶デバイス、または、ICカード、SDカード、DVD等の計算機読み取り可能な非一時的データ記憶媒体に格納することができる。
Information such as programs and tables for realizing each function of the stream data processing development server 107 includes a storage device such as a storage 123, a nonvolatile semiconductor memory, a hard disk drive, an SSD (Solid State Drive), an IC card, an SD card, It can be stored in a computer-readable non-transitory data storage medium such as a DVD.
ストリームデータ処理開発サーバ107で行われる主な処理は、端末130を操作するクエリ開発者201が、1以上のテンプレート110を選択し、テンプレート110を結合したテンプレート呼び出しクエリ203を生成する。また、クエリ開発者201は、入力ストリームの特性を表す情報として、遅延に関する入力ストリームの時間特性204を設定する。
The main processing performed in the stream data processing development server 107 is that the query developer 201 operating the terminal 130 selects one or more templates 110 and generates a template call query 203 that combines the templates 110. Further, the query developer 201 sets a time characteristic 204 of the input stream related to delay as information representing the characteristic of the input stream.
そして、クエリ開発者201は、端末130から、テンプレート呼び出しクエリ203と遅延に関する入力ストリームの時間特性204を、ストリームデータ処理開発サーバ107へ入力し、クエリ生成部109を起動する。
Then, the query developer 201 inputs the template call query 203 and the time characteristic 204 of the input stream related to the delay from the terminal 130 to the stream data processing development server 107, and starts the query generation unit 109.
クエリ生成部109は、テンプレート呼び出しクエリ203に記述されたテンプレート110内のオペレータのデータの流れを解析し、与えられた遅延に関する入力ストリーム時間特性204に基づいて、オペレータ間の各ストリームにおける時間特性を算出する。
The query generation unit 109 analyzes the data flow of the operator in the template 110 described in the template call query 203, and based on the input stream time characteristic 204 regarding the given delay, calculates the time characteristic in each stream between operators. calculate.
そして、クエリ生成部109は、テンプレート開発者202がテンプレート110毎に予め設定した時間制約111(制約条件)を読み込んで、上記算出された時間特性が制約条件を満たすか否かを判定し、満たしていない場合には、テンプレート編集箇所候補212を生成して出力する。
Then, the query generation unit 109 reads the time constraint 111 (constraint condition) set in advance for each template 110 by the template developer 202, determines whether or not the calculated time characteristic satisfies the constraint condition, and satisfies If not, the template editing part candidate 212 is generated and output.
クエリ開発者201は、端末130でテンプレート編集箇所候補212を参照することにより、テンプレート110の編集を行う箇所を容易に特定することができる。なお、端末130は、図示しないCPU、メモリ、ストレージ、I/Oインタフェース及び入出力装置を備えた計算機で、ユーザあるいは管理者の操作を受け付ける。
The query developer 201 can easily specify the part where the template 110 is edited by referring to the template editing part candidate 212 on the terminal 130. The terminal 130 is a computer including a CPU, memory, storage, I / O interface, and input / output device (not shown) and accepts an operation of a user or an administrator.
図2は、クエリ生成部109の入出力の関係の一例を示すブロック図である。クエリ生成部109では、クエリジェネレータ205が、テンプレート呼び出しクエリ203を受け付けて、当該クエリ203で指定されたテンプレート110をストレージ123から取得し、各テンプレート110に定義されたオペレータを含むストリームデータ処理クエリ(生成クエリ206)を生成する。
FIG. 2 is a block diagram illustrating an example of the input / output relationship of the query generation unit 109. In the query generation unit 109, the query generator 205 receives the template call query 203, acquires the template 110 specified by the query 203 from the storage 123, and performs a stream data processing query ( A generation query 206) is generated.
テンプレート110は、ストリームデータ処理の機能部位(または所定の処理)を、機能の種類や処理の内容毎に、テンプレート開発者202が予め記述したプログラムである。
The template 110 is a program in which the template developer 202 describes a functional part (or predetermined process) of stream data processing in advance for each function type and processing content.
クエリ開発者201は、ストレージ123に格納された複数種のテンプレート110の中から、所望の機能のテンプレート110を組み合わせて結合し、パラメータ等を指定してから、クエリ生成部109へ入力することで所望のストリームデータ処理クエリを生成することができる。
The query developer 201 combines and combines templates 110 having desired functions from among a plurality of types of templates 110 stored in the storage 123, specifies parameters, etc., and inputs them to the query generation unit 109. A desired stream data processing query can be generated.
クエリ生成部109では、クエリパーサ207が生成クエリ206を解析してオペレータの接続関係を示すオペレータツリー208を生成する。なお、クエリパーサ207は、ストリームデータ処理エンジン103に実装されているパーサ(図示省略)と同様であればよく、あるいはパーサのエミュレータであってもよい。
In the query generation unit 109, the query parser 207 analyzes the generated query 206 and generates an operator tree 208 indicating the connection relationship of operators. The query parser 207 may be the same as the parser (not shown) installed in the stream data processing engine 103, or may be a parser emulator.
次に、クエリ生成部109では、遅延に関するクエリ時間特性算出部(以下、クエリ時間特性算出部)209が、解析されたオペレータツリー208から、テンプレート110内のオペレータのデータの流れをトラッキングして、後述するように、遅延に関するクエリ時間特性(以下、クエリ時間特性)210を算出する。
Next, in the query generation unit 109, a query time characteristic calculation unit (hereinafter referred to as a query time characteristic calculation unit) 209 relating to delay tracks the flow of data of the operator in the template 110 from the analyzed operator tree 208, and As will be described later, a query time characteristic (hereinafter referred to as query time characteristic) 210 relating to delay is calculated.
次に、クエリ生成部109では、遅延に関する時間制約条件判定部(以下、時間制約条件判定部)211が、算出されたクエリ時間特性210に、入力された遅延に関する入力ストリームの時間特性(以下、入力ストリーム時間特性)204を加味したテンプレート処理の時間特性を算出する。そして、時間制約条件判定部211は、テンプレート処理の時間特性が、各テンプレート110毎に予め設定された時間制約111を満たすか否かを判定する。
Next, in the query generation unit 109, a time constraint condition determination unit (hereinafter referred to as a time constraint condition determination unit) 211 related to a delay is added to the calculated query time property 210 as a time characteristic (hereinafter referred to as an input stream) related to an input delay. The time characteristic of the template process taking into account the input stream time characteristic) 204 is calculated. Then, the time constraint condition determination unit 211 determines whether or not the time characteristics of the template processing satisfy the time constraint 111 set in advance for each template 110.
時間制約条件判定部211は、クエリ時間特性210に入力ストリーム時間特性204を加味したテンプレート処理の時間特性が時間制約111を満たしていない場合には、編集が必要なテンプレート110を特定し、テンプレート編集箇所候補212として端末130へ出力する。
The time constraint condition determination unit 211 identifies the template 110 that needs to be edited and edits the template when the time property of the template process that takes the input stream time property 204 into the query time property 210 does not satisfy the time constraint 111 The part candidate 212 is output to the terminal 130.
以上のように、本実施例1のクエリ生成部109は、クエリ開発者201が生成したテンプレート呼び出しクエリ203を、クエリ開発者201が設定した入力ストリーム時間特性204で運用する場合に、テンプレート開発者202が設定した時間制約111を満たしていない場合には、テンプレート110で編集すべき箇所や見直すべきパラメータを特定する。
As described above, the query generation unit 109 according to the first exemplary embodiment uses a template developer when the template call query 203 generated by the query developer 201 is operated with the input stream time characteristic 204 set by the query developer 201. When 202 does not satisfy the set time constraint 111, a part to be edited in the template 110 and a parameter to be reviewed are specified.
これにより、クエリ開発者201は、1以上のテンプレート110を用いてクエリを開発する際に、テンプレート開発者202が設定した時間の制約を満たすクエリを迅速に生成することができる。
Thus, when the query developer 201 develops a query using one or more templates 110, the query developer 201 can quickly generate a query that satisfies the time constraint set by the template developer 202.
次に、本実施例1で使用するテンプレート110の一例を図3A、図3B、図3Cに示す。本実施例1では、イベントフィルタと、自己相関及び相関分析の3種のテンプレート110-1~110-3を使用する例を示す。なお、テンプレートの総称は符号“110”で示す。
Next, an example of the template 110 used in the first embodiment is shown in FIGS. 3A, 3B, and 3C. In the first embodiment, an example is shown in which an event filter and three types of templates 110-1 to 110-3 for autocorrelation and correlation analysis are used. The generic name of the template is indicated by reference numeral “110”.
図3Aは、イベントフィルタのテンプレート110-1の一例を示す図である。テンプレート110-1は、SELECT文で示されるように、データを取得するセンサノードのID(nodeId)と、データを取得するイベントのId(eventId)を定義する。
FIG. 3A is a diagram showing an example of an event filter template 110-1. The template 110-1 defines the ID (nodeId) of the sensor node that acquires data and the Id (eventId) of the event that acquires data, as indicated by the SELECT statement.
イベントフィルタのテンプレート110-1によって、特定のセンサノードIDが出力したストリームデータをイベントID毎に取得することができる。
The event filter template 110-1 makes it possible to acquire stream data output by a specific sensor node ID for each event ID.
図3Bは、自己相関のテンプレート110-2の一例を示す図である。テンプレート110-2は、SELECT文で示されるように、所定のウィンドウサイズ($windowSize)内で同一のセンサノードから2つのイベント(cur.$key、after.$key)を取得して、比較する自己相関を示す。
FIG. 3B is a diagram showing an example of an autocorrelation template 110-2. The template 110-2 acquires and compares two events (cur. $ Key, after. $ Key) from the same sensor node within a predetermined window size ($ windowSize) as indicated by the SELECT statement. Autocorrelation is shown.
図3Cは、相関分析のテンプレート110-3の一例を示す図である。テンプレート110-3は、SELECT文で示されるように、所定のウィンドウサイズ($windowSize)内で$input1と$input2の2つの入力ストリームを受け付けて、テンプレート110間の出力の相関関係について分析する。
FIG. 3C is a diagram illustrating an example of a correlation analysis template 110-3. As shown in the SELECT statement, the template 110-3 receives two input streams of $ input1 and $ input2 within a predetermined window size ($ windowSize) and analyzes the correlation of the output between the templates 110.
図4は、テンプレート呼び出しクエリ203の一例を示す図である。本実施例1のテンプレート呼び出しクエリ203は、2つのセンサノードA、Bからのストリームデータをひとつのイベント列として検知する例を示す。
FIG. 4 is a diagram illustrating an example of the template call query 203. The template call query 203 of the first embodiment shows an example in which stream data from two sensor nodes A and B are detected as one event string.
テンプレート呼び出しクエリ203は、まず、センサノードイベント(入力ストリーム)定義401で、入力ストリームがセンサノードのIDと、ストリームデータのタイムスタンプと、イベントのIDと、ログを含むことが定義される。
The template call query 203 is first defined as a sensor node event (input stream) definition 401, in which an input stream includes a sensor node ID, a stream data time stamp, an event ID, and a log.
次に、イベントフィルタテンプレート呼び出し402では、図3Aに示したイベントフィルタのテンプレート110-1を用いて、入力ストリームとしてセンサノードAからのイベントを受け付けて、eventAのストリームを出力する。
Next, the event filter template call 402 receives an event from the sensor node A as an input stream using the event filter template 110-1 shown in FIG. 3A and outputs an eventA stream.
次に、自己相関テンプレート呼び出し403では、図3Bに示した自己相関のテンプレート110-2を用いて、入力ストリームとしてeventAを受け付ける。そして、自己相関テンプレート呼び出し403は、2つのイベントA1、A2をウィンドウサイズの30秒以内に受け付けると、eventSequenceAのストリームを出力する。
Next, the autocorrelation template call 403 receives eventA as an input stream using the autocorrelation template 110-2 shown in FIG. 3B. When the autocorrelation template call 403 receives two events A1 and A2 within 30 seconds of the window size, it outputs an eventSequenceA stream.
次に、イベントフィルタテンプレート呼び出し404では、図3Aに示したイベントフィルタのテンプレート110-1を用いて、入力ストリームとしてセンサノードBからのイベントB1を受け付けて、eventBのストリームを出力する。
Next, the event filter template call 404 receives the event B1 from the sensor node B as an input stream using the event filter template 110-1 shown in FIG. 3A, and outputs an eventB stream.
最後に、相関分析テンプレート呼び出し405では、図3Cに示した相関分析のテンプレート110-3を用いて、入力ストリームとしてeventSequenceAとeventBを受け付ける。そして、相関分析テンプレート呼び出し405は、2つのイベントをウィンドウサイズの30秒以内に受け付けると、eventSequenceABのストリームを出力する。
Finally, the correlation analysis template call 405 receives eventSequenceA and eventB as input streams using the correlation analysis template 110-3 shown in FIG. 3C. Then, when the correlation analysis template call 405 receives two events within 30 seconds of the window size, it outputs an eventSequenceAB stream.
図5は、クエリジェネレータ205がテンプレート呼び出しクエリ203から生成した生成クエリ206の一例を示す図である。
FIG. 5 is a diagram illustrating an example of the generated query 206 generated by the query generator 205 from the template call query 203.
生成クエリ206は、図4のセンサノードイベント(入力ストリーム)定義401に対応するセンサノードイベント(入力ストリーム)定義(501)で、入力ストリームが定義される。
In the generation query 206, an input stream is defined by a sensor node event (input stream) definition (501) corresponding to the sensor node event (input stream) definition 401 of FIG.
次に、ノードAのイベント抽出(502)は、図4のイベントフィルタテンプレート呼び出し402に対応するクエリで、入力ストリームとしてセンサノードAからのイベントAを受け付けて、eventAのストリームを出力する。
Next, the event extraction (502) of the node A is a query corresponding to the event filter template call 402 of FIG. 4, and receives the event A from the sensor node A as an input stream and outputs the eventA stream.
次に、「イベントA1 -> 30s以内にイベントA2」を検出(503)は、図4の自己相関テンプレート呼び出し403に対応し、入力ストリームとしてeventAを受け付ける。そして、当該クエリは、2つのイベントA1、A2をウィンドウサイズの30秒以内に受け付けると、eventSequenceAのストリームを出力する。
Next, “Event A1 → Event A2 within 30 s” (503) corresponds to the autocorrelation template call 403 in FIG. 4 and accepts eventA as an input stream. When the query receives two events A1 and A2 within 30 seconds of the window size, it outputs an eventSequenceA stream.
次に、ノードBのイベント抽出(504)は、図4のイベントフィルタテンプレート呼び出し404に対応し、入力ストリームとしてセンサノードBからのイベントB1を受け付けて、eventBのストリームを出力する。
Next, the event extraction (504) of the node B corresponds to the event filter template call 404 of FIG. 4, accepts the event B1 from the sensor node B as an input stream, and outputs an eventB stream.
最後に、「イベントA1と同一時刻にイベントB1」を検出(505)は、図4の相関分析テンプレート呼び出し405に対応し、入力ストリームとしてeventSequenceAとeventBを受け付ける。そして、当該クエリは、2つのイベントをウィンドウサイズの30秒以内に受け付けると、eventSequenceABのストリームを出力する。
Finally, “event B1 at the same time as event A1” is detected (505), corresponding to the correlation analysis template call 405 in FIG. 4, and eventSequenceA and eventB are accepted as input streams. When the query receives two events within 30 seconds of the window size, it outputs an eventSequenceAB stream.
図6は、入力ストリームの時間特性204の一例を示す図である。図示の入力ストリーム時間特性204は、センサノードAからのイベントと、センサノードBからのイベントの遅延時間が、最大10秒間であることを設定している。この、入力ストリーム時間特性204は、クエリ開発者201が端末130から設定したものである。
FIG. 6 is a diagram illustrating an example of the time characteristic 204 of the input stream. The illustrated input stream time characteristic 204 sets that the delay time of the event from the sensor node A and the event from the sensor node B is 10 seconds at maximum. This input stream time characteristic 204 is set by the query developer 201 from the terminal 130.
なお、遅延時間は、センサノードAからのイベント(タプル)のタイムスタンプと、センサノードBからのイベント(タプル)のタイムスタンプの差分を示す。
The delay time indicates a difference between the time stamp of the event (tuple) from the sensor node A and the time stamp of the event (tuple) from the sensor node B.
図7は、時間制約111の一例を示す図である。時間制約111は、テンプレート開発者202がテンプレート110毎に予め設定した制約条件である。時間制約111は、入力ストリームの時間的な条件や、入力ストリームと出力ストリームの時間的な条件が設定される。テンプレート110から生成したオペレータの実行条件が時間制約111を満たしていれば、ストリームデータ処理を確実に実行することが保証される。
FIG. 7 is a diagram illustrating an example of the time constraint 111. The time constraint 111 is a constraint condition set in advance for each template 110 by the template developer 202. In the time constraint 111, a temporal condition of the input stream and a temporal condition of the input stream and the output stream are set. If the execution condition of the operator generated from the template 110 satisfies the time constraint 111, it is guaranteed that the stream data processing is reliably executed.
図示の例では、時間制約111が、テンプレート名701と、時間制約702とを含む例を示す。図示の例では、テンプレート名701は、相関分析を示し、相関分析テンプレート110-3の時間制約702が、入力ストリーム1($input1)と入力ストリーム2($input2)の時刻の差分(絶対値)がウィンドウサイズ($windowSize)以内であることを示している。なお、時刻は入力ストリーム1、2が到着した時刻や、入力ストリームが生成された時刻を用いることができる。また、時間制約111は、テンプレート110毎に設定することができる。
In the illustrated example, the time constraint 111 includes an example including a template name 701 and a time constraint 702. In the illustrated example, the template name 701 indicates correlation analysis, and the time constraint 702 of the correlation analysis template 110-3 is the time difference (absolute value) between the input stream 1 ($ input1) and the input stream 2 ($ input2). Is within the window size ($ windowSize). As the time, the time when the input streams 1 and 2 arrive or the time when the input streams are generated can be used. The time constraint 111 can be set for each template 110.
図8は、オペレータツリー208の一例を示す図である。オペレータツリー208は、クエリパーサ207が生成クエリ206を解析して生成したツリー構造である。生成クエリ206の全体は、STREAM:event801で識別される。
FIG. 8 is a diagram illustrating an example of the operator tree 208. The operator tree 208 has a tree structure generated by the query parser 207 analyzing the generated query 206. The entire generation query 206 is identified by STREAM: event 801.
Query eventA802は、図5に示した「ノードAのイベント抽出502」のクエリに対応する。Query eventA802は、センサノードからのイベントを取得するNOW_WINDOWオペレータ810と、NOW_WINDOWオペレータ810の出力からセンサノードAのみのデータを選択するFilterオペレータ1811と、Filterオペレータ811の出力を出力ストリームのeventA804のタプルとして追加するISTREAMオペレータ812のオペレータを含む。
The query event A 802 corresponds to the query “event extraction 502 of node A” shown in FIG. The Query event A 802 is a tuple of the NOW_WINDOW operator 810 that acquires an event from the sensor node, a Filter operator 1811 that selects only data of the sensor node A from the output of the NOW_WINDOW operator 810, and the output of the filter operator 811 as a tuple of the event A 804 of the output stream. Contains the operator of the ISTREAM operator 812 to be added.
Query eventB803は、図5に示した「ノードBのイベント1抽出」(505)のクエリに対応する。Query eventB803は、センサノードからのイベントを取得するNOW_WINDOWオペレータ813と、NOW_WINDOWオペレータ813からセンサノードAのみのデータを選択するFilterオペレータ814と、Filterオペレータ814の出力を出力ストリームのeventB805に追加するISTREAMオペレータ815とを含む。
The query event B 803 corresponds to the query of “Extract Node 1 event 1” (505) shown in FIG. The Query event B 803 includes a NOW_WINDOW operator 813 that acquires an event from the sensor node, a Filter operator 814 that selects only data of the sensor node A from the NOW_WINDOW operator 813, and an ISTREAM operator that adds the output of the Filter operator 814 to the event B 805 of the output stream. 815.
Query eventSequenceA806は、図5に示した「イベントA1->30s以内にイベントA2を検出」(503)のクエリに対応する。Query eventSequenceA806は、出力ストリームeventA804を受け付けるNOW_WINDOWオペレータ816及びTIME_WINDOWオペレータ817と、NOW_WINDOWオペレータ816の出力とTIME_WINDOWオペレータ817の出力を結合するJOINオペレータ818と、JOINオペレータ818の出力を出力ストリームeventSequenceA807に追加するISTREAMオペレータ819、とを含む。
Query eventSequence A 806 corresponds to the query “Detect event A2 within event A1 → 30s” (503) shown in FIG. The query event sequence A 806 includes a NOW_WINDOW operator 816 and a TIME_WINDOW operator 817 that accept the output stream event A 804, a JOIN operator 818 that combines the output of the NOW_WINDOW operator 816 and the output of the TIME_WINDOW operator 817, and an output of the JOIN output 8 ce Iu u 818 Ace Iu 818 Ace An operator 819.
Query eventSequenceAB808は、図5に示した「イベントA1と同一時刻にイベントB1を検出」(505)のクエリに対応する。Query eventSequenceAB808は、出力ストリームeventSequenceA807を受け付けるNOW_WINDOWオペレータ820と、出力ストリームeventB805を受け付けるTIME_WINDOWオペレータ821と、NOW_WINDOWオペレータ820とTIME_WINDOWオペレータ821の出力を結合するJOINオペレータ822のオペレータと、JOINオペレータ822の出力を出力ストリームeventSequenceAB809に追加するISTREAMオペレータ823とを含む。
Query eventSequence AB 808 corresponds to the query “Detect event B1 at the same time as event A1” (505) shown in FIG. The query event sequence AB 808 is an output of the NOW_WINDOW operator 820 that accepts the output stream event sequence A 807, the TIME_WINDOW operator 821 that accepts the output stream event B 805, and the output of the operator 182 and the output of the TIME_WINDOW 8 operator 821 An ISTREAM operator 823 to be added to the stream eventSequenceAB809.
図9は、クエリ時間特性210の一例を示す図である。クエリ時間特性210は、クエリ時間特性算出部209が算出したクエリ毎の時間の特性を示す。
FIG. 9 is a diagram illustrating an example of the query time characteristic 210. The query time characteristic 210 indicates a time characteristic for each query calculated by the query time characteristic calculation unit 209.
クエリ時間特性210のエントリ902は、図8に示したQuery eventA802の遅延がほぼ0であることを示す。すなわち、入力ストリームとしてのセンサノードAからのイベントと、出力ストリームとしてのeventA804の時間差が0であることを示している。
The entry 902 of the query time characteristic 210 indicates that the delay of the Query event A 802 shown in FIG. That is, the time difference between the event from the sensor node A as the input stream and the event A 804 as the output stream is zero.
クエリ時間特性210のエントリ903は、Query eventSequenceA806の遅延が最大30秒であることを示す。すなわち、入力ストリームとしてのevevtA804から出力ストリームとしてのeventSequenceA806までの時間差を示す。
The entry 903 of the query time characteristic 210 indicates that the delay of the query event sequence A 806 is 30 seconds at the maximum. That is, the time difference from eventA804 as an input stream to eventSequenceA806 as an output stream is shown.
クエリ時間特性210のエントリ904は、図8に示したQuery eventB803の遅延がほぼ0であることを示す。入力ストリームとしてのセンサノードBからのイベントと、出力ストリームとしてのeventB805の時間差が0であることを示している。
The entry 904 of the query time characteristic 210 indicates that the delay of the Query event B 803 shown in FIG. This shows that the time difference between the event from the sensor node B as the input stream and the event B 805 as the output stream is zero.
クエリ時間特性210のエントリ905は、図8に示した入力ストリームがeventSequenceA807についてQuery eventSequenceAB808の遅延がほぼ0であることを示す。すなわち、入力ストリームとしてのeventSequenceA807と、出力ストリームとしてのeventSequenceAB809の時間差が0であることを示している。
The entry 905 of the query time characteristic 210 indicates that the delay of the query event sequence AB 808 is almost zero for the event stream A 807 shown in FIG. That is, the time difference between event sequence A 807 as an input stream and event sequence AB 809 as an output stream is 0.
クエリ時間特性210のエントリ906は、図8に示した入力ストリームがeventB805について、Query eventSequenceAB808の遅延が最大30秒であることを示す。すなわち、入力ストリームとしてeventB805と、出力ストリームとしてのeventSequenceAB809の時間差が最大30秒であることを示している。
The entry 906 in the query time characteristic 210 indicates that the delay of the query event sequence AB 808 is 30 seconds at the maximum for the event B 805 shown in FIG. That is, the maximum time difference between event B805 as an input stream and eventSequenceAB809 as an output stream is 30 seconds.
以上のように、クエリ時間特性算出部209は、オペレータツリー208に基づいて、各クエリやオペレータにおける遅延時間をクエリ時間特性210として算出することができる。なお、図示はしないが、各エントリ902~906に対応するテンプレート110またはクエリの名称また識別子をそれぞれ関連付けておくものとする。
As described above, the query time characteristic calculation unit 209 can calculate the delay time in each query or operator as the query time characteristic 210 based on the operator tree 208. Although not shown, it is assumed that the template 110 or query name or identifier corresponding to each entry 902 to 906 is associated with each other.
図10は、テンプレート110の編集箇所の候補の一例を示す画面1001である。画面1001は、クエリ生成部109の時間制約条件判定部211で生成されて、端末130に送信される。端末130では図示しない入出力装置に画面1001を表示する。
FIG. 10 is a screen 1001 showing an example of candidates for editing locations of the template 110. The screen 1001 is generated by the time constraint condition determination unit 211 of the query generation unit 109 and transmitted to the terminal 130. The terminal 130 displays a screen 1001 on an input / output device (not shown).
生成クエリ206内でテンプレート110の編集箇所の候補の一例を示す画面1001は、生成クエリ206で編集箇所の候補を表示する領域1002と、具体的な編集箇所を指摘する領域1003を含む。
The screen 1001 showing an example of candidates for editing locations of the template 110 in the generation query 206 includes an area 1002 for displaying candidates for editing positions in the generation query 206 and an area 1003 for pointing out specific editing locations.
領域1002は、図5に示した生成クエリ206のうち編集箇所の候補を表示する領域である。図示の例では、図5に示した生成クエリ206のうち、「イベントA1 -> 30s以内にイベントA2」を検出するeventSequenceA503と、「イベントA1と同一時刻にイベントB1」を検出するeventSequenceAB505が編集箇所の候補となった例を示す。
The area 1002 is an area for displaying candidates for edit locations in the generated query 206 shown in FIG. In the illustrated example, in the generated query 206 shown in FIG. 5, event Event A 503 for detecting “Event A 1-> Event A 2 within 30 s” and event Sequence AB 505 for detecting “Event B 1 at the same time as Event A 1” are edited. The example which became a candidate of is shown.
具体的な編集箇所を示唆する領域1003は、18行目のクエリeventSequenceAがeventAに対して30秒遅延することを指摘する。さらに、領域1003では、32行目のクエリeventSequenceABにおいて、eventSequenceAがeventBより40s遅延する可能性があるため、制約条件である時間制約111を満たしていないことが指摘される。
The area 1003 suggesting a specific editing point indicates that the query eventSequenceA on the 18th line is delayed by 30 seconds with respect to eventA. Furthermore, in the area 1003, in the query eventSequenceAB on the 32nd line, it is pointed out that the eventSequenceA does not satisfy the time constraint 111 which is a constraint condition because there is a possibility that the eventSequenceA may be delayed by 40s from the eventB.
すなわち、本実施例1では、センサノードAからのイベントA1がNOW_WINDOW816で処理され、センサノードAからのイベントA1がNOW_WINDOW816で処理され、センサノードAからのイベントA2が30秒のTIME_WINDOW817で処理されるため、出力ストリームのeventSequenceA807は、入力ストリームeventAに対して最大30秒遅延する。
That is, in the first embodiment, the event A1 from the sensor node A is processed by NOW_WINDOW816, the event A1 from the sensor node A is processed by NOW_WINDOW816, and the event A2 from the sensor node A is processed by TIME_WINDOW817 for 30 seconds. Therefore, the event sequence A807 of the output stream is delayed by a maximum of 30 seconds with respect to the input stream eventA.
そして、入力ストリーム時間特性204より、センサノードBのイベントBはセンサノードAのイベントAに対して最大10秒の遅れが設定されるため、eventSequenceAまたはeventSequenceABが、イベントBに対して最大40秒遅延する。
Then, from the input stream time characteristic 204, the event B of the sensor node B has a delay of up to 10 seconds with respect to the event A of the sensor node A, so that eventSequenceA or eventSequenceAB is delayed up to 40 seconds with respect to the event B To do.
したがって、eventSequenceAまたはeventSequenceABが、イベントBに対する遅延が時間制約111を超過するため、時間制約条件判定部211は、端末130に対してテンプレート110のうち、クエリeventSequenceAまたはクエリeventSequenceABの編集を推奨する。
Therefore, since eventSequenceA or eventSequenceAB exceeds the time constraint 111 for the event B, the time constraint condition determination unit 211 recommends that the terminal 130 edit the query eventSequenceA or the query eventSequenceAB in the template 110.
図11は、クエリジェネレータ205で行われる処理の一例を示すフローチャートである。この処理は、クエリ生成部109がテンプレート呼び出しクエリ203を受け付けたときに実行される(1101)。
FIG. 11 is a flowchart illustrating an example of processing performed by the query generator 205. This process is executed when the query generation unit 109 receives the template call query 203 (1101).
クエリジェネレータ205は、受け付けたテンプレート呼び出しクエリ203を読み込む(1102)。次に、クエリジェネレータ205は、テンプレート呼び出しクエリ203を参照して呼び出すテンプレート110を特定する。そして、クエリジェネレータ205は、特定したテンプレート110をストレージ123から読み込む(1103)。
The query generator 205 reads the received template call query 203 (1102). Next, the query generator 205 specifies the template 110 to be called with reference to the template call query 203. Then, the query generator 205 reads the identified template 110 from the storage 123 (1103).
クエリジェネレータ205は、テンプレート呼び出しクエリ203内でテンプレート110を使用する箇所に、上記読み込んだテンプレート110を埋め込む(1104)。そして、クエリジェネレータ205は、テンプレート呼び出しクエリ203に埋め込んだテンプレート110について各テンプレートに応じた入力ストリームと出力ストリームを設定する(1105)。
The query generator 205 embeds the read template 110 in a place where the template 110 is used in the template call query 203 (1104). Then, the query generator 205 sets an input stream and an output stream corresponding to each template for the template 110 embedded in the template call query 203 (1105).
クエリジェネレータ205は、テンプレート呼び出しクエリ203に埋め込んだテンプレート110について、パラメータ(例えば、ウインドウサイズなど)をそれぞれ設定する(1106)。クエリジェネレータ205は、上記の処理により受け付けたテンプレート呼び出しクエリ203にテンプレート110を埋め込んで、入出力とパラメータを設定して図5に示した生成クエリ206を出力する。
The query generator 205 sets parameters (for example, window size, etc.) for the template 110 embedded in the template call query 203 (1106). The query generator 205 embeds the template 110 in the template call query 203 received by the above processing, sets input / output and parameters, and outputs the generated query 206 shown in FIG.
図12は、クエリパーサ207で行われる処理の一例を示すフローチャートである。この処理は、クエリジェネレータ205が生成クエリ206を出力したときに実行される(1201)。
FIG. 12 is a flowchart showing an example of processing performed by the query parser 207. This process is executed when the query generator 205 outputs the generated query 206 (1201).
クエリパーサ207は、クエリジェネレータ205が出力した生成クエリ206を読み込む(1202)。クエリパーサ207は、生成クエリ206の字句解析と、構文解析を実行して、図8で示したような、オペレータツリー208を生成する(1203)。上記処理によって、テンプレート呼び出しクエリ203に基づいて、実際にストリームデータを処理するオペレータツリー208がクエリパーサ207によって算出される。
The query parser 207 reads the generated query 206 output from the query generator 205 (1202). The query parser 207 generates the operator tree 208 as shown in FIG. 8 by performing lexical analysis and syntax analysis of the generation query 206 (1203). By the above processing, the operator tree 208 that actually processes the stream data is calculated by the query parser 207 based on the template call query 203.
図13は、クエリ時間特性算出部209で行われる処理の一例を示すフローチャートである。この処理は、クエリパーサ207がオペレータツリー208を出力したときに実行される(1301)。
FIG. 13 is a flowchart illustrating an example of processing performed by the query time characteristic calculation unit 209. This process is executed when the query parser 207 outputs the operator tree 208 (1301).
クエリ時間特性算出部209は、オペレータツリー208ごとに処理を行うループ(1302~1309)と、オペレータツリー208内のクエリ単位で順次処理を行うループ(1303~1308)の、二重のループを含む。
The query time characteristic calculation unit 209 includes a double loop of a loop (1302 to 1309) that performs processing for each operator tree 208 and a loop (1303 to 1308) that sequentially performs processing in units of queries in the operator tree 208. .
まず、クエリ時間特性算出部209は、オペレータツリー208内のクエリをひとつ読み込む。そして、クエリ時間特性算出部209は、当該クエリにJOINオペレータまたはDSTREAMオペレータを含む場合には、ウインドウサイズの値に応じて入力ストリームに対して出力ストリームを遅延させる(1304)。
First, the query time characteristic calculation unit 209 reads one query in the operator tree 208. If the query includes a JOIN operator or a DSTREAM operator, the query time characteristic calculation unit 209 delays the output stream with respect to the input stream according to the window size value (1304).
すなわち、クエリ時間特性算出部209は、ウィンドウサイズに応じて出力ストリームが入力ストリームに対して遅延する時間(遅延時間)を演算する。
That is, the query time characteristic calculation unit 209 calculates a time (delay time) in which the output stream is delayed with respect to the input stream according to the window size.
次に、クエリ時間特性算出部209は、読み込んだクエリにRSTREAMオペレータを含む場合には、RSTREAMで設定された出力間隔に基づいて、入力ストリームに対して出力ストリームを遅延させる(1305)。すなわち、クエリ時間特性算出部209は、出力間隔に応じて出力ストリームが入力ストリームに対して遅延する時間(遅延時間)を演算する。
Next, when the read query includes an RSTREAM operator, the query time characteristic calculation unit 209 delays the output stream with respect to the input stream based on the output interval set in RSTREAM (1305). That is, the query time characteristic calculation unit 209 calculates a time (delay time) in which the output stream is delayed with respect to the input stream according to the output interval.
次に、クエリ時間特性算出部209は、読み込んだクエリにJOINオペレータ、DSTREAMオペレータ、RSTREAMオペレータを含んでいない場合には、入力ストリームに対する出力ストリームの遅延時間を0とする(1306)。
Next, when the read query does not include the JOIN operator, the DSTREAM operator, or the RSTREAM operator, the query time characteristic calculation unit 209 sets the delay time of the output stream with respect to the input stream to 0 (1306).
クエリ時間特性算出部209は、当該クエリで算出した入力ストリームに対する出力ストリームの遅延時間の関係を、クエリ時間特性210のエントリとして追加する(1307)。
The query time characteristic calculation unit 209 adds the relationship of the delay time of the output stream to the input stream calculated by the query as an entry of the query time characteristic 210 (1307).
クエリ時間特性算出部209は、各クエリについて上記処理を実行し、オペレータツリー208が複数生成された場合には、ひとつのオペレータツリーについて上記処理が終了すると次のオペレータツリー208について処理を行う。そして、すべてのオペレータツリー208について上記処理が完了するとクエリ時間特性210を出力して終了する。
The query time characteristic calculation unit 209 executes the above processing for each query, and when a plurality of operator trees 208 are generated, the processing is performed for the next operator tree 208 when the above processing is completed for one operator tree. When the above processing is completed for all operator trees 208, the query time characteristic 210 is output and the process is terminated.
以上の処理により、オペレータツリー208のクエリに含まれるオペレータに設定された遅延時間を、テンプレート110に対応するクエリ単位のクエリ時間特性210として生成する。
Through the above processing, the delay time set for the operator included in the query of the operator tree 208 is generated as the query time characteristic 210 for each query corresponding to the template 110.
図14Aは、遅延の算出に関するJOINオペレータを含むクエリの一例を示す図である。図示のクエリQ1(1401)は、ひとつのセンサノードから2つの30秒のウインドウでそれぞれストリームデータを受信し、JOINオペレータで結合したストリームデータを出力する例を示す。
FIG. 14A is a diagram illustrating an example of a query including a JOIN operator related to delay calculation. The illustrated query Q1 (1401) shows an example in which stream data is received from each sensor node in two 30-second windows, and stream data combined by the JOIN operator is output.
図14Bは、遅延の算出に関するJOINを含むオペレータツリー1402の一例を示す図である。オペレータツリー1402は、ストリームデータ処理開発サーバ107のクエリパーサ207が図14Aに示したクエリQ1(1401)から生成したものである。
FIG. 14B is a diagram illustrating an example of an operator tree 1402 including a JOIN related to delay calculation. The operator tree 1402 is generated from the query Q1 (1401) shown in FIG. 14A by the query parser 207 of the stream data processing development server 107.
2つのウインドウオペレータ1403、1404がそれぞれ30秒のウインドウサイズで入力ストリームを受け付け、JOINオペレータ1405に出力する。JOINオペレータ1405は、2つのウインドウオペレータ1403、1404からの入力ストリームを結合しISTREAM1406として出力する。
The two window operators 1403 and 1404 each accept an input stream with a window size of 30 seconds and output it to the JOIN operator 1405. The JOIN operator 1405 combines the input streams from the two window operators 1403 and 1404 and outputs them as ISTREAM 1406.
図14Cは、本発明の第1の実施例を示し、図14Aに示したクエリQ1のJOINオペレータの遅延の算出の一例を示す図である。図示の例では、最初にストリームデータA1がウインドウオペレータ1403に入力され、30秒後にストリームデータA2がウインドウオペレータ1404に入力される。
FIG. 14C is a diagram illustrating an example of calculation of the delay of the JOIN operator of the query Q1 illustrated in FIG. 14A according to the first embodiment of this invention. In the illustrated example, the stream data A1 is first input to the window operator 1403, and the stream data A2 is input to the window operator 1404 after 30 seconds.
JOINオペレータ1405は、30秒のウインドウサイズのウインドウオペレータ1403、1404から入力ストリームとして受け付けたストリームデータA1とA2を結合し、ひとつのストリームデータとして出力する。このクエリQ1では、JOINオペレータ1405が、30秒のウインドウオペレータ1403、1404から入力を受け付けるので、入力ストリームに対する出力ストリームの遅延は最大で30秒となる。
The JOIN operator 1405 combines the stream data A1 and A2 received as input streams from the window operators 1403 and 1404 having a window size of 30 seconds, and outputs them as one stream data. In this query Q1, since the JOIN operator 1405 receives input from the 30- second window operators 1403 and 1404, the delay of the output stream with respect to the input stream is 30 seconds at the maximum.
図15Aは、遅延の算出に関するRSTREAMオペレータを含むクエリの一例を示す図である。図示のクエリQ2(1501)は、ひとつのセンサノードから10秒のウインドウでストリームデータを受信し、RSTREAMオペレータで10秒毎に集約したストリームを出力する例を示す。
FIG. 15A is a diagram illustrating an example of a query including an RSTREAM operator related to delay calculation. The illustrated query Q2 (1501) shows an example in which stream data is received from a single sensor node in a 10-second window, and a stream aggregated every 10 seconds by an RSTREAM operator is output.
図15Bは、遅延の算出に関するRSTREAMを含むオペレータツリー1502の一例を示す図である。オペレータツリー1502は、ストリームデータ処理開発サーバ107のクエリパーサ207が図15Aに示したクエリQ2(1501)から生成したものである。
FIG. 15B is a diagram illustrating an example of an operator tree 1502 including an RSTREAM regarding delay calculation. The operator tree 1502 is generated from the query Q2 (1501) shown in FIG. 15A by the query parser 207 of the stream data processing development server 107.
ウインドウオペレータ1503が、10秒のウインドウサイズで入力ストリームを受け付け、GROUP_BYオペレータ1504に出力する。GROUP_BYオペレータ1504は、ウインドウオペレータ1503から受け付けた入力ストリームを、集約して出力する。
The window operator 1503 receives an input stream with a window size of 10 seconds and outputs it to the GROUP_BY operator 1504. The GROUP_BY operator 1504 collects and outputs the input streams received from the window operator 1503.
RSTREAMオペレータ1505は、GROUP_BYオペレータ1504からの入力ストリームを10秒毎に出力する。
The STRREAM operator 1505 outputs the input stream from the GROUP_BY operator 1504 every 10 seconds.
図15Cは、本発明の第1の実施例を示し、図15Aに示したクエリQ2のRSTREAMオペレータの遅延の算出の一例を示す図である。
FIG. 15C is a diagram illustrating an example of calculation of the delay of the RSTREAM operator of the query Q2 illustrated in FIG. 15A according to the first embodiment of this invention.
図示の例では、0~10秒の間にストリームデータA1、A2、A3が順次ウインドウオペレータ1503に入力される。ウインドウオペレータ1503に入力されたストリームデータは、ひとつのグループに集約されて、RSTREAMオペレータ1505へ入力される。
In the illustrated example, stream data A1, A2, and A3 are sequentially input to the window operator 1503 within 0 to 10 seconds. The stream data input to the window operator 1503 is collected into one group and input to the RSTREAM operator 1505.
RSTREAMオペレータ1505は、10秒毎にグループ化されたストリームデータを、10秒の時点のストリームデータA1~A3として出力する。この例では、最先のストリームデータA1に対する出力ストリームの遅延は10秒となる。
The STRREAM operator 1505 outputs stream data grouped every 10 seconds as stream data A1 to A3 at the time of 10 seconds. In this example, the delay of the output stream with respect to the earliest stream data A1 is 10 seconds.
図16Aは、遅延の算出に関するDSTREAMオペレータを含むクエリの一例を示す図である。図示のクエリQ3(1601)は、ひとつのセンサノードから5秒のウインドウでストリームデータを受信し、集約したストリームから削除されたストリームデータを出力する例を示す。
FIG. 16A is a diagram illustrating an example of a query including a DSTREAM operator related to delay calculation. The illustrated query Q3 (1601) shows an example in which stream data is received from one sensor node in a 5-second window, and stream data deleted from the aggregated stream is output.
図16Bは、遅延の算出に関するDSTREAMを含むオペレータツリー1602の一例を示す図である。オペレータツリー1602は、ストリームデータ処理開発サーバ107のクエリパーサ207が図16Aに示したクエリQ3(1601)から生成したものである。
FIG. 16B is a diagram illustrating an example of an operator tree 1602 including DSTREAM relating to delay calculation. The operator tree 1602 is generated from the query Q3 (1601) shown in FIG. 16A by the query parser 207 of the stream data processing development server 107.
ウインドウオペレータ1603が、5秒のウインドウサイズで入力ストリームを受け付け、GROUP_BYオペレータ1604に出力する。GROUP_BYオペレータ1604は、ウインドウオペレータ1603から受け付けた入力ストリームを、集約して出力する。
The window operator 1603 receives an input stream with a window size of 5 seconds and outputs it to the GROUP_BY operator 1604. The GROUP_BY operator 1604 aggregates and outputs the input streams received from the window operator 1603.
DSTREAMオペレータ1605は、GROUP_BYオペレータ1604の入力ストリームから削除されたストリームデータを現在時刻のストリームデータとして出力する。
The DSTREAM operator 1605 outputs the stream data deleted from the input stream of the GROUP_BY operator 1604 as stream data at the current time.
図16Cは、本発明の第1の実施例を示し、図16Aに示したクエリQ3のDSTREAMオペレータの遅延の算出の一例を示す図である。
FIG. 16C is a diagram illustrating an example of calculation of the delay of the DSTREAM operator of the query Q3 illustrated in FIG. 16A according to the first embodiment of this invention.
図示の例では、5秒の間にストリームデータA1が順次ウインドウオペレータ1603に入力され、5秒を経過したストリームデータA1は削除される。ウインドウオペレータ1603に入力されたストリームデータは、ひとつのグループに集約されて、DSTREAMオペレータ1605へ入力される。
In the illustrated example, the stream data A1 is sequentially input to the window operator 1603 within 5 seconds, and the stream data A1 after 5 seconds is deleted. The stream data input to the window operator 1603 is collected into one group and input to the DSTREAM operator 1605.
DSTREAMオペレータ1605は、ウインドウオペレータ1603で削除されたストリームデータを、5秒の時点のストリームデータA1として出力する。この例では、入力ストリームに対する出力ストリームの遅延は5秒となる。
The DSTREAM operator 1605 outputs the stream data deleted by the window operator 1603 as stream data A1 at the time of 5 seconds. In this example, the delay of the output stream with respect to the input stream is 5 seconds.
図17は、時間制約条件判定部211で行われる処理の一例を示すフローチャートである。この処理は、クエリ時間特性算出部209からクエリ時間特性210が出力されたときに実行される(1701)。
FIG. 17 is a flowchart illustrating an example of processing performed by the time constraint condition determination unit 211. This process is executed when the query time characteristic 210 is output from the query time characteristic calculation unit 209 (1701).
時間制約条件判定部211は、テンプレート呼び出しクエリ203内のテンプレート110ごとに処理を行うループ(1702~1710)と、テンプレート110内の時間制約111単位で順次処理を行うループ(1703~1709)の二重のループを有する。
The time constraint condition determination unit 211 includes two loops (1702 to 1710) that perform processing for each template 110 in the template call query 203 and loops (1703 to 1709) that perform processing in units of time constraints 111 in the template 110. Has a heavy loop.
まず、時間制約条件判定部211は、テンプレート呼び出しクエリ203を読み込んで、呼び出すテンプレート110を特定する。時間制約条件判定部211は、特定されたテンプレート110に対応する時間制約111をストレージ123から読み込む。また、時間制約条件判定部211は、特定されたテンプレート110に対応するクエリ時間特性210を取得する。時間制約条件判定部211は、入力された入力ストリーム時間特性204と生成された生成クエリ206を読み込む。
First, the time constraint condition determination unit 211 reads the template call query 203 and specifies the template 110 to be called. The time constraint condition determination unit 211 reads the time constraint 111 corresponding to the identified template 110 from the storage 123. Further, the time constraint condition determination unit 211 acquires a query time characteristic 210 corresponding to the identified template 110. The time constraint condition determination unit 211 reads the input stream time characteristic 204 that has been input and the generated generation query 206.
時間制約条件判定部211は、読み込んだ時間制約111がパラメータ(例えば、ウインドウサイズ)を含む場合には、テンプレート呼び出しクエリ203に記載された値を該当するパラメータに設定する(1704)。
If the read time constraint 111 includes a parameter (for example, window size), the time constraint condition determination unit 211 sets the value described in the template call query 203 as the corresponding parameter (1704).
時間制約条件判定部211は、当該テンプレート110について、入力ストリーム時間特性204とクエリ時間特性210から、当該テンプレート110における入力ストリームと出力ストリームの時間特性を、テンプレート処理の時間特性として算出する(1705)。
The time constraint condition determination unit 211 calculates the time characteristics of the input stream and the output stream in the template 110 as the time characteristics of the template processing from the input stream time characteristics 204 and the query time characteristics 210 for the template 110 (1705). .
テンプレート処理の時間特性としては、例えば、時間制約条件判定部211が、当該テンプレート110のクエリ時間特性210に入力ストリーム時間特性204を加算して、当該テンプレート110における入力ストリームに対する出力ストリームの遅延時間を算出する。なお、入力ストリーム時間特性204の遅延時間の加算は、当該入力ストリーム時間特性204の影響を受けるテンプレート110のクエリ時間特性210だけでよい。
As the time characteristic of the template processing, for example, the time constraint condition determination unit 211 adds the input stream time characteristic 204 to the query time characteristic 210 of the template 110 to obtain the delay time of the output stream with respect to the input stream in the template 110. calculate. Note that the delay time of the input stream time characteristic 204 may be added only to the query time characteristic 210 of the template 110 that is affected by the input stream time characteristic 204.
すなわち、ステップ1705では、当該テンプレート110に固有の遅延時間に、入力ストリーム時間特性204に応じた遅延時間を加算した値を、テンプレート処理の時間特性として算出することができる。
That is, in step 1705, a value obtained by adding a delay time corresponding to the input stream time characteristic 204 to a delay time specific to the template 110 can be calculated as a time characteristic of template processing.
時間制約条件判定部211は、ステップ1705で算出したテンプレート処理の時間特性が、時間制約111を満たすか否かを判定する(1706)。テンプレート処理の時間特性が時間制約111を満たしていればステップ1709または1710へ進んで次の時間制約111またはテンプレート110について上記処理を繰り返す。
The time constraint condition determination unit 211 determines whether or not the time characteristic of the template process calculated in step 1705 satisfies the time constraint 111 (1706). If the time characteristic of the template processing satisfies the time constraint 111, the process proceeds to step 1709 or 1710 and the above processing is repeated for the next time constraint 111 or template 110.
一方、テンプレート処理の時間特性が時間制約111を満たしていなければステップ1708へ進む。ステップ1708では、時間制約条件判定部211が、生成クエリ206で当該テンプレート110に対応する部分を編集箇所の候補として、図10に示した編集箇所を指摘する領域1003に出力する。なお、時間制約条件判定部211が、編集する箇所の候補を当該テンプレート110とし、テンプレート処理の時間特性(遅延)に関する情報を付加しても良い。あるいは、時間制約条件判定部211が、当該テンプレート110の名称を編集箇所として出力し、時間制約111に対するテンプレート処理の時間特性を付加しても良い。
On the other hand, if the time characteristic of the template processing does not satisfy the time constraint 111, the process proceeds to step 1708. In step 1708, the time constraint condition determination unit 211 outputs the portion corresponding to the template 110 in the generated query 206 as a candidate for an edit location and outputs it to the area 1003 indicating the edit location shown in FIG. 10. Note that the time constraint condition determination unit 211 may use the template 110 as a candidate for a part to be edited, and add information regarding the time characteristics (delay) of template processing. Alternatively, the time constraint condition determination unit 211 may output the name of the template 110 as an edit location and add a time characteristic of template processing for the time constraint 111.
以上の処理によって、時間制約条件判定部211は、テンプレート110毎に入力ストリーム時間特性204を加味したテンプレート処理の時間特性を算出し、テンプレート処理の時間特性が時間制約111を満足しないときには、対象のテンプレート110を編集箇所の候補として特定し、編集箇所の候補として出力することができる。
Through the above processing, the time constraint condition determination unit 211 calculates the time characteristics of the template processing that takes the input stream time characteristics 204 into consideration for each template 110, and when the time characteristics of the template processing do not satisfy the time constraints 111, The template 110 can be specified as a candidate for an edit location and output as a candidate for an edit location.
図18は、遅延に関して時間制約条件判定部211で行われる処理の一例を示す図である。テンプレート処理の時間特性1801は、図6に示したセンサノードAのイベント(イベントA)とセンサノードBのイベント(イベントB)が最大で10秒遅延するという入力ストリーム時間特性204の設定を、Query eventSequenceA(806)のテンプレート110-2(自己相関テンプレート呼び出し403)に適用した例を示す。
FIG. 18 is a diagram illustrating an example of processing performed by the time constraint condition determination unit 211 regarding delay. The time characteristic 1801 of the template processing is the setting of the input stream time characteristic 204 in which the event of the sensor node A (event A) and the event of the sensor node B (event B) shown in FIG. An example applied to the template 110-2 (autocorrelation template call 403) of eventSequenceA (806) is shown.
イベントA1とイベントA2を結合するJOINオペレータ818を含むeventSequenceA806のテンプレートは、パラメータとしてウインドウサイズが30秒に設定されているので、入力ストリームのイベントAに対する出力ストリーム(eventSequenceA)の遅延は、図9のエントリ906で示すように最大で30秒となる。
Since the eventSequence A806 template including the JOIN operator 818 that combines the event A1 and the event A2 has a window size set as 30 seconds as a parameter, the delay of the output stream (eventSequenceA) with respect to the event A of the input stream is as shown in FIG. As indicated by entry 906, the maximum is 30 seconds.
この遅延(クエリ時間特性210)に、eventSequenceAの入力ストリームであるeventSequenceAは、イベントBに対して最大で10秒の遅延が入力ストリーム時間特性204で、
-10s <= event(nodeId = ’A’)- event(nodeId = ’B’) <= 10s
と設定されている。 In addition to this delay (query time characteristic 210), eventSequenceA that is an input stream of eventSequenceA has a delay of 10 seconds at maximum with respect to event B in the inputstream time characteristic 204
−10s <= event (nodeId = 'A')-event (nodeId = 'B') <= 10s
Is set.
-10s <= event(nodeId = ’A’)- event(nodeId = ’B’) <= 10s
と設定されている。 In addition to this delay (query time characteristic 210), eventSequenceA that is an input stream of eventSequenceA has a delay of 10 seconds at maximum with respect to event B in the input
−10s <= event (nodeId = 'A')-event (nodeId = 'B') <= 10s
Is set.
したがって、入力ストリーム時間特性204を加味した30秒のTIME_WINDOWオペレータ817を有するeventSequenceA(806)のテンプレート処理の時間特性1802は、
-40s <= eventSequenceA - eventB <= 10s
で表される。 Therefore, thetime characteristic 1802 of the template processing of eventSequenceA (806) having the TIME_WINDOW operator 817 of 30 seconds considering the input stream time characteristic 204 is
−40 s ≦ = eventSequence A − event B ≦ = 10 s
It is represented by
-40s <= eventSequenceA - eventB <= 10s
で表される。 Therefore, the
−40 s ≦ = eventSequence A − event B ≦ = 10 s
It is represented by
一方、自己相関テンプレート110-2の時間制約1804は、
-30s <= eventSequenceA - eventB <= 30s
で表される。 On the other hand, thetime constraint 1804 of the autocorrelation template 110-2 is
−30s ≦ = eventSequence A −eventB ≦ = 30s
It is represented by
-30s <= eventSequenceA - eventB <= 30s
で表される。 On the other hand, the
−30s ≦ = eventSequence A −eventB ≦ = 30s
It is represented by
時間制約条件判定部211は、テンプレート処理の時間特性1802の最大遅延時間=40秒が、時間制約1804の最大遅延時間=30秒を満足していないので、時間制約を満たしていない、と判定する(1805)。
The time constraint condition determination unit 211 determines that the time constraint is not satisfied because the maximum delay time = 40 seconds of the time characteristic 1802 of the template process does not satisfy the maximum delay time = 30 seconds of the time constraint 1804. (1805).
そして、時間制約条件判定部211は、生成クエリ206のうち、当該相関分析テンプレートに対応する部分を、編集箇所の候補として、図10に示した領域1003に出力する。
Then, the time constraint condition determination unit 211 outputs the portion corresponding to the correlation analysis template in the generated query 206 to the region 1003 shown in FIG.
なお、図10の例では、自己相関のテンプレート110であるeventSequenceABについても、時間制約111を満たしていないため、領域1003に編集箇所の候補として出力される。
In the example of FIG. 10, the eventSequenceAB, which is the autocorrelation template 110, does not satisfy the time constraint 111 and is output to the area 1003 as a candidate for an edited part.
クエリ開発者201は、端末130の画面1001に表示された領域1003及び領域1002を参照することで、制約条件である時間制約111を満たしていない編集箇所の候補を容易に把握することができる。
The query developer 201 can easily grasp a candidate for an edit location that does not satisfy the time constraint 111 that is a constraint condition by referring to the region 1003 and the region 1002 displayed on the screen 1001 of the terminal 130.
特に、テンプレート110の編集やパラメータ値の見直しが必要になった場合、クエリ開発者201は、制約条件を満たしていない部分と値を領域1003で知ることができるので、編集または見直しを行う部分を容易に特定することが可能となる。図10の例では、自己相関のテンプレート110と相関分析テンプレート110の時間制約111について30秒を満たしていないという問題がある。したがって、クエリ開発者201は、テンプレート110のウインドウサイズを見直すことで、制約条件を満足することができる。
In particular, when the template 110 needs to be edited or the parameter value needs to be reviewed, the query developer 201 can know the part that does not satisfy the constraint condition and the value in the area 1003. It becomes possible to specify easily. In the example of FIG. 10, there is a problem that the time constraint 111 of the autocorrelation template 110 and the correlation analysis template 110 does not satisfy 30 seconds. Therefore, the query developer 201 can satisfy the constraint condition by reviewing the window size of the template 110.
以上のように、本実施例1では、クエリ開発者201が設定した入力ストリーム時間特性204と、クエリ開発者201が選択したテンプレート110をクエリ生成部109へ入力し、クエリ生成部109がテンプレート110毎のクエリ時間特性210を算出し、さらに、入力ストリームの時間特性204を加味したテンプレート処理の時間特性を算出する。
As described above, in the first embodiment, the input stream time characteristic 204 set by the query developer 201 and the template 110 selected by the query developer 201 are input to the query generation unit 109, and the query generation unit 109 inputs the template 110. A query time characteristic 210 for each time is calculated, and further, a time characteristic of template processing that takes into account the time characteristic 204 of the input stream is calculated.
そして、クエリ生成部109は、入力ストリームの時間特性204を加味したテンプレート処理の時間特性と、テンプレート開発者202が設定した時間制約111(制約条件)とを比較して、テンプレート処理の時間特性が制約条件を満たしているかを判定する。
Then, the query generation unit 109 compares the time characteristic of the template process with the time characteristic 204 of the input stream with the time constraint 111 (constraint condition) set by the template developer 202, and the time characteristic of the template process is determined. Determine whether the constraints are met.
クエリ生成部109は、テンプレート処理の時間特性が制約条件を満たしていないテンプレート110を特定して、端末130へ出力する。これにより、テンプレート110を利用するクエリ開発者201は、ストリームデータ処理におけるテンプレートベースのクエリ開発において、時間的制約などの制約条件に基づいて、テンプレート110の編集の有無の判定や、編集箇所の特定を計算機で行うことにより、クエリの開発を容易にすることができる。
The query generation unit 109 identifies the template 110 whose template processing time characteristics do not satisfy the constraint condition, and outputs the template 110 to the terminal 130. As a result, the query developer 201 using the template 110 can determine whether or not the template 110 has been edited and specify the editing location in template-based query development in stream data processing based on constraints such as time constraints. It is possible to facilitate the development of queries by performing the above with a computer.
図19~図31は、第2の実施例を示す。前記実施例1では、入力ストリームの特性情報として、入力ストリームの時間の遅延を示す入力ストリーム時間特性204を用いる例を示した。本実施例2では、前記実施例1の時間の遅延に代わって、入力ストリームデータの時間間隔を入力ストリームの特性情報として用いる例を示す。
19 to 31 show a second embodiment. In the first embodiment, the input stream time characteristic 204 indicating the time delay of the input stream is used as the input stream characteristic information. In the second embodiment, an example in which the time interval of the input stream data is used as the characteristic information of the input stream instead of the time delay of the first embodiment.
本実施例2では、前記実施例1の遅延に関する時間制約111に代わってデータ間隔に関する時間制約2400を用い、前記実施例1の遅延に関するクエリ時間特性算出部209と遅延に関する時間制約条件判定部211を、データ間隔に関するクエリ時間特性算出部1903とデータ間隔に関する時間制約条件判定部1905に置き換えた。その他の構成については、前記実施例1と同様である。また、クエリ開発者201は、遅延に関する入力ストリーム時間特性に代わってデータ間隔に関する時間特性2301をクエリ生成部109へ入力する。
In the second embodiment, the time constraint 2400 related to the data interval is used instead of the time constraint 111 related to the delay in the first embodiment, and the query time characteristic calculation unit 209 related to the delay and the time constraint condition determination unit 211 related to the delay in the first embodiment. Is replaced with a query time characteristic calculation unit 1903 related to the data interval and a time constraint condition determination unit 1905 related to the data interval. Other configurations are the same as those in the first embodiment. Further, the query developer 201 inputs a time characteristic 2301 related to the data interval to the query generation unit 109 instead of the input stream time characteristic related to the delay.
図19は、計算機システムの入出力の関係を示すブロック図である。クエリ生成部109は、クエリ開発者201が操作する端末130から、テンプレート呼び出しクエリ2101と、データ間隔に関する時間特性(以下、入力ストリーム時間特性)2301を受け付ける。
FIG. 19 is a block diagram showing the input / output relationship of the computer system. The query generation unit 109 receives a template call query 2101 and a time characteristic related to a data interval (hereinafter, input stream time characteristic) 2301 from the terminal 130 operated by the query developer 201.
クエリジェネレータ205は、テンプレート呼び出しクエリ2101を受け付けて、当該クエリ2101で指定されたテンプレート110をストレージ123から取得し、各テンプレート110に定義されたオペレータを含むクエリ(生成クエリ2201)を生成する。
The query generator 205 receives the template call query 2101, acquires the template 110 specified by the query 2101 from the storage 123, and generates a query (generation query 2201) including the operator defined in each template 110.
次に、クエリパーサ207が生成クエリ2201を解析してオペレータの接続関係を示すオペレータツリー2500を生成する。
Next, the query parser 207 analyzes the generated query 2201 and generates an operator tree 2500 indicating the connection relationship between operators.
次に、データ間隔に関するクエリ時間特性算出部(以下、クエリ時間特性算出部)2800が、解析されたオペレータツリー2500から、テンプレート110内のオペレータのデータの流れをトラッキングして、後述するように、データ間隔に関するクエリ時間特性2600を算出する。
Next, a query time characteristic calculation unit (hereinafter referred to as a query time characteristic calculation unit) 2800 related to the data interval tracks the flow of data of the operator in the template 110 from the analyzed operator tree 2500, as will be described later. A query time characteristic 2600 related to the data interval is calculated.
次に、クエリ生成部109では、データ間隔に関する時間制約条件判定部(以下、時間制約条件判定部)3000が、算出されたデータ間隔に関するクエリ時間特性2600と、入力されたデータ間隔に関する入力ストリーム時間特性2301を加味したテンプレート処理の時間特性を算出する。そして、時間制約条件判定部3000は、テンプレート処理の時間特性と、各テンプレート110毎に予め設定されたデータ間隔に関する時間制約2400を満たすか否かを判定する。時間制約条件判定部3000は、データ間隔に関するクエリ時間特性2600がデータ間隔に関する時間制約2400を満たしていない場合には、編集が必要なテンプレート110の箇所を特定し、テンプレート編集箇所候補212として端末130へ出力する。
Next, in the query generation unit 109, a time constraint condition determination unit (hereinafter referred to as a time constraint condition determination unit) 3000 regarding the data interval has a query time characteristic 2600 regarding the calculated data interval and an input stream time regarding the input data interval. A time characteristic of the template processing taking the characteristic 2301 into consideration is calculated. Then, the time constraint condition determination unit 3000 determines whether or not the time constraint of the template processing and the time constraint 2400 regarding the data interval set in advance for each template 110 are satisfied. When the query time characteristic 2600 related to the data interval does not satisfy the time constraint 2400 related to the data interval, the time constraint condition determination unit 3000 identifies the part of the template 110 that needs to be edited and serves as the template editing part candidate 212 as the terminal 130. Output to.
以上のように、本実施例2のクエリ生成部109は、クエリ開発者201が生成したテンプレート呼び出しクエリ203を、クエリ開発者201が設定したデータ間隔に関する入力ストリーム時間特性2301で運用する場合に、テンプレート開発者202が設定したデータ間隔に関する時間制約2400を満たしていない場合には、テンプレート110で編集すべき箇所や見直すべきパラメータを特定する。
As described above, the query generation unit 109 according to the second embodiment uses the template call query 203 generated by the query developer 201 with the input stream time characteristic 2301 related to the data interval set by the query developer 201. If the time constraint 2400 regarding the data interval set by the template developer 202 is not satisfied, the part to be edited in the template 110 and the parameter to be reviewed are specified.
これにより、クエリ開発者201は、1以上のテンプレート110を用いてクエリを開発する際に、テンプレート開発者202が設定した時間の制約を満たすクエリを迅速に生成することができる。
Thus, when the query developer 201 develops a query using one or more templates 110, the query developer 201 can quickly generate a query that satisfies the time constraint set by the template developer 202.
次に、本実施例2で使用するテンプレート110の一例を図20A、図20Bに示す。本実施例2では、イベント毎集計2001及びノード毎集計医2002の2種のテンプレート110-1A、110-2Aを使用する例を示す。なお、テンプレートの総称は符号“110”で示す。
Next, an example of the template 110 used in the second embodiment is shown in FIGS. 20A and 20B. In the second embodiment, an example is shown in which two types of templates 110-1A and 110-2A of event total 2001 and node total physician 2002 are used. The generic name of the template is indicated by reference numeral “110”.
図20Aは、イベント毎集計のテンプレート110-1Aの一例を示す図である。テンプレート110-1Aは、ストリームデータを取得するセンサノードのID(nodeId)と、データを取得するイベントのId(eventId)を設定して、ストリームデータをウインドウで受け付けて、センサノードID及びイベントID毎に集約(部分集計)する。そして、テンプレート110-1Aは、ウインドウサイズで指定された時間毎に集約した結果を出力する。
FIG. 20A is a diagram showing an example of a template 110-1A for totaling events. The template 110-1A sets the ID (nodeId) of the sensor node that acquires the stream data and the Id (eventId) of the event that acquires the data, receives the stream data in the window, and sets the sensor node ID and the event ID. Is aggregated (partial aggregation). Then, the template 110-1A outputs a result aggregated every time specified by the window size.
図20Bは、ノード毎集計のテンプレート110-2Aの一例を示す図である。テンプレート110-2Aは、ストリームデータを取得するセンサノードのID(nodeId)を設定して、ストリームデータをウインドウで受け付けて、センサノードID毎に集約(全体集計)する。そして、テンプレート110-2Aは、ウインドウサイズで指定された時間毎に集約した結果を出力する。
FIG. 20B is a diagram showing an example of a node-by-node aggregation template 110-2A. The template 110-2A sets the ID (nodeId) of the sensor node that acquires the stream data, receives the stream data in the window, and aggregates (totally aggregates) each sensor node ID. Then, the template 110-2A outputs a result aggregated every time specified by the window size.
図21は、テンプレート呼び出しクエリ2101の一例を示す図である。本実施例2のテンプレート呼び出しクエリ2101は、センサノードからのストリームデータを2分間隔でイベント毎に集計して出力して、1分間隔でセンサノード毎に集計した結果を出力する例を示す。
FIG. 21 is a diagram showing an example of the template call query 2101. A template call query 2101 according to the second embodiment shows an example in which stream data from sensor nodes is aggregated and output for each event at intervals of 2 minutes, and a result of aggregation for each sensor node is output at intervals of 1 minute.
テンプレート呼び出しクエリ2101は、まず、センサノードイベント(入力ストリーム)定義2111で、入力ストリームがセンサノードのIDと、ストリームデータのタイムスタンプと、イベントのIDと、ログを含むことが定義される。
The template call query 2101 is first defined as a sensor node event (input stream) definition 2111, in which an input stream includes a sensor node ID, a stream data time stamp, an event ID, and a log.
次に、イベント毎集計テンプレート呼び出し2112では、図20Aに示したイベント毎集計のテンプレート110-1Aを用いて、入力ストリームとしてセンサノードからのイベントを120秒のウインドウで受け付けて、60秒間隔で部分集計した結果を出力する。
Next, in the event totaling template call 2112, using the event totaling template 110-1A shown in FIG. 20A, events from the sensor node are received as an input stream in a 120 second window, and partial at 60 second intervals. Output the aggregated result.
次に、ノード毎集計テンプレート呼び出し2113では、図20Bに示したノード毎集計のテンプレート110-2Aを用いて、入力ストリームとしてcountPerEventを60秒のウインドウで受け付ける。そして、ノード毎集計テンプレート呼び出し2113は、60秒間隔で集計した結果を出力する。
Next, the node-by-node aggregation template call 2113 accepts countPerEvent as an input stream in a 60-second window using the node-by-node aggregation template 110-2A shown in FIG. 20B. Then, the node-by-node aggregation template call 2113 outputs the result of aggregation at intervals of 60 seconds.
図22は、クエリジェネレータ205がテンプレート呼び出しクエリ2101から生成した生成クエリ2201の一例を示す図である。
FIG. 22 is a diagram illustrating an example of a generation query 2201 generated from the template call query 2101 by the query generator 205.
生成クエリ2201は、図21のセンサノードイベント(入力ストリーム)定義2111に対応するセンサノードイベント(入力ストリーム)定義(2211)で、入力ストリームが定義される。
In the generation query 2201, an input stream is defined by a sensor node event (input stream) definition (2211) corresponding to the sensor node event (input stream) definition 2111 of FIG.
次に、イベント毎に集計(2212)は、図21のイベント毎集計テンプレート呼び出し2112に対応するクエリで、入力ストリームとしてセンサノードからのイベントを120秒のウインドウで受け付けて、120秒間隔で入力ストリームを集計した結果を出力する。
Next, totaling for each event (2212) is a query corresponding to the totaling event calling template 2112 shown in FIG. 21, and an event from a sensor node is accepted as an input stream in a 120-second window, and the input stream is input at 120-second intervals. The result of totaling is output.
次に、ノード毎に集計(2213)は、図21のノード毎集計テンプレート呼び出し2113に対応し、入力ストリームとしてイベント毎集計テンプレートの出力ストリームであるcountPerEventを60秒のウインドウで受け付ける。そして、当該クエリは、60秒間隔で入力ストリームを集計した結果を出力する。
Next, tabulation for each node (2213) corresponds to node-by-node tabulation template call 2113 in FIG. 21, and accepts countPerEvent, which is an output stream of the tabulation template for each event, as an input stream in a 60-second window. Then, the query outputs the result of counting the input streams at 60-second intervals.
図23は、データ間隔に関する入力ストリーム時間特性2301の一例を示す図である。図示のデータ間隔に関する入力ストリーム時間特性2301は、センサノードからのイベントが10秒間隔で発生することが設定されている。この、データ間隔に関する入力ストリーム時間特性2301は、クエリ開発者201が端末130から設定したものである。
FIG. 23 is a diagram illustrating an example of the input stream time characteristic 2301 related to the data interval. The input stream time characteristic 2301 relating to the illustrated data interval is set such that events from the sensor node occur at intervals of 10 seconds. The input stream time characteristic 2301 regarding the data interval is set by the query developer 201 from the terminal 130.
図24は、データ間隔に関する時間制約2400の一例を示す図である。データ間隔に関する時間制約2400は、テンプレート開発者202が端末130で予め設定したものである。図示の例では、データ間隔に関する時間制約2400が、テンプレート名701と、時間制約702とを含む例を示す。なお、データ間隔に関する時間制約2400は、テンプレート110毎に設定することができる。
FIG. 24 is a diagram illustrating an example of the time constraint 2400 regarding the data interval. The time constraint 2400 regarding the data interval is set in advance by the template developer 202 on the terminal 130. In the illustrated example, the time constraint 2400 regarding the data interval includes a template name 701 and a time constraint 702. The time constraint 2400 regarding the data interval can be set for each template 110.
図示の例では、ノード毎集計(aggregationPerNoede)のテンプレートの時間制約2402が、入力ストリーム($input1)の時刻はウインドウサイズ内であることを示している。
In the illustrated example, the time constraint 2402 of the aggregation per node (aggregationPerNode) indicates that the time of the input stream ($ input1) is within the window size.
図25は、オペレータツリー2500の一例を示す図である。オペレータツリー2500は、クエリパーサ207が生成クエリ2201を解析して生成したツリー構造である。生成クエリ2201の全体は、「STREAM:event」(2501)で識別される。
FIG. 25 is a diagram illustrating an example of the operator tree 2500. The operator tree 2500 has a tree structure generated by the query parser 207 analyzing the generated query 2201. The entire generation query 2201 is identified by “STREAM: event” (2501).
Query countPerEvent(2502)は、図22に示した「イベント毎に集計」(2212)のクエリに対応する。Query countPerEvent(2502)は、ウインドウサイズ=120秒のTIME_WINDOWオペレータ2503と、ストリームデータを集約するGroup_Byオペレータ2504と、120秒間隔で集約結果(countPrEvent2508)を出力するRSTREAMオペレータ2505を含む。
Query countPerEvent (2502) corresponds to the query “Aggregate by event” (2212) shown in FIG. The Query countPerEvent (2502) includes a TIME_WINDOW operator 2503 with a window size = 120 seconds, a Group_By operator 2504 that aggregates stream data, and an RSTREAM operator 2505 that outputs an aggregation result (countPrEvent 2508) at intervals of 120 seconds.
Query countPerNode(2507)は、図22に示した「ノード毎に集計」(2212)のクエリに対応する。Query countPerNondEvent(2502)は、ウインドウサイズ=60秒のTIME_WINDOWオペレータ2503と、ストリームデータを集約するGroup_Byオペレータ2504と、120秒間隔で集約結果(countPerEven2511)を現在時刻のデータとして出力するRSTREAMオペレータ2505と、を含む。
Query countPerNode (2507) corresponds to the query “Aggregate by Node” (2212) shown in FIG. Query countPerNendEvent (2502) includes a TIME_WINDOW operator 2503 having a window size = 60 seconds, a Group_By operator 2504 for aggregating stream data, and an RSTREAM operator 2505 for outputting an aggregation result (countPerEven 2511) at 120-second intervals. including.
図26は、クエリ時間特性2600の一例を示す図である。クエリ時間特性2600は、クエリ時間特性算出部209が算出したクエリ単位の時間の特性を示す。
FIG. 26 is a diagram illustrating an example of the query time characteristic 2600. A query time characteristic 2600 indicates a time characteristic of a query unit calculated by the query time characteristic calculation unit 209.
クエリ時間特性2600のエントリ2602は、図25に示したQuery countPerEvent(2502)のデータ間隔が最大120秒であることを示す。
The entry 2602 of the query time characteristic 2600 indicates that the data interval of the Query countPerEvent (2502) shown in FIG. 25 is 120 seconds at the maximum.
クエリ時間特性2600のエントリ2603は、図25に示したQuery countPerNode(2502)のデータ間隔が最大60秒であることを示す。すなわち、入力ストリームとしてのevevtA804から出力ストリームとしてのeventSequenceA806までの時間差を示す。
The entry 2603 of the query time characteristic 2600 indicates that the data interval of the Query countPerNode (2502) shown in FIG. 25 is a maximum of 60 seconds. That is, the time difference from eventA804 as an input stream to eventSequenceA806 as an output stream is shown.
以上のように、クエリ時間特性算出部2800は、オペレータツリー2500に基づいて、各クエリやオペレータにおけるストリームデータの処理頻度をクエリ時間特性2600から算出することができる。なお、図示はしないが、各エントリ2601~2603に対応するテンプレート110またはクエリの名称また識別子をそれぞれ関連付けておくものとする。
As described above, the query time characteristic calculation unit 2800 can calculate the processing frequency of stream data in each query or operator from the query time characteristic 2600 based on the operator tree 2500. Although not shown, it is assumed that the template 110 or query name or identifier corresponding to each entry 2601 to 2603 is associated with each other.
図27は、テンプレート110の編集箇所の候補の一例を示す画面1011である。画面1011は、前記実施例1の図10と同様であり、クエリ生成部109の時間制約条件判定部211で生成されて、端末130に送信される。端末130では図示しない入出力装置に画面1011を表示する。
FIG. 27 shows a screen 1011 that shows an example of candidate edit locations of the template 110. The screen 1011 is the same as that in FIG. 10 of the first embodiment, and is generated by the time constraint condition determination unit 211 of the query generation unit 109 and transmitted to the terminal 130. The terminal 130 displays a screen 1011 on an input / output device (not shown).
生成クエリ2201内でテンプレート110の編集箇所の候補の一例を示す画面1011は、生成クエリ2201で編集箇所の候補を表示する領域1012と、具体的な編集箇所を指摘する領域1013を含む。
The screen 1011 that shows an example of the editing part candidate of the template 110 in the generation query 2201 includes an area 1012 for displaying the editing part candidate in the generation query 2201 and an area 1013 for indicating a specific editing part.
領域1012は、図22に示した生成クエリ2201のうち、編集箇所の候補を表示する領域である。図示の例では、図22に示した生成クエリ2201のうち、「イベント毎に集計」のcountPerEvent221が編集箇所の候補となった例を示す。
The area 1012 is an area for displaying candidates for edit locations in the generated query 2201 shown in FIG. In the example shown in the drawing, an example is shown in which, in the generated query 2201 shown in FIG.
具体的な編集箇所を示唆する領域1013は、10行目のクエリcountPerEventが120s間隔で、17行目のクエリcountPerNodeが60s間隔で、制約条件である時間制約2400($windowSize>$input)を満たしていないことが指摘される。
The area 1013 that suggests a specific edit location satisfies the constraint time constraint 2400 ($ windowSize> $ input) with the query countPerEvent on the 10th row at 120s intervals and the query countPerNode on the 17th row at 60s intervals. Not pointed out.
すなわち、本実施例1では、センサノードからのイベントが10秒間隔で入力ストリームとして入力され、120秒のウインドウで受け付けて、RSTREAMオペレータ2505が120秒間隔で集約し、出力時点の時刻のストリーム(countPerEvent)として出力する。
That is, in the first embodiment, events from the sensor node are input as an input stream at 10-second intervals, received in a 120-second window, aggregated at 120-second intervals by the RSTREAM operator 2505, and a stream of the time at the time of output ( output as countPerEvent).
次に、RSTREAMオペレータ2510は、120秒間隔で受信したストリーム(countPerEvent)を、集約してセンサノード毎に集約してcountPerNodeとして出力するが、集約の間隔が60秒であるため、毎回集約演算を実行することはできない。
Next, the RSTREAM operator 2510 aggregates the streams (countPerEvent) received at 120-second intervals, aggregates the streams for each sensor node, and outputs them as countPerNode. However, since the aggregation interval is 60 seconds, the aggregation calculation is performed every time. It cannot be executed.
したがって、時間制約条件判定部3000は、端末130に対してテンプレート110のうち、120秒のウインドウオペレータ2503を使用するクエリcountPerEvent221の編集を推奨する。
Therefore, the time constraint condition determination unit 3000 recommends that the terminal 130 edit the query countPerEvent 221 that uses the 120-second window operator 2503 in the template 110.
図28は、クエリ時間特性算出部2800で行われる処理の一例を示すフローチャートである。この処理は、クエリパーサ207がオペレータツリー2500を出力したときに実行される(2801)。
FIG. 28 is a flowchart illustrating an example of processing performed by the query time characteristic calculation unit 2800. This process is executed when the query parser 207 outputs the operator tree 2500 (2801).
クエリ時間特性算出部2800は、オペレータツリー2500ごとに処理を行うループ(2802~2808)と、オペレータツリー2500内のクエリ単位で順次処理を行うループ(2803~2807)の、二重のループを含む。
The query time characteristic calculation unit 2800 includes a double loop of a loop (2802 to 2808) that performs processing for each operator tree 2500 and a loop (2803 to 2807) that sequentially performs processing in units of queries in the operator tree 2500. .
まず、クエリ時間特性算出部2800は、オペレータツリー2500内のクエリをひとつ読み込む。そして、クエリ時間特性算出部2800は、当該クエリにRSTREAMオペレータを含む場合には、出力ストリームのデータ間隔を、入力ストリームのデータ間隔と、RSTREAMのうちの出力間隔の最大値をデータ間隔とする(2804)。
First, the query time characteristic calculation unit 2800 reads one query in the operator tree 2500. When the query includes an RSTREAM operator, the query time characteristic calculation unit 2800 uses the data interval of the output stream as the data interval of the input stream and the maximum value of the output interval of the RSTREAM as the data interval ( 2804).
次に、クエリ時間特性算出部2800は、読み込んだクエリにRSTREAMオペレータを含まない場合には、入力ストリームのデータ間隔と、出力ストリームのデータ間隔を同一とする(2805)。
Next, when the read query does not include the RSTREAM operator, the query time characteristic calculation unit 2800 sets the data interval of the input stream and the data interval of the output stream to be the same (2805).
クエリ時間特性算出部2800は、当該クエリで算出した入力ストリームと出力ストリームのデータ間隔の関係を、クエリ時間特性2600のエントリとして追加する(2806)。
The query time characteristic calculation unit 2800 adds the relationship between the data interval between the input stream and the output stream calculated by the query as an entry of the query time characteristic 2600 (2806).
クエリ時間特性算出部2800は、各クエリについて上記処理を実行し、オペレータツリー2500が複数生成された場合には、ひとつのオペレータツリーについて上記処理が終了すると次のオペレータツリー2500について処理を行う。そして、すべてのオペレータツリー2500について上記処理が完了するとクエリ時間特性2600を出力して終了する。
The query time characteristic calculation unit 2800 executes the above processing for each query, and when a plurality of operator trees 2500 are generated, the processing is performed for the next operator tree 2500 when the above processing is completed for one operator tree. When the above processing is completed for all the operator trees 2500, the query time characteristic 2600 is output and the processing ends.
図29Aは、データ間隔の算出に関するRSTREAMオペレータを含むクエリの一例を示す図である。図示のクエリQ2(2901)は、センサノードから10秒のウインドウオペレータでストリームデータを受信し、RSTREAMオペレータが10秒間隔で集約したストリームを出力する例を示す。
FIG. 29A is a diagram illustrating an example of a query including an RSTREAM operator regarding calculation of a data interval. The illustrated query Q2 (2901) shows an example in which stream data is received from a sensor node by a 10-second window operator, and a stream aggregated by the RSTREAM operator at 10-second intervals is output.
図29Bは、データ間隔の算出に関するRSTREAMを含むオペレータツリー1502の一例を示す図である。オペレータツリー1502は、ストリームデータ処理開発サーバ107のクエリパーサ207が図29Aに示したクエリQ2(2901)から生成したものである。
FIG. 29B is a diagram illustrating an example of an operator tree 1502 including an RSTREAM regarding calculation of a data interval. The operator tree 1502 is generated from the query Q2 (2901) shown in FIG. 29A by the query parser 207 of the stream data processing development server 107.
ウインドウオペレータ2903が、10秒のウインドウサイズで入力ストリームを受け付け、GROUP_BYオペレータ2904に出力する。GROUP_BYオペレータ1504は、ウインドウオペレータ1503から受け付けた入力ストリームを、集約して出力する。
The window operator 2903 receives the input stream with a window size of 10 seconds and outputs it to the GROUP_BY operator 2904. The GROUP_BY operator 1504 collects and outputs the input streams received from the window operator 1503.
RSTREAMオペレータ1505は、GROUP_BYオペレータ1504からの入力ストリームを10秒間隔で現在時刻のデータとして出力する。
The STRREAM operator 1505 outputs the input stream from the GROUP_BY operator 1504 as current time data at 10-second intervals.
図29Cは、図29Aに示したクエリQ2のRSTREAMオペレータのデータ間隔の算出の一例を示す図である。
FIG. 29C is a diagram showing an example of calculation of the data interval of the RSTREAM operator of the query Q2 shown in FIG. 29A.
図示の例では、0~10秒の間にストリームデータA1、A2、A3が順次ウインドウオペレータ2903に入力される。ウインドウオペレータ2903に入力されたストリームデータは、ひとつのグループに集約されて(2904)、RSTREAMオペレータ2905へ入力される。RSTREAMオペレータ2905は、10秒間隔でグループ化したストリームデータを、10秒の時点のストリームデータA1~A3として出力する。
In the illustrated example, stream data A1, A2, and A3 are sequentially input to the window operator 2903 within 0 to 10 seconds. The stream data input to the window operator 2903 is collected into one group (2904) and input to the RSTREAM operator 2905. The RSTREAM operator 2905 outputs stream data grouped at intervals of 10 seconds as stream data A1 to A3 at the time of 10 seconds.
図30は、時間制約条件判定部3000で行われる処理の一例を示すフローチャートである。この処理は、クエリ時間特性算出部2800からクエリ時間特性2600が出力されたときに実行される(3001)。
FIG. 30 is a flowchart illustrating an example of processing performed by the time constraint condition determination unit 3000. This process is executed when the query time characteristic 2600 is output from the query time characteristic calculation unit 2800 (3001).
時間制約条件判定部3000は、テンプレート呼び出しクエリ2101内のテンプレート110ごとに処理を行うループ(3002~3010)と、テンプレート110内の時間制約2400単位で順次処理を行うループ(3003~3009)の二重のループを有する。
The time constraint condition determination unit 3000 includes two loops (3002 to 3010) for performing processing for each template 110 in the template call query 2101 and loops (3003 to 3009) for performing sequential processing in units of time constraints 2400 in the template 110. Has a heavy loop.
まず、時間制約条件判定部3000は、テンプレート呼び出しクエリ2101を読み込んで、呼び出すテンプレート110を特定する。時間制約条件判定部3000は、特定されたテンプレート110に対応する時間制約2400をストレージ123から読み込む。また、時間制約条件判定部3000は、特定されたテンプレート110に対応するクエリ時間特性2600を取得する。時間制約条件判定部3000は、入力された入力ストリーム時間特性2301と生成された生成クエリ2201を読み込む。
First, the time constraint condition determination unit 3000 reads the template call query 2101 and identifies the template 110 to be called. The time constraint condition determination unit 3000 reads the time constraint 2400 corresponding to the identified template 110 from the storage 123. Further, the time constraint condition determination unit 3000 acquires the query time characteristic 2600 corresponding to the identified template 110. The time constraint condition determination unit 3000 reads the input stream characteristic 2301 that has been input and the generated query 2201 that has been generated.
時間制約条件判定部3000は、読み込んだ時間制約2400がパラメータ(例えば、ウインドウサイズなど)を含む場合には、テンプレート呼び出しクエリ2101に記載された値を該当するパラメータに設定する(3004)。
When the read time constraint 2400 includes a parameter (for example, window size), the time constraint condition determination unit 3000 sets the value described in the template call query 2101 as the corresponding parameter (3004).
時間制約条件判定部3000は、当該テンプレート110について、入力ストリーム時間特性2301とクエリ時間特性2600から、当該テンプレート処理の時間特性を算出する(3005)。
The time constraint condition determination unit 3000 calculates the time characteristic of the template processing for the template 110 from the input stream time characteristic 2301 and the query time characteristic 2600 (3005).
テンプレート処理の時間特性としては、例えば、時間制約条件判定部3000が、当該テンプレート110において入力ストリーム時間特性2301を適用した場合の入力ストリームにと出力ストリームのデータ間隔を算出する。なお、入力ストリーム時間特性2301の適用は、当該入力ストリーム時間特性2301の影響を受けるテンプレート110のクエリ時間特性2600だけでよい。
As the time characteristic of the template processing, for example, the time constraint condition determination unit 3000 calculates the data interval between the input stream and the output stream when the input stream time characteristic 2301 is applied in the template 110. Note that the input stream time characteristic 2301 may be applied only to the query time characteristic 2600 of the template 110 that is affected by the input stream time characteristic 2301.
時間制約条件判定部3000は、ステップ3005で算出したテンプレート処理の時間特性が、時間制約2400を満たすか否かを判定する(3006)。テンプレート処理の時間特性が時間制約2400を満たしていればステップ3009または3010へ進んで次の時間制約2400またはテンプレート110について上記処理を繰り返す。
The time constraint condition determination unit 3000 determines whether or not the time characteristic of the template process calculated in step 3005 satisfies the time constraint 2400 (3006). If the time characteristic of the template processing satisfies the time constraint 2400, the process proceeds to step 3009 or 3010 and the above processing is repeated for the next time constraint 2400 or template 110.
一方、テンプレート処理の時間特性が時間制約2400を満たしていなければステップ3008へ進む。ステップ3008では、時間制約条件判定部3000が、生成クエリ2201で当該テンプレート110に対応する部分を編集箇所の候補として、図27に示した編集箇所を指摘する領域1013に出力する。なお、時間制約条件判定部3000が、編集する箇所の候補を当該テンプレート110とし、テンプレート処理の時間特性(データ間隔)に関する情報を付加しても良い。あるいは、時間制約条件判定部3000が、当該テンプレート110の名称を編集箇所として出力し、時間制約2400に対するテンプレート処理の時間特性を付加しても良い。
On the other hand, if the time characteristic of the template processing does not satisfy the time constraint 2400, the process proceeds to step 3008. In step 3008, the time constraint condition determination unit 3000 outputs the portion corresponding to the template 110 in the generated query 2201 as a candidate for an editing portion and outputs it to the area 1013 indicating the editing portion shown in FIG. Note that the time constraint condition determination unit 3000 may use the template 110 as a candidate for a location to be edited, and add information regarding the time characteristics (data interval) of the template processing. Alternatively, the time constraint condition determination unit 3000 may output the name of the template 110 as an edit location and add the template processing time characteristic for the time constraint 2400.
以上の処理によって、時間制約条件判定部3000は、テンプレート110毎に入力ストリーム時間特性2301を加味したテンプレート処理の時間特性(データ間隔)を算出し、テンプレート処理の時間特性が時間制約2400を満足しないときには、対象のテンプレート110を編集箇所の候補として特定し、編集箇所の候補として出力することができる。
Through the above processing, the time constraint condition determination unit 3000 calculates the time characteristics (data interval) of the template processing in consideration of the input stream time characteristics 2301 for each template 110, and the time characteristics of the template processing do not satisfy the time constraints 2400. In some cases, the target template 110 can be specified as a candidate for an edit location and output as a candidate for an edit location.
図31は、データ間隔に関して時間制約条件判定部3000で行われる処理の一例を示す図である。テンプレート処理の時間特性(データ間隔)3101は、図23に示した入力ストリーム時間特性2301の設定を、Query countPerEvent2212のテンプレート110(aggregationPerEvent(3102))に適用した例を示す。
FIG. 31 is a diagram illustrating an example of processing performed by the time constraint condition determination unit 3000 regarding the data interval. A time characteristic (data interval) 3101 of the template processing indicates an example in which the setting of the input stream time characteristic 2301 illustrated in FIG. 23 is applied to the template 110 (aggregationPerEvent (3102)) of the Query countPerEvent 2212.
入力ストリームのデータ間隔は10秒であり、Query countPerEvent2212では、120秒間隔でデータの集約を行ってストリームを出力する。これに対して、時間制約2400は、
$windowSize > $input
と定義されており、ウインドウサイズは、入力ストリームのデータ間隔より大きく設定されねばならない。 The data interval of the input stream is 10 seconds, and theQuery countPerEvent 2212 aggregates data at intervals of 120 seconds and outputs the stream. In contrast, the time constraint 2400 is
$ WindowSize> $ input
The window size must be set larger than the data interval of the input stream.
$windowSize > $input
と定義されており、ウインドウサイズは、入力ストリームのデータ間隔より大きく設定されねばならない。 The data interval of the input stream is 10 seconds, and the
$ WindowSize> $ input
The window size must be set larger than the data interval of the input stream.
ここで、countPerEvent2212の後段のクエリcountPerNodeでは、60秒間隔でストリームデータの処理を行うため、入力ストリームが120秒間隔であるため、時間制約2400を満たすことはできない。
Here, in the query countPerNode subsequent to countPerEvent 2212, since the stream data is processed at intervals of 60 seconds, the input stream is at intervals of 120 seconds, so the time constraint 2400 cannot be satisfied.
そして、時間制約条件判定部3000は、生成クエリ2201のうち、countPerEvent2212に対応する部分を、編集箇所の候補として図27に示した領域1013に出力する。
Then, the time constraint condition determination unit 3000 outputs the portion corresponding to the countPerEvent 2212 in the generated query 2201 to the area 1013 shown in FIG.
クエリ開発者201は、端末130の画面1011に表示された領域1013及び領域1012を参照することで、制約条件である時間制約2400を満たしていない編集箇所の候補を容易に把握することができる。
The query developer 201 can easily grasp a candidate for an edited portion that does not satisfy the time constraint 2400 that is a constraint condition by referring to the region 1013 and the region 1012 displayed on the screen 1011 of the terminal 130.
特に、テンプレート110の編集やパラメータ値の見直しが必要になった場合、クエリ開発者201は、制約条件を満たしていない部分と値を領域1013で知ることができるので、編集または見直しを行う部分を容易に特定することが可能となる。図27の例では、countPerEvent2212のデータ間隔が120秒のため、時間制約2400を満たしていないという問題がある。したがって、クエリ開発者201は、countPerEvent2212のテンプレート110のデータ間隔を見直すことで、時間制約2400を満足することができる。
In particular, when the template 110 needs to be edited or the parameter value needs to be reviewed, the query developer 201 can know the part that does not satisfy the constraint condition and the value in the area 1013. It becomes possible to specify easily. In the example of FIG. 27, there is a problem that the time constraint 2400 is not satisfied because the data interval of countPerEvent 2212 is 120 seconds. Therefore, the query developer 201 can satisfy the time constraint 2400 by reviewing the data interval of the template 110 of countPerEvent 2212.
以上のように、本実施例2では、クエリ開発者201が設定した入力ストリーム時間特性2301と、クエリ開発者201が選択したテンプレート110をクエリ生成部109へ入力し、クエリ生成部109がテンプレート110毎のクエリ時間特性2600を算出し、さらに、入力ストリーム時間特性2301を加味したテンプレート処理の時間特性を算出する。
As described above, in the second embodiment, the input stream time characteristic 2301 set by the query developer 201 and the template 110 selected by the query developer 201 are input to the query generation unit 109, and the query generation unit 109 receives the template 110. A query time characteristic 2600 for each time is calculated, and further, a time characteristic of template processing taking into account the input stream time characteristic 2301 is calculated.
そして、クエリ生成部109は、テンプレート処理の時間特性と、テンプレート開発者202が設定した時間制約2400(制約条件)とを比較して、各テンプレート処理の時間特性が制約条件を満たしているか否かを判定する。
Then, the query generation unit 109 compares the time characteristic of the template process with the time constraint 2400 (constraint condition) set by the template developer 202, and determines whether the time characteristic of each template process satisfies the constraint condition. Determine.
クエリ生成部109は、テンプレート処理の時間特性が制約条件を満たしていないテンプレート110を特定して、端末130へ出力する。これにより、テンプレート110を利用するクエリ開発者201は、ストリームデータ処理におけるテンプレートベースのクエリ開発において、時間的制約などの制約条件に基づいて、テンプレート110の編集の有無の判定や、編集箇所の特定を計算機で行うことにより、クエリの開発を容易にすることができる。
The query generation unit 109 identifies the template 110 whose template processing time characteristics do not satisfy the constraint condition, and outputs the template 110 to the terminal 130. As a result, the query developer 201 using the template 110 can determine whether or not the template 110 has been edited and specify the editing location in template-based query development in stream data processing based on constraints such as time constraints. It is possible to facilitate the development of queries by performing the above with a computer.
図32~図35は第3の実施例を示す。本実施例3では、テンプレート開発者202がテンプレート110の時間特性について定義を生成しておき、テンプレート定義時間特性3200としてストレージ123に格納しておく。そして、時間制約条件判定部211は、判定対象のテンプレート110にテンプレート定義時間特性3200が存在する場合には、クエリ時間特性210をテンプレート定義時間特性3200に置き換えて、時間制約111との比較を行う。その他の構成は前記実施例1と同様である。
32 to 35 show a third embodiment. In the third embodiment, the template developer 202 generates a definition for the time characteristic of the template 110 and stores it in the storage 123 as the template definition time characteristic 3200. When the template definition time characteristic 3200 exists in the determination target template 110, the time constraint condition determination unit 211 replaces the query time characteristic 210 with the template definition time characteristic 3200 and performs comparison with the time constraint 111. . Other configurations are the same as those of the first embodiment.
前記実施例1の図3Bに示した自己相関テンプレート110-2は、図8に示したクエリeventSequenceA806となり、NOW_WINDOWオペレータ816と、30秒のTIME_WINDOWオペレータ817の出力をJOINオペレータ818で結合している。eventSequenceA806は、図5の生成クエリ206の503に相当し、イベントA1を検出してから30秒以内にイベントA2を検出するクエリである。
The autocorrelation template 110-2 shown in FIG. 3B of the first embodiment is the query eventSequenceA 806 shown in FIG. 8, and the output of the NOW_WINDOW operator 816 and the TIME_WINDOW operator 817 of 30 seconds is combined by the JOIN operator 818. The event Sequence A 806 corresponds to the generation query 206 503 in FIG. 5 and is a query that detects the event A2 within 30 seconds after the event A1 is detected.
ストリームデータ処理の実際のテンプレートでは、30秒ウィンドウを用いる場合に、現在から30秒後のイベントとの相関を取ることはなく、現在よりも30秒前のイベントとの相関のみを取る場合がある。このような自己相関テンプレートでは、30秒のウインドウを維持する必要がない。そのためこのような場合には、テンプレート開発者202がテンプレート定義時間特性3200を生成して、自己相関テンプレート110-2の時間制約を変更する。
In the actual template of stream data processing, when a 30-second window is used, there is no correlation with an event 30 seconds after the present, and there may be only a correlation with an event 30 seconds before the present. . Such an autocorrelation template does not need to maintain a 30 second window. Therefore, in such a case, the template developer 202 generates a template definition time characteristic 3200 and changes the time constraint of the autocorrelation template 110-2.
図33は、テンプレート定義時間特性3200の一例を示す図である。テンプレート定義時間特性3200は、テンプレート名3201と、時間制約3202から構成され、テンプレート110毎に設定される。
FIG. 33 is a diagram showing an example of the template definition time characteristic 3200. The template definition time characteristic 3200 includes a template name 3201 and a time constraint 3202 and is set for each template 110.
図示の例では、自己相関テンプレート110-2のテンプレート定義時間特性3200を示しており、時間制約3202は遅延=$output-$input=0に設定される。すなわち、自己相関テンプレート110-2は、図8で示したように、30秒のTIME_WINDOWオペレータ817を含むものの、現在から30秒前とのイベントの相関のみを見るというテンプレートの仕様であるため、遅延なしでJOINオペレータ818を稼働させることができる。
In the illustrated example, the template definition time characteristic 3200 of the autocorrelation template 110-2 is shown, and the time constraint 3202 is set to delay = $ output− $ input = 0. That is, as shown in FIG. 8, the autocorrelation template 110-2 includes a 30-second TIME_WINDOW operator 817, but is a template specification that only looks at the correlation of events with 30 seconds before the current time. The JOIN operator 818 can be run without.
テンプレート定義時間特性3200は、テンプレート110の実際の運用に応じてテンプレート開発者202が設定した時間に関するパラメータを含む情報である。
The template definition time characteristic 3200 is information including a parameter relating to a time set by the template developer 202 according to the actual operation of the template 110.
図34は、時間制約条件判定部211で行われる処理の一例を示すフローチャートである。このフローチャートは、前記実施例1の図17に示したステップ1705とステップ1706の間に、ステップ3401とステップ3402を加えたもので、その他の処理は前記実施例1と同様である。
FIG. 34 is a flowchart illustrating an example of processing performed by the time constraint condition determination unit 211. In this flowchart, step 3401 and step 3402 are added between step 1705 and step 1706 shown in FIG. 17 of the first embodiment, and other processes are the same as those in the first embodiment.
ステップ1705では、前述の通り時間制約条件判定部211は、テンプレート110について、入力ストリーム時間特性204とクエリ時間特性210から、当該テンプレート110における入力ストリームと出力ストリームの時間特性を、テンプレート処理の時間特性として算出する。
In step 1705, as described above, the time constraint condition determination unit 211 determines the time characteristics of the input stream and the output stream in the template 110 from the input stream time characteristics 204 and the query time characteristics 210 for the template 110, and the time characteristics of the template processing. Calculate as
ステップ3401では、時間制約条件判定部211が、ストレージ123に当該テンプレート110に対応するテンプレート定義時間特性3200が存在するか否かを判定する。テンプレート定義時間特性3200が存在しない場合、時間制約条件判定部211は、ステップ1706へ進んで前記実施例1と同様の処理を実施する。
In step 3401, the time constraint condition determination unit 211 determines whether or not the template definition time characteristic 3200 corresponding to the template 110 exists in the storage 123. If the template definition time characteristic 3200 does not exist, the time constraint condition determination unit 211 proceeds to step 1706 and performs the same processing as in the first embodiment.
一方、当該テンプレート110に対応するテンプレート定義時間特性3200が存在する場合、時間制約条件判定部211は、ステップ3402で、当該テンプレート110に対応するテンプレート定義時間特性3200を読み込む。そして、時間制約条件判定部211は、上記算出したテンプレート処理の時間特性を、テンプレート定義時間特性3200で上書きする。
On the other hand, when the template definition time characteristic 3200 corresponding to the template 110 exists, the time constraint condition determination unit 211 reads the template definition time characteristic 3200 corresponding to the template 110 in step 3402. Then, the time constraint condition determination unit 211 overwrites the calculated template processing time characteristic with the template definition time characteristic 3200.
これにより、テンプレート処理の時間特性の内容は、テンプレート定義時間特性3200の内容に置き換えられる。したがって、次のステップ1707では、時間制約条件判定部211が、テンプレート定義時間特性3200の内容が時間制約111を満たすか否かを判定することになる。
Thereby, the content of the time characteristic of the template processing is replaced with the content of the template definition time characteristic 3200. Therefore, in the next step 1707, the time constraint condition determination unit 211 determines whether or not the content of the template definition time characteristic 3200 satisfies the time constraint 111.
図35は、時間制約条件判定部211で行われる処理の一例を示す図である。テンプレート処理の時間特性1801は、前記実施例1と同様であり、入力ストリーム時間特性204を加味したeventSequenceA(806)のテンプレート処理の時間特性1802は、
-40s <= eventSequenceA - eventB <= 10s
で表される。 FIG. 35 is a diagram illustrating an example of processing performed by the time constraintcondition determination unit 211. The time characteristic 1801 of the template process is the same as that of the first embodiment, and the time characteristic 1802 of the template process of the eventSequence A (806) taking the input stream time characteristic 204 into consideration is
−40 s ≦ = eventSequence A − event B ≦ = 10 s
It is represented by
-40s <= eventSequenceA - eventB <= 10s
で表される。 FIG. 35 is a diagram illustrating an example of processing performed by the time constraint
−40 s ≦ = eventSequence A − event B ≦ = 10 s
It is represented by
ここで、本実施例3では、テンプレート処理の時間特性1802をテンプレート定義時間特性3200で上書きするので、
eventA - eventSequenceA = 0
の関係となり、上書き後のテンプレート処理の時間特性3503は、
-10s <= eventSequenceA - eventB <= 10s
となる。 In the third embodiment, the template processing time characteristic 1802 is overwritten with the templateprocessing time characteristic 1802.
eventA-eventSequenceA = 0
Thetime characteristic 3503 of the template processing after overwriting is
−10s ≦ = eventSequenceA −eventB ≦ = 10s
It becomes.
eventA - eventSequenceA = 0
の関係となり、上書き後のテンプレート処理の時間特性3503は、
-10s <= eventSequenceA - eventB <= 10s
となる。 In the third embodiment, the template processing time characteristic 1802 is overwritten with the template
eventA-eventSequenceA = 0
The
−10s ≦ = eventSequenceA −eventB ≦ = 10s
It becomes.
したがって、当該自己相関テンプレート110-2の時間制約1803の、
-30s <= eventSequenceA - eventB <= 30s
という制約条件を満足することができる。 Therefore, the time constraint 1803 of the autocorrelation template 110-2 is
−30s ≦ = eventSequence A −eventB ≦ = 30s
The above constraint can be satisfied.
-30s <= eventSequenceA - eventB <= 30s
という制約条件を満足することができる。 Therefore, the time constraint 1803 of the autocorrelation template 110-2 is
−30s ≦ = eventSequence A −eventB ≦ = 30s
The above constraint can be satisfied.
したがって、テンプレート定義時間特性3200を追加してテンプレート処理の時間特性を上書きすることにより、時間特性を限定した環境で当該テンプレート110を利用することが可能となる。これにより、テンプレート110を利用する環境を拡大することが可能となって、ストリームデータのクエリの開発を容易にすることができる。
Therefore, by adding the template definition time characteristic 3200 and overwriting the time characteristic of the template processing, the template 110 can be used in an environment where the time characteristic is limited. As a result, the environment for using the template 110 can be expanded, and the development of a query for stream data can be facilitated.
なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に記載したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加、削除、又は置換のいずれもが、単独で、又は組み合わせても適用可能である。
In addition, this invention is not limited to the above-mentioned Example, Various modifications are included. For example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Further, a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment. In addition, any of the additions, deletions, or substitutions of other configurations can be applied to a part of the configuration of each embodiment, either alone or in combination.
また、上記の各構成、機能、処理部、及び処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、及び機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。
In addition, each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. In addition, each of the above-described configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。
Also, the control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.
Claims (12)
- プロセッサとメモリとを備えた計算機で、ストリームデータ処理のクエリの開発を支援するクエリ開発支援方法であって、
前記計算機が、前記ストリームデータ処理の所定の処理を予め記述した1以上のテンプレートを含むテンプレート呼び出しクエリを受け付ける第1のステップと、
前記計算機が、前記ストリームデータ処理の入力ストリームの特性情報を受け付ける第2のステップと、
前記計算機が、前記テンプレート呼び出しクエリからストリームデータ処理のクエリを生成する第3のステップと、
前記計算機が、前記ストリームデータ処理のクエリからオペレータツリーを生成する第4のステップと、
前記計算機が、前記オペレータツリーから前記テンプレートのクエリ単位でオペレータ間の時間特性をクエリ時間特性として算出する第5のステップと、
前記計算機が、前記クエリ時間特性と、前記入力ストリームの特性情報から前記テンプレート毎にテンプレート処理の時間特性を算出する第6のステップと、
前記計算機が、前記テンプレート処理の時間特性が予め設定したテンプレートの制約条件を満足しているかを判定する第7のステップと、
を含むことを特徴とするクエリ開発支援方法。 A query development support method for supporting development of a stream data processing query in a computer including a processor and a memory,
A first step in which the computer receives a template call query including one or more templates in which predetermined processing of the stream data processing is described in advance;
A second step in which the computer receives characteristic information of an input stream of the stream data processing;
A third step in which the computer generates a stream data processing query from the template call query;
A fourth step in which the computer generates an operator tree from the stream data processing query;
A fifth step in which the computer calculates a time characteristic between operators as a query time characteristic in the query unit of the template from the operator tree;
A sixth step in which the calculator calculates a time characteristic of template processing for each template from the query time characteristic and characteristic information of the input stream;
A seventh step in which the computer determines whether a time characteristic of the template processing satisfies a template restriction condition set in advance;
A query development support method comprising: - 請求項1に記載のクエリ開発支援方法であって、
前記計算機が、前記テンプレート処理の時間特性が前記テンプレートの制約条件を満足していない場合に、当該テンプレートを編集の候補として特定する第8のステップと、
をさらに含むことを特徴とするクエリ開発支援方法。 The query development support method according to claim 1,
An eighth step in which the computer specifies the template as a candidate for editing when the time characteristic of the template processing does not satisfy the constraints of the template;
A query development support method, further comprising: - 請求項2に記載のクエリ開発支援方法であって、
前記計算機が、前記編集の候補として特定されたテンプレートに対応する前記テンプレート呼び出しクエリを出力する第9のステップと、
をさらに含むことを特徴とするクエリ開発支援方法。 The query development support method according to claim 2,
A ninth step in which the computer outputs the template call query corresponding to the template identified as the candidate for editing;
A query development support method, further comprising: - 請求項1に記載のクエリ開発支援方法であって、
前記第2のステップは、
前記入力ストリームの特性情報として、入力ストリームの遅延時間を受け付け、
前記第6のステップは、
前記テンプレートのクエリ単位でオペレータ間の時間特性を遅延時間としてクエリ時間特性を算出し、
前記第7のステップは、
前記クエリ時間特性に前記入力ストリームの遅延時間を加算して前記テンプレート毎にテンプレート処理の時間特性を算出することを特徴とするクエリ開発支援方法。 The query development support method according to claim 1,
The second step includes
As the input stream characteristic information, accept the delay time of the input stream,
The sixth step includes
The query time characteristic is calculated using the time characteristic between operators as a delay time in the query unit of the template,
The seventh step includes
A query development support method, comprising: adding a delay time of the input stream to the query time characteristic to calculate a time characteristic of template processing for each template. - 請求項1に記載のクエリ開発支援方法であって、
前記第2のステップは、
前記入力ストリームの特性情報として、入力ストリームのデータ間隔を受け付け、
前記第6のステップは、
前記テンプレートのクエリ単位でオペレータ間の時間特性をデータ間隔としてクエリ時間特性を算出し、
前記第7のステップは、
前記クエリ時間特性に前記入力ストリームのデータ間隔を適用して前記テンプレート毎にテンプレート処理の時間特性を算出することを特徴とするクエリ開発支援方法。 The query development support method according to claim 1,
The second step includes
As the input stream characteristic information, an input stream data interval is accepted,
The sixth step includes
Query time characteristics are calculated using the time characteristics between operators as the data interval in the query unit of the template,
The seventh step includes
A query development support method, wherein a time characteristic of template processing is calculated for each template by applying a data interval of the input stream to the query time characteristic. - 請求項1に記載のクエリ開発支援方法であって、
前記第7のステップは、
当該テンプレートに対応するテンプレート定義時間特性が存在するか否かを判定し、当該テンプレートに対応するテンプレート定義時間特性が存在する場合には、テンプレート定義時間特性の内容で前記テンプレート処理の時間特性の内容を置き換えることを特徴とするクエリ開発支援方法。 The query development support method according to claim 1,
The seventh step includes
It is determined whether or not there is a template definition time characteristic corresponding to the template. If there is a template definition time characteristic corresponding to the template, the content of the template processing time characteristic is the content of the template definition time characteristic. A query development support method characterized by replacing. - プロセッサとメモリとを備えた計算機で、ストリームデータ処理のクエリの開発を支援するクエリ開発支援装置であって、
前記ストリームデータ処理の所定の処理を予め記述した1以上のテンプレートを含むテンプレート呼び出しクエリと、前記ストリームデータ処理の入力ストリームの特性情報を受け付けて、前記テンプレート呼び出しクエリからストリームデータ処理のクエリを生成するクエリ生成部を有し、
前記クエリ生成部は、
前記生成したストリームデータ処理のクエリからオペレータツリーを生成するクエリパーサと、
前記オペレータツリーから前記テンプレートのクエリ単位でオペレータ間の時間特性をクエリ時間特性として算出するクエリ時間特性算出部と、
前記計算機が、前記クエリ時間特性と、前記入力ストリームの特性情報から前記テンプレート毎にテンプレート処理の時間特性を算出し、前記テンプレート処理の時間特性が予め設定したテンプレートの制約条件を満足しているかを判定する時間制約条件判定部と、
を含むことを特徴とするクエリ開発支援装置。 A query development support device that supports development of a query for stream data processing in a computer including a processor and a memory,
A template call query including one or more templates describing in advance the predetermined processing of the stream data processing and characteristic information of the input stream of the stream data processing are received, and a stream data processing query is generated from the template call query A query generator,
The query generation unit
A query parser for generating an operator tree from the generated stream data processing query;
A query time characteristic calculating unit that calculates a time characteristic between operators as a query time characteristic in the query unit of the template from the operator tree;
The computer calculates a template processing time characteristic for each template from the query time characteristic and the input stream characteristic information, and whether the time characteristic of the template processing satisfies a preset template constraint condition. A time constraint condition determination unit for determining;
A query development support device comprising: - 請求項7に記載のクエリ開発支援装置であって、
前記時間制約条件判定部は、
前記テンプレート処理の時間特性が前記テンプレートの制約条件を満足していない場合に、当該テンプレートを編集の候補として特定することを特徴とするクエリ開発支援装置。 The query development support device according to claim 7,
The time constraint condition determination unit
A query development support apparatus, characterized in that, when a time characteristic of the template processing does not satisfy the constraint condition of the template, the template is specified as an editing candidate. - 請求項8に記載のクエリ開発支援装置であって、
前記時間制約条件判定部は、
前記編集の候補として特定されたテンプレートに対応する前記テンプレート呼び出しクエリを出力することを特徴とするクエリ開発支援装置。 The query development support device according to claim 8,
The time constraint condition determination unit
A query development support apparatus that outputs the template call query corresponding to a template identified as a candidate for editing. - 請求項7に記載のクエリ開発支援装置であって、
前記クエリ生成部は、
前記入力ストリームの特性情報として、入力ストリームの遅延時間を受け付け、
前記クエリ時間特性算出部は、
前記テンプレートのクエリ単位でオペレータ間の時間特性を遅延時間としてクエリ時間特性を算出し、
前記時間制約条件判定部は、
前記クエリ時間特性に前記入力ストリームの遅延時間を加算して前記テンプレート毎にテンプレート処理の時間特性を算出することを特徴とするクエリ開発支援装置。 The query development support device according to claim 7,
The query generation unit
As the input stream characteristic information, accept the delay time of the input stream,
The query time characteristic calculation unit includes:
The query time characteristic is calculated using the time characteristic between operators as a delay time in the query unit of the template,
The time constraint condition determination unit
A query development support apparatus, wherein a delay characteristic of the input stream is added to the query time characteristic to calculate a time characteristic of template processing for each template. - 請求項7に記載のクエリ開発支援装置であって、
前記クエリ生成部は、
前記入力ストリームの特性情報として、入力ストリームのデータ間隔を受け付け、
前記クエリ時間特性算出部は、
前記テンプレートのクエリ単位でオペレータ間の時間特性をデータ間隔としてクエリ時間特性を算出し、
前記時間制約条件判定部は、
前記クエリ時間特性に前記入力ストリームのデータ間隔を適用して前記テンプレート毎にテンプレート処理の時間特性を算出することを特徴とするクエリ開発支援装置。 The query development support device according to claim 7,
The query generation unit
As the input stream characteristic information, an input stream data interval is accepted,
The query time characteristic calculation unit includes:
Query time characteristics are calculated using the time characteristics between operators as the data interval in the query unit of the template,
The time constraint condition determination unit
A query development support apparatus, wherein a time characteristic of template processing is calculated for each template by applying a data interval of the input stream to the query time characteristic. - 請求項7に記載のクエリ開発支援装置であって、
前記時間制約条件判定部は、
当該テンプレートに対応するテンプレート定義時間特性が存在するか否かを判定し、当該テンプレートに対応するテンプレート定義時間特性が存在する場合には、テンプレート定義時間特性の内容で前記テンプレート処理の時間特性の内容を置き換えることを特徴とするクエリ開発支援装置。 The query development support device according to claim 7,
The time constraint condition determination unit
It is determined whether or not there is a template definition time characteristic corresponding to the template. If there is a template definition time characteristic corresponding to the template, the content of the template processing time characteristic is the content of the template definition time characteristic. Query development support device characterized by replacing
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2015/074372 WO2017037773A1 (en) | 2015-08-28 | 2015-08-28 | Query development assistance method and query development assistance device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2015/074372 WO2017037773A1 (en) | 2015-08-28 | 2015-08-28 | Query development assistance method and query development assistance device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017037773A1 true WO2017037773A1 (en) | 2017-03-09 |
Family
ID=58187165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2015/074372 WO2017037773A1 (en) | 2015-08-28 | 2015-08-28 | Query development assistance method and query development assistance device |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2017037773A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013540308A (en) * | 2010-09-17 | 2013-10-31 | オラクル・インターナショナル・コーポレイション | Support for parameterized queries / views in complex event processing |
US20140351287A1 (en) * | 2012-09-20 | 2014-11-27 | Bernhard Wolf | Generic query templates for complex event processing and data stream systems |
US9002822B2 (en) * | 2012-06-21 | 2015-04-07 | Sap Se | Cost monitoring and cost-driven optimization of complex event processing system |
WO2015097789A1 (en) * | 2013-12-25 | 2015-07-02 | 株式会社日立製作所 | Query generating method and query generating device |
-
2015
- 2015-08-28 WO PCT/JP2015/074372 patent/WO2017037773A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013540308A (en) * | 2010-09-17 | 2013-10-31 | オラクル・インターナショナル・コーポレイション | Support for parameterized queries / views in complex event processing |
US9002822B2 (en) * | 2012-06-21 | 2015-04-07 | Sap Se | Cost monitoring and cost-driven optimization of complex event processing system |
US20140351287A1 (en) * | 2012-09-20 | 2014-11-27 | Bernhard Wolf | Generic query templates for complex event processing and data stream systems |
WO2015097789A1 (en) * | 2013-12-25 | 2015-07-02 | 株式会社日立製作所 | Query generating method and query generating device |
Non-Patent Citations (2)
Title |
---|
MATSUKI YOSHINO ET AL.: "Message Analyzing Mechanism for Information System Management Using Stream Database", THE TRANSACTIONS OF THE INSTITUTE OF ELECTRICAL ENGINEERS OF JAPAN . C, vol. 130, no. 4, 1 April 2010 (2010-04-01), pages 607 - 614, XP031707092 * |
TSUNEYUKI IMAKI ET AL.: "Turing Completeness of Recursive Stream Data Processing with Delay Operators", DBSJ JOURNAL, vol. 9, no. 3, 25 February 2011 (2011-02-25), pages 25 - 30, XP055367553 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107111527B (en) | Data Streaming Language for Analytical Instrumentation Software | |
JP4925143B2 (en) | Stream data processing system, stream data processing method, and stream data processing program | |
US9454467B2 (en) | Method and apparatus for mining test coverage data | |
KR102301946B1 (en) | Visual tools for failure analysis in distributed systems | |
US8930447B2 (en) | Method, apparatus, and program for usability analysis of web applications | |
EP2357562A1 (en) | System for assisting with execution of actions in response to detected events, method for assisting with execution of actions in response to detected events, assisting device, and computer program | |
JP2021106000A (en) | Executable logic for processing keyed data in networks | |
US10817140B2 (en) | Sequential data | |
WO2019142391A1 (en) | Data analysis assistance system and data analysis assistance method | |
JP4585534B2 (en) | System monitoring program, system monitoring method, and system monitoring apparatus | |
JP2011253363A (en) | Method, system and program for application analysis | |
CN111104214B (en) | Workflow application method and device | |
US20240202208A1 (en) | End-to-end database management framework | |
CN111523676A (en) | Method and device for assisting machine learning model to be online | |
US9336247B2 (en) | Control data driven modifications and generation of new schema during runtime operations | |
CN108009252A (en) | The method and device of data synchronization | |
US9934291B2 (en) | Dynamic presentation of a results set by a form-based software application | |
US20120054724A1 (en) | Incremental static analysis | |
CN110222017B (en) | Real-time data processing method, device and equipment and computer readable storage medium | |
US20140123126A1 (en) | Automatic topology extraction and plotting with correlation to real time analytic data | |
CN118740863A (en) | Dynamic distributed storage method and system based on blockchain | |
WO2017037773A1 (en) | Query development assistance method and query development assistance device | |
JP5414633B2 (en) | Application execution apparatus and application execution method | |
JP5041044B2 (en) | System monitoring program, system monitoring method, and system monitoring apparatus | |
CN116166634A (en) | Data blood relationship graph construction method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15902899 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15902899 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: JP |