WO2011111235A1 - ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム - Google Patents

ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム Download PDF

Info

Publication number
WO2011111235A1
WO2011111235A1 PCT/JP2010/054274 JP2010054274W WO2011111235A1 WO 2011111235 A1 WO2011111235 A1 WO 2011111235A1 JP 2010054274 W JP2010054274 W JP 2010054274W WO 2011111235 A1 WO2011111235 A1 WO 2011111235A1
Authority
WO
WIPO (PCT)
Prior art keywords
stream data
query
data
computer
data processing
Prior art date
Application number
PCT/JP2010/054274
Other languages
English (en)
French (fr)
Inventor
和田力佳
渡辺聡
横山高広
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2010/054274 priority Critical patent/WO2011111235A1/ja
Priority to JP2012504260A priority patent/JP5489025B2/ja
Publication of WO2011111235A1 publication Critical patent/WO2011111235A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24568Data stream processing; Continuous queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24542Plan optimisation

Definitions

  • the present invention relates to a technique for inputting and outputting stream data in a stream data processing system.
  • a query (query) is registered in the system, and the query is continuously executed as the stream data arrives.
  • stream data arrives every moment, it is impossible to start processing after waiting for the arrival of all data. Further, data that arrives at the system needs to be processed in the order of arrival without being affected by the data processing load.
  • a concept called a sliding window (hereinafter referred to as “window”) is introduced, in which real-time processing is realized while a part of stream data is cut out by specifying a width such as 1000 cases.
  • CQL Continuous Query Language
  • SQL Structured Query Language
  • Specific techniques for using CQL are disclosed in, for example, Japanese Patent Application Laid-Open No. 2006-338432.
  • the technique disclosed in the above conventional technique is realized by means for monitoring the degree of data retention using a queue provided in the stream data processing system after the stream data processing system receives the input data.
  • the output data queue placed between the stream data processing system and the external application is monitored, and when the output data queue reaches the maximum processing performance of the external application, the input data transmission unit By stopping the input, an attempt is made to solve the above problem.
  • data remaining in the engine of the stream data processing system when the input is stopped is output from the stream data processing system, and it is not possible to avoid excessive processing on the external application side. The issues that have been solved cannot be solved.
  • the present invention realizes a technique for predicting the output data amount of the stream data processing system and controlling the flow rate at the time of inputting the data to the stream data processing system without using information being executed such as monitoring of the output data queue.
  • the purpose is to do.
  • the ratio of the number of input data and the number of output data obtained as a result of receiving query information registered in advance by a query receiving unit and analyzing the query information by a query analyzing unit.
  • the condition that the input data gives to the number of output data is stored in the flow rate determination rule table, and the data to be input next to the stream data processing system received from the data transmission unit based on the information of the flow rate determination rule table by the data determination unit
  • a data input computer having a flow rate control unit that determines the influence on the number of output data and determines whether data is input based on the determination result, and a function capable of transmitting query information to the data input computer
  • a stream data processing system by limiting the amount of data input to the stream data processing unit so as not to exceed a preset threshold, the amount of data can be obtained by an external application that uses the output from the stream data processing unit. Can be avoided.
  • FIG. 1 is a block diagram showing an example of a computer system including a data transmission computer and a stream data processing computer according to the embodiment of this invention.
  • FIG. 2 is a block diagram showing an outline of the processing of the present invention.
  • FIG. 3 is a diagram illustrating an example of a query definition registered in the stream data processing computer according to the embodiment of this invention.
  • FIG. 4 is a diagram illustrating an example of a flow rate determination rule table created based on the query definition example according to the embodiment of this invention.
  • FIG. 5 is a diagram showing a maximum reception flow rate setting table held in the data transmission computer according to the embodiment of this invention.
  • FIG. 6 is a diagram showing a flow rate prediction holding table held by the data transmission computer according to the embodiment of this invention.
  • FIG. 1 is a block diagram showing an example of a computer system including a data transmission computer and a stream data processing computer according to the embodiment of this invention.
  • FIG. 2 is a block diagram showing an outline of the processing of the present invention.
  • FIG. 7 is a diagram illustrating an example of transmission data for the stream s1 according to the embodiment of this invention.
  • FIG. 8 is a flowchart showing a procedure for generating a flow rate determination rule table from the query information table according to the embodiment of this invention.
  • FIG. 9 is a flowchart illustrating a processing procedure of the query analysis unit according to the embodiment of this invention.
  • FIG. 10 is a flowchart illustrating a processing procedure of the data determination unit according to the embodiment of this invention.
  • FIG. 1 includes a data transmission computer that transmits stream data, a stream data processing computer that receives and processes stream data, and a result reception computer that uses the processing results of the stream data processing computer as an embodiment of the present invention.
  • FIG. 1 is a block diagram which shows the structure of a computer system (stream data processing system).
  • the computer system according to the embodiment of this invention includes a data transmission computer (transmission application) 1100, a stream data processing computer 1200, and a result reception computer 1300.
  • the data transmission computer 1100 and the stream data processing computer 1200 are connected by a network 1400, and the stream data processing computer 1200 and the result reception computer 1300 are connected by a network 1500.
  • the data transmission computer 1100 reads the stream data from the DISK 1120 or from the outside, and transmits the stream data to the stream data processing computer 1200.
  • Generation and transmission of stream data may be implemented as a program on the data transmission computer 1100, or may be installed as dedicated hardware installed on the data transmission computer 1100.
  • the data transmission computer 1100 includes a CPU 1110, a DISK 1120, and a memory 1130.
  • CPU 1110 executes a program on memory 1130.
  • a flow rate control unit 1140, a data transmission unit 1131, a query reception unit 1132, a query analysis unit 1133, and the like are read into the memory 1130 as programs. Further, the query analysis unit 1133 includes an internal table 1135 for analyzing a query definition 1264 described later.
  • the DISK 1120 is configured with a storage device or the like, and stores data used by programs on the memory 1130. The DISK 1120 also functions as a storage medium for storing programs such as the flow rate control unit 1140, the data transmission unit 1131, the query reception unit 1132, and the query analysis unit 1133.
  • the memory 1130 stores a program executed by the CPU 1110 and data necessary for executing the program.
  • the memory 1130 includes a query reception unit (query acquisition unit) 1132 that receives (or acquires) previously registered query information from the stream data processing computer 1200, analyzes the query information, and inputs data to the stream data processing computer 1200.
  • a query analysis unit 1133 that calculates the ratio of the number to the number of output data and the condition that the input data gives to the number of output data, a data transmission unit 1131 that reads input data from the outside, and receives the input data and sends the data to the stream data processing computer 1200
  • a flow rate control unit 1140 that determines whether or not to transmit is included, and a data transmission unit 1131 that transmits the input data to the stream data processing computer 1200 as stream data.
  • the data transmission unit 1131 performs processing for reading input data from the DISK 1120 or from the outside.
  • the input data to be read may be read from the DISK 1120 or generated in the program.
  • the input data of the data transmission unit 1131 may be data received from another computer or the like.
  • the data transmission unit 1131 is connected to the stream data processing computer 1200 via the network 1400 and transmits the stream data to the stream data processing computer 1200 via the network 1400.
  • the flow rate control unit 1140 is a flow rate determination rule table 1144 that holds the result of the query analysis unit 1133, and data to be next input to the stream data processing computer 1200 received from the data transmission unit 1131 based on the information of the flow rate determination rule table 1144.
  • Determination unit 1141 that determines the influence of the output data number on the output data
  • the flow rate prediction holding table 1142 that stores the predicted number of data outputs obtained by the data determination unit 1141
  • the processing result of the stream data from the stream data processing computer 1200 Is provided with a maximum reception flow rate setting table 1143 for storing thresholds related to the right or wrong of transmission.
  • the maximum reception flow rate setting table 1143 stores in advance the amount of data that the result reception computer 1300 can receive from the stream data processing computer 1200 as a threshold value. As will be described later, this threshold value functions as the maximum output amount (number of data per unit time) transmitted by the stream data processing computer 1200.
  • this threshold value is the maximum value (number of data / second) of the processing result of the stream data that can be received from the stream data processing computer 1200 by the result reception computer 1300, and regulates the amount of data output by the stream data processing unit 1260. It is a power value.
  • the stream data processing computer 1200 receives the stream data from the data transmission computer 1100, analyzes it, and transmits the analysis result to the result reception computer 1300.
  • the stream data processing computer 1200 receives stream data from the data transmission computer 1100 via the network 1400, and the stream data processing computer 1200 sends the result of the predetermined query processing to the result reception computer 1300. It transmits as an analysis result via the network 5.
  • the stream data processing computer 1200 includes a CPU 1210, a DISK 1220, and a memory 1230.
  • the data transmission computer 1100 may be a computer system such as a blade computer system or a PC server.
  • the memory 1230 includes an operating system 1240, a stream data processing unit 1260 that is a program operating on the operating system 1240, and a query management unit 1250.
  • the stream data processing unit 1260 receives a stream data reception unit 1261 that receives stream data from the data transmission computer 1100 and the stream data received by the stream data reception unit 1261, and executes a query on the input stream data.
  • a query processing unit 1262 that outputs the processing result of the received stream data, and a stream data transmission unit 1263 that transmits the result of the query executed by the query processing unit 1262 to the result receiving computer 1300.
  • the stream data reception unit 1261 receives stream data from the data transmission unit 1131 of the data transmission computer 1100 via the network 1400.
  • the query management unit 1250 manages a query, which is the content that the stream data processing computer 1200 analyzes stream data, a query registration unit 1251 that receives the query, a query information table (query information storage unit) 1253 that stores the query, and a reception A query transmission unit 1252 that transmits the query to the stream data processing computer 1200. As shown in FIG.
  • the query information table 1253 holds a query definition 1264 accepted by the query registration unit 1251.
  • a stream definition stream definition
  • the query information table 1253 may be configured to store the query definition and the stream definition separately.
  • the query registration unit 1251 accepts query registration and records the stream definition and the query definition 1264 in the query information table 1253 as described later.
  • Query registration may be performed by the stream data processing computer 1200 itself, or a registration request may be received from another computer.
  • the query management unit 1250 creates a query information table 1253 from the stream definition and query definition 1264.
  • the opportunity for creating the query information table 1253 may be, for example, when the query registration unit 1251 registers a query definition and a stream definition, or when a query information table 1253 creation request is received.
  • the stream definition represents a column type of stream data input to the stream data processing computer 1200
  • the query definition 1264 represents a stream data analysis method performed by the stream data processing computer 1200, and the contents thereof will be described later with reference to FIG. To do.
  • the query information table 1253 represents the contents of the stream definition and the features of the query registered in the query definition 1264.
  • the stream data transmission unit (processing result transmission unit) 1263 transmits the result of analyzing the stream data according to the query definition 1264 by the query processing unit 1262 to the result reception computer 1300 via the network 1500.
  • the result reception computer 1300 receives and uses the stream data obtained as a result of the query analysis performed by the stream data processing computer 1200.
  • the reception and use of the stream data may be implemented as a program on the result reception computer 1300, or may be installed as dedicated hardware installed on the result reception computer 1300.
  • the result reception computer 1300 includes a CPU 1310, a DISK 1320, and a memory 1330.
  • CPU 1310 executes a program on memory 1330.
  • the DISK 1320 stores data used by programs on the memory 1330.
  • the memory 1330 stores a program executed by the CPU 1310 and data necessary for executing the program.
  • the memory 1330 includes a stream data receiving unit and an application execution unit 1332.
  • the stream data reception unit 1331 receives stream data from the stream data transmission unit 1263 of the stream data processing computer 1200 via the network 1500, and the application execution unit 1332.
  • the stream data received by is used.
  • the use of stream data in the result receiving computer 1300 is, for example, storage in an external storage device, display on a display device, or the like.
  • the network 1400 and the network 1500 may be a local area network (LAN) connected by Ethernet (registered trademark), an optical fiber, or the like, or a wide area network (WAN) including the Internet that is slower than the LAN.
  • LAN local area network
  • Ethernet registered trademark
  • optical fiber optical fiber
  • WAN wide area network
  • the data transmission computer 1100, the stream data processing computer 1200, and the result reception computer 1300 may be any computer system such as a personal computer or a blade-type computer system.
  • the memory 1130, the memory 1230, and the memory 1330 are, for example, volatile storage media that can be accessed at high speed.
  • the function of generating and transmitting stream data in the data transmission computer 1100 and the function of receiving and using stream data in the result reception computer 1300 may be implemented as programs on the stream data processing computer 1200.
  • the stream data processing computer 1200 may directly receive the stream data or may receive the stream data via another computer. Examples of stream data include stock price distribution information in a financial application, POS data in a retail business, probe car information in a traffic information system, and an error log in computer system management.
  • FIG. 2 shows the flow of processing performed between the data transmission computer 1100 and the stream data processing computer 1200, the data transmission unit 1131, the flow rate control unit 1140, and the query analysis unit 1133 in the data transmission computer 1100. Shows the flow of data.
  • step S201 before the data transmission computer 1100 inputs stream data to the stream data processing computer 1200, the query analysis unit 1133 that exists in the data transmission computer 1100 is changed to the query transmission unit that exists in the stream data processing computer 1200.
  • the query information registered in advance in the stream data processing computer 1200 is acquired through the query reception unit 1132 existing in the data transmission computer 1100 and 1252.
  • the query analysis unit 1133 of the data processing computer 1200 analyzes the query information of the stream data processing computer 1200, and determines the ratio of the number of input data and the number of output data obtained as a result of the analysis and the condition that the input data gives to the number of output data. Stored in the determination rule table 1144.
  • step S ⁇ b> 202 when the data transmission computer 1100 inputs the data to the stream data processing computer 1200, the data transmission unit 1131 reads the input data and transmits the data to the flow rate control unit 1140.
  • step S203 when the data determination unit 1141 existing in the flow rate control unit 1140 receives the input data, refers to the flow rate determination rule table 1144, and inputs the data to the stream data processing computer 1200, the stream The influence on the number of output data from the data processing computer 1200 is obtained.
  • the data determination unit 1141 obtains a predicted value of the number of data output when the input data is input.
  • the data determination unit 1141 reflects the influence (predicted value) in the flow rate prediction holding table 1142. In the example of FIG.
  • the flow rate prediction holding table 1142 holds the value of the predicted value (number of output data / second), and the data determination unit 1141 stores the predicted value (number of output data / second) in the flow rate prediction holding table 1142. Add to the value of.
  • the data determination unit 1141 of the data transmission computer 1100 compares the maximum output amount held in the maximum received flow rate setting table 1143 with the predicted output number (predicted value) held in the flow rate prediction holding table 1142.
  • the data transmission unit 1131 is permitted to transmit stream data. Conversely, if the predicted value exceeds the maximum output amount, the data transmission unit Request 1131 to stop transmission of stream data.
  • the data transmission unit Request 1131 to stop transmission of stream data.
  • the maximum reception flow rate setting table 1143 and the flow rate prediction holding table 1142 hold values of predicted values (number of output data / second) and threshold values (number of receivable data / second).
  • the data transmission unit 1131 estimates the amount of data input from the stream data processing computer 1200 to the result reception computer 1300 for the stream data to be transmitted to the stream data processing computer 1200.
  • the estimated predicted value exceeds the threshold value, transmission of stream data from the data transmission unit 1131 is restricted. Thereby, it is possible to prevent the amount of data received by the result reception computer 1300 from becoming excessive.
  • the query definition 1264 defines the column type and reference name of the stream data received by the stream data processing computer 1200 and the contents of the query analyzed by the stream data processing computer 1200.
  • the stream S1 indicates that the first column is an INTEGER type reference name c0, the second column is an INTEGER type reference name c1, and the third column is a TIMESTAMP type reference name c2.
  • the query q1 sets the range of the stream to be analyzed as the latest three data of S1, and the output stream data outputs the maximum value of c1 out of S1.
  • FIG. 4 shows an example of the flow rate determination rule table 1140 of the data transmission computer 1100.
  • the flow rate determination rule table 1140 stores “5: 1 to 5” in the “number of inputs: number of outputs” table 410 and the “effect on the number of output data” table 420 based on the analysis result obtained by the query analysis unit 1133.
  • the “number of inputs: number of outputs” table 401 analyzes the query information 1264 and holds the ratio between the number of input data and the number of output data.
  • the “influence on the number of output data” table 420 holds the contents of the influence of the input data on the number of output data, the influence on the number of data, and the condition of the input data causing the above-described influence.
  • FIG. 5 shows an example of the maximum reception flow rate setting table 1143.
  • the maximum reception flow rate table 1143 holds the number of data per second that can be processed by the result reception computer 1300 that receives the output data of the stream data processing computer 1200.
  • the threshold value of the maximum reception flow rate setting table 1143 is set in advance by the user of the result reception computer 1300. Note that the threshold value of the maximum reception flow rate setting table 1143 may be set not only by the user of the result reception computer 1300 but also by an administrator of the computer system or the like.
  • FIG. 6 shows an example of the flow rate prediction holding table 1142.
  • the flow rate prediction holding table 1142 holds the number of data actually input from the data transmission unit 1131 to the stream data processing computer 1200 and the number of output data predicted from the above-described input data.
  • 511: 50 to 250 in the figure indicate that when the 511st stream data 720 shown in FIG. 7 is input to the stream data processing computer 1200, a minimum of 50 data and a maximum of 250 data are received from the stream data processing computer 1200.
  • FIG. 7 shows a configuration example of transmission data for the stream data s1.
  • the stream data 710 indicates that the first column 701 is the INTEGER type and the value is 510, the second column 702 is the INTEGER type and the value is -2, and the third column 703 is the TIMESTAMP type and the value is 12:00:01. .
  • stream data 720 to 740 are sequentially transmitted from the data transmission computer 1100 to the stream data processing computer 1200.
  • FIG. 8 shows a flowchart for creating a query information table 1253 upon registration of a query to the stream data processing computer 1200 and transferring the query definition 1264 to the data transmission computer 1100.
  • the query registration unit 1251 of the stream data processing computer 1200 receives a query.
  • the query registration unit 1251 creates a query information table 1253.
  • the query transmission unit 1252 of the stream data processing computer 1200 transfers the query information table 1253 to the query reception unit 1132 of the data transmission computer 1100.
  • the query analysis unit 1133 of the data transmission computer 1100 receives the query information table 1253 received by the query reception unit 1132, analyzes the query information table 1253, and inputs the number of input data and output data in the stream data processing computer 1200. The ratio of numbers and the effect of input data on the number of output data are calculated. Finally, in S805, the information calculated by the query analysis unit 1133 is stored in the flow rate determination rule table 1144.
  • FIG. 9 shows a flowchart of the analysis processing in the query analysis unit 1133 performed in S804 of FIG. Below, the analysis process in the query analysis part 1133 is demonstrated using the example of the query definition 1264 shown in FIG. 3, and the example of the flow volume determination rule table 1140.
  • the query definition 1264 is analyzed to obtain calculation contents.
  • the SELECT clause in the query definition 1264 of FIG. 3 is analyzed, and the query analysis unit 1133 that obtains the maximum value of the column c2 from the data in the stream data window is set operation MAX (maximum in the window). Value).
  • the query analysis unit 1133 obtains the ratio between the number of input data and the number of output data from the calculation content recognized in S901.
  • the ratio of the number of input data and the number of output data in the case of the set operation MAX is recognized as “range width: 1 to range width: range width”.
  • S903 it is determined whether the ratio of the number of input data and the number of output data obtained in S902 refers to information in the query.
  • the ratio between the number of input data and the number of output data obtained from the query definition 1264 is “range width: 1 to range width”, and the range width is referred to as information in the query.
  • the query analysis unit 1133 analyzes the query and obtains information in the query through S904. In the case of the input of the query definition 1264 shown in FIG.
  • the information in the query is applied to the ratio between the number of input data and the number of output data.
  • the range width 5 in the query definition 1264 is applied, and the ratio between the number of input data and the number of output data is “5: 1 to 5”.
  • the processing is repeated until the query definition 1264 is analyzed and the ratio between the number of input data and the number of output data is determined.
  • the influence of the content of input data on the number of output data in the case of the set operation MAX (q1.c1) is “condition: number of output data: 0 when the value of c1 is smaller than the previous data”. Recognize.
  • S907 it is confirmed whether or not the influence of the content of the input data on the number of output data refers to the information in the query.
  • the query is analyzed in S908 to obtain information in the query.
  • the information in the query is applied to the ratio between the number of input data and the number of output data.
  • information in the query is not referred to.
  • processing equivalent to the processing from S904 to S905 is performed.
  • the analysis process is terminated. That is, S907 to S909 are repeated until the influence 420 on the number of output data of the flow rate determination rule table 1144 is determined by S906 to S909.
  • the query analysis unit 1133 includes an internal table 1135 set in advance for interpreting the relationship between the number of input data and output data such as a SELECT phrase in the query definition 1264, and the query definition is referred to with reference to the internal table 1135.
  • the relationship between the number of input data and output data in 1264 is specified.
  • the internal table 1135 is a table in which, for example, the relationship between the number of input data and output data is set in advance for each function (MAX or the like) or operator used in the query.
  • FIG. 10 shows a flowchart of the flow rate control process in the data determination unit 1141. The process of FIG. 10 is executed each time the data transmission unit 1131 reads input data and transmits the input data to the data determination unit 1141.
  • the data transmission unit 1131 determines transmission of the input data according to the flow control processing result of the data determination unit 1141 for the read input data.
  • the flow control processing in the data determination unit 1141 includes the example of the query definition 1264 in FIG. 3, the example 1140 of the flow determination rule table, the example 1143 of the maximum received flow setting table, and the example 1142 of the flow rate prediction holding table. This will be described using a configuration example 700 of transmission data for stream data s1.
  • the data determination unit 1141 receives input data from the data transmission unit 1131 in S1001.
  • S1002 the data determination unit 1141 refers to the flow rate determination rule table.
  • the content of the flow rate determination rule table 1144 is that the ratio of the number of input data to the number of output data is “5: 1 to 5” as shown in FIG.
  • the influence of the data content on the number of output data is “condition: number of output data: 0 when the value of c1 is smaller than the previous data”.
  • the data determination unit 1141 confirms whether there is an influence on the output that has not yet been confirmed for the input data. In the example of the query definition 1264 in FIG. 3, there is one influence on the number of output data as described above. If it exists, it is determined in S1004 whether the value of the input data matches the “condition” of the influence on the output.
  • the number of output data when stream data 720 is input is zero.
  • the stream data received in S1001 is the stream data 730 in FIG. 7, the value of c1 is larger than the previous stream data 720, so the condition is not met, and the number of output data when the stream data 730 is input is Is 0.2 to 1.
  • the number of output data obtained by the data determination unit 1141 is reflected in the flow rate prediction holding table 1142.
  • the data determination unit 1141 determines whether the number of predicted outputs held in the flow rate prediction holding table 1142 exceeds the value in the maximum received flow rate setting table 1143.
  • the flow rate control unit 1140 requests that the data transmission unit 1131 stop the input of stream data from the data transmission unit 1131 to the stream data processing computer 1200 through S1009. .
  • the flow rate control unit 1140 requests to continue data input from the data transmission unit 1131 to the stream data processing computer 1200 through S1010. To do.
  • the processing from S1007 to S1010 in the case of the query definition 1264 in FIG. 3, if the data received in S1001 is the stream data 720 in FIG. 7, the number of output data when the stream data 720 is input is 0.
  • the data received in S1001 is the stream data 730 (512th data) in FIG. 7
  • the number of output data when the stream data 730 is input is 0.2 to 1 (5: 1 to 5: 5). Therefore, when this value (0.2 to 1) is added, the predicted output number of the flow rate prediction holding table 1142 is, for example, when the previous output data number is 50 to 250, the number of new output data is 50.
  • the data transmission unit 1131 inputs (transmits) the stream data 730 to the stream data processing computer 1200. Do not do.
  • reset processing is performed to return the predicted output number of the flow rate prediction holding table 1142 to 0 to 0 (pieces / second) every time a predetermined unit time (for example, 1 second) elapses. For this reason, the input of the stream data 730 to the stream data processing computer 1200 is performed after performing the reset process.
  • the amount of data to be input (transmitted) to the stream data processing unit 1260 does not exceed the threshold of the maximum reception amount setting table set by the user of the result reception computer 1300.
  • the data transmission computer 1100 including the flow rate control unit 1140, the data transmission unit 1131, and the query analysis unit 1133, and the stream data processing computer 1200 including the stream data processing unit 1260 and the query management unit 1230 are independent. Although an example in which the computers are separated is shown, each of these processing units may be executed by one computer.
  • the present invention can be applied to a stream data processing system including a computer that transmits stream data, a computer that receives and processes stream data, and a computer that receives and uses the processing result of stream data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 ストリームデータ処理システムの出力データ量を予測して、ストリームデータ処理システムへ入力するデータの流量制御を行うことを課題とする。 本発明では、計算機は、クエリを受け付けるクエリ情報格納部と、受け付けたクエリによってストリームデータを処理するストリームデータ処理部と、クエリで処理した結果を結果受信計算機へ送信する処理結果送信部と、ストリームデータ処理部へストリームデータを送信するデータ送信部と、を備え、クエリ情報格納部に格納されたクエリを取得するクエリ取得部と、クエリを解析して前記処理結果送信部が結果受信計算機へ送信するデータ量の予測値を演算するクエリ解析部と、予測値と予め設定した閾値とを比較して、前記予測値が閾値を超える場合には、前記データ送信部がストリームデータ処理部へ送信するストリームデータを規制する流量制御部と、を有する。

Description

ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム
 本発明は、ストリームデータ処理システムにおいて、ストリームデータの入出力を行う技術に関する。
 近年、時々刻々と到着する大量のデータ(ストリームデータ)を受信し、リアルタイムで処理するストリームデータ処理システムに対する要求が高まっている。例えば、株取引を支援するファイナンシャルアプリケーションでは、株価の変動に迅速に対応することが最重要の課題の一つである。従来のデータベース管理システム(DBMS)でデータを処理する場合には、受信した株式データを一旦記憶装置に格納する必要があった。今後、さらに大量の株式データを扱う場合に、株価の変動などにリアルタイムで対応することが困難になる可能性がある。
 また、ストリームデータをリアルタイムに処理するアプリケーションを個別に作成すると、開発期間の長期化、開発コストの高騰、アプリケーションを利用する業務の変化への迅速な対応が困難といった問題があり、汎用のストリームデータ処理システムが求められている。
 ストリームデータ処理システムでは、まず、クエリ(問合せ)をシステムに登録し、ストリームデータの到着とともにクエリが継続的に実行される。しかし、ストリームデータは時々刻々と到着するため、すべてのデータの到着を待ってから処理を開始することは不可能である。また、システムに到着したデータは、データ処理の負荷に影響されることなく、到着順にしたがって処理される必要がある。
 「Load Shedding Techniques for Data Stream Management Systems」(Emine Nesime、Tatbul著、Ph.D、Brown University、May 2007.)に開示された技術では、ストリームデータを、最新10分間などの時間の幅、又は最新1000件などの個数の幅を指定してストリームデータの一部を切り取りながらリアルタイム処理が実現される、スライディングウィンドウ(以下「ウィンドウ」)と呼ばれる概念を導入している。
 また、データを取得するためのクエリを記述するための言語として、ウィンドウを指定可能なCQL(Continuous Query Language)が特開2003−298661号公報に開示されている。CQLは、DBMSで広く用いられているSQL(Structured Query Language)が拡張されたものであって、ウィンドウの指定が可能となっている。具体的にCQLを利用する技術などについては、例えば、特開2006−338432号公報などに開示されている。
 しかし、ストリームデータは、ストリームデータ処理システムに対して大量に到着し、また大量のデータを出力するため、ストリームデータ処理システムの出力データを受信する外部アプリケーションでの処理が追いつかず、結果としてストリームデータ処理システムと外部アプリケーションの間で処理しきれなかったデータが蓄積し、外部アプリケーションの処理が大きく遅延したり、最終的にそのデータが失われる恐れがある。これを避けるためには、外部アプリケーションの性能に見合う速度でデータを入力する流量制御が必要になる。なお、ストリームデータ処理システムの出力データ量の制御に応用可能な技術が特開2008−83808号公報に開示されている。
 上記従来の技術に開示された技術は、ストリームデータ処理システムが入力データを受信したあとに、ストリームデータ処理システム内に設けたキューを用いてデータの滞留度を監視する手段により実現されている。
 特許文献に開示された技術では、ストリームデータ処理システムと外部アプリケーションの間に配置した出力データキューを監視し、出力データキューが外部アプリケーションの最大処理性能に達した時点で、入力データ送信部がデータ入力を停止することにより、上記の課題を解決しようとする。しかしこの解決方法では、入力を停止した時点でストリームデータ処理システムのエンジン内に残っているデータはストリームデータ処理システムから出力されてしまい、外部アプリケーション側での処理超過を避けることができず、前述した課題は解決できない。
 そこで本発明は、出力データキューの監視などの実行中の情報を用いず、ストリームデータ処理システムへデータを入力する時点でストリームデータ処理システムの出力データ量を予測して流量制御を行う技術を実現することを目的とする。
本発明の代表的な一形態によれば、クエリ受信部によりあらかじめ登録されているクエリ情報を受信し、クエリ解析部により前記クエリ情報を解析した結果として得られる入力データ数と出力データ数の比率および入力データが出力データ数に与える条件を流量判定規則テーブルに格納し、データ判定部により前記流量判定規則テーブルの情報に基づいてデータ送信部から受信したストリームデータ処理システムへ次に入力するデータが出力データ数に与える影響を判定し、その判定結果をもとにデータの入力の是非を判定する流量制御部を有すること特徴とするデータ入力計算機と、前記データ入力計算機へクエリ情報を送信できる機能を有することを特徴とするストリームデータ処理システムである。
本発明の一形態によれば、ストリームデータ処理部へ入力するデータ量を、予め設定した閾値を超えないように制限することで、ストリームデータ処理部からの出力を利用する外部のアプリケーションでデータ量が過大になるのを回避できる。
図1は本発明の実施の形態のデータ送信計算機およびストリームデータ処理計算機を含む計算機システムの一例を示すブロック図である。
図2は本発明の処理の概要を示すブロック図である。
図3は本発明の実施の形態のストリームデータ処理計算機で登録されるクエリ定義の一例を示す図である。
図4は本発明の実施の形態のクエリ定義例に基づいて作成された流量判定規則テーブルの例を示す図である。
図5は本発明の実施の形態のデータ送信計算機で保持される最大受信流量設定テーブルを示す図である。
図6は本発明の実施の形態のデータ送信計算機で保持される流量予測保持テーブルを示す図である。
図7は本発明の実施の形態のストリームs1用の送信データの一例を示す図である。
図8は本発明の実施の形態のクエリ情報テーブルから流量判定規則テーブルを生成する手順を示すフローチャートである。
図9は本発明の実施の形態のクエリ解析部の処理手順を示すフローチャートである。
図10は本発明の実施の形態のデータ判定部の処理手順を示すフローチャートである。
 以下、本発明の一実施形態を添付図面に基づいて説明する。
 まず、本実施例における計算機システムの構成を、図1に基づいて説明する。
 図1は、本発明の一実施形態として、ストリームデータを送信するデータ送信計算機およびストリームデータを受信して処理を行うストリームデータ処理計算機及びストリームデータ処理計算機の処理結果を利用する結果受信計算機を含む計算機システム(ストリームデータ処理システム)の構成を示すブロック図である。
 本発明の実施形態の計算機システムは、データ送信計算機(送信アプリケーション)1100、ストリームデータ処理計算機1200、及び結果受信計算機1300を含む。データ送信計算機1100とストリームデータ処理計算機1200はネットワーク1400により接続されており、ストリームデータ処理計算機1200と結果受信計算機1300はネットワーク1500により接続されている。
 データ送信計算機1100は、ストリームデータをDISK1120または外部から読み込み、ストリームデータ処理計算機1200にストリームデータを送信する。ストリームデータの生成および送信は、データ送信計算機1100上のプログラムとして実装されてもよいし、データ送信計算機1100上に搭載される専用ハードウェアとして搭載してもよい。
 データ送信計算機1100は、CPU1110、DISK1120、及び、メモリ1130を備える。
 CPU1110は、メモリ1130上のプログラムを実行する。メモリ1130には流量制御部1140、データ送信部1131、クエリ受信部1132、クエリ解析部1133等がプログラムとして読み込まれる。また、クエリ解析部1133は後述のクエリ定義1264を解析するための内部テーブル1135を備える。
 DISK1120は、ストレージ装置などで構成されてメモリ1130上のプログラムが利用するデータを格納する。また、DISK1120は流量制御部1140、データ送信部1131、クエリ受信部1132、クエリ解析部1133等のプログラムを格納する記憶媒体としても機能する。
 メモリ1130は、CPU1110によって実行されるプログラムおよび当該プログラムの実行に必要なデータを記憶する。
 メモリ1130は、ストリームデータ処理計算機1200から、あらかじめ登録されているクエリ情報を受信(または取得)するクエリ受信部(クエリ取得部)1132、前記クエリ情報を解析してストリームデータ処理計算機1200の入力データ数と出力データ数の比率および入力データが出力データ数に与える条件を計算するクエリ解析部1133、外部から入力データを読み込むデータ送信部1131、前記入力データを受信しストリームデータ処理計算機1200へデータを送信するか否かを判定する流量制御部1140、前記入力データをストリームデータとしてストリームデータ処理計算機1200へ送信するデータ送信部1131を含む。
 データ送信部1131は、DISK1120や外部から入力データを読み込む処理を行う。読み込む入力データは、例えば、DISK1120から読み出してもよいし、プログラム内で生成してもよい。あるいは、データ送信部1131の入力データは、他の計算機などから受信したデータであってもよい。
 データ送信部1131は、ネットワーク1400によりストリームデータ処理計算機1200と接続し、ストリームデータを、ネットワーク1400を介してストリームデータ処理計算機1200に送信する。
 流量制御部1140は、クエリ解析部1133の結果を保持する流量判定規則テーブル1144、前記流量判定規則テーブル1144の情報に基づいてデータ送信部1131から受信したストリームデータ処理計算機1200へ次に入力するデータが出力データ数に与える影響を判定するデータ判定部1141、データ判定部1141により得られた予測されるデータ出力数を格納する流量予測保持テーブル1142、ストリームデータ処理計算機1200からのストリームデータの処理結果の送信の是非に関わる閾値を格納する最大受信流量設定テーブル1143を備える。最大受信流量設定テーブル1143は、結果受信計算機1300がストリームデータ処理計算機1200から受信可能なデータの量を閾値として予め格納する。この閾値は後述するように、ストリームデータ処理計算機1200が送信する最大出力量(単位時間当たりのデータ数)として機能する。つまり、この閾値は、結果受信計算機1300がストリームデータ処理計算機1200から受信可能なストリームデータの処理結果の最大値(データ個数/秒)であり、ストリームデータ処理部1260が出力するデータ量を規制すべき値となる。
 ストリームデータ処理計算機1200は、データ送信計算機1100からストリームデータを受信し、分析し、分析結果を結果受信計算機1300に送信する。図1に示す計算機システムでは、データ送信計算機1100からネットワーク1400を介してストリームデータ処理計算機1200がストリームデータを受信し、ストリームデータ処理計算機1200は所定のクエリ処理を行った結果を結果受信計算機1300にネットワーク5を介して分析結果として送信する。
 ストリームデータ処理計算機1200は、CPU1210、DISK1220、メモリ1230を備える。データ送信計算機1100は、例えば、ブレード型計算機システム、PCサーバなどの計算機システムであってもよい。
 メモリ1230には、オペレーティングシステム1240、オペレーティングシステム1240上で動作するプログラムであるストリームデータ処理部1260、クエリ管理部1250を含む。
 ストリームデータ処理部1260は、データ送信計算機1100からのストリームデータを受信するストリームデータ受信部1261と、ストリームデータ受信部1261が受信したストリームデータを入力とし、入力されたストリームデータに対してクエリを実行し、受信したストリームデータの処理結果を出力するクエリ処理部1262と、クエリ処理部1262が実行したクエリの結果を結果受信計算機1300へ送信するストリームデータ送信部1263を含む。
 ストリームデータ受信部1261は、データ送信計算機1100のデータ送信部1131から、ネットワーク1400を介して、ストリームデータを受信する。
 クエリ管理部1250は、ストリームデータ処理計算機1200がストリームデータを分析する内容であるクエリを管理し、クエリを受け付けるクエリ登録部1251と、クエリを格納するクエリ情報テーブル(クエリ情報格納部)1253及び受け付けたクエリをストリームデータ処理計算機1200送信するクエリ送信部1252を含む。
 クエリ情報テーブル1253は、図2に示すように、クエリ登録部1251が受け付けたクエリ定義1264を保持する。なお、図2の例では、クエリ定義1264にストリームデータの定義(ストリーム定義)を内包している例を示す。クエリ情報テーブル1253は、クエリ定義とストリーム定義を分離して格納する構成であっても良い。
 クエリ登録部1251は、クエリの登録を受け付け、ストリーム定義およびクエリ定義1264を後述するようにクエリ情報テーブル1253へ記録する。クエリの登録は、ストリームデータ処理計算機1200自身が登録要求を行っても良いし、他の計算機から登録要求を受け付けてもよい。
 クエリ管理部1250は、ストリーム定義およびクエリ定義1264からクエリ情報テーブル1253を作成する。クエリ情報テーブル1253を作成する契機は、例えば、クエリ登録部1251がクエリ定義およびストリーム定義を登録したときでもよいし、クエリ情報テーブル1253の作成要求を受けたときでもよい。
 ストリーム定義は、ストリームデータ処理計算機1200へ入力されるストリームデータのカラムの種類を表し、クエリ定義1264は、ストリームデータ処理計算機1200が実施するストリームデータの分析方法を表し、その内容は図3で後述する。
 クエリ情報テーブル1253は、ストリーム定義の内容およびクエリ定義1264に登録されたクエリの特長を表す。
 ストリームデータ送信部(処理結果送信部)1263は、クエリ処理部1262がストリームデータをクエリ定義1264に従って分析した結果を、ネットワーク1500を介して、結果受信計算機1300に送信する。
 結果受信計算機1300は、ストリームデータ処理計算機1200がクエリを実行して分析した結果のストリームデータを受信し、利用する。ストリームデータの受信および利用は、結果受信計算機1300上のプログラムとして実装されてもよいし、結果受信計算機1300上に搭載される専用ハードウェアとして搭載してもよい。
 結果受信計算機1300は、CPU1310、DISK1320、メモリ1330を備える。
 CPU1310は、メモリ1330上のプログラムを実行する。
 DISK1320は、メモリ1330上のプログラムが利用するデータを格納する。
 メモリ1330は、CPU1310によって実行されるプログラムおよび当該プログラムの実行に必要なデータを記憶する。
 メモリ1330は、ストリームデータ受信部およびアプリケーション実行部1332を含む。
 メモリ1330上のプログラムは、CPU1310によって実行されることにより、ストリームデータ受信部1331がストリームデータ処理計算機1200のストリームデータ送信部1263から、ネットワーク1500を介して、ストリームデータを受信し、アプリケーション実行部1332により受信したストリームデータを利用する。
 結果受信計算機1300におけるストリームデータの利用は、例えば、外部記憶装置への保存や、ディスプレイ装置への表示などである。
 ネットワーク1400およびネットワーク1500は、イーサネット(登録商標)、光ファイバなどで接続されるローカルエリアネットワーク(LAN)、又はLANよりも低速なインターネットを含むワイドエリアネットワーク(WAN)であってもよい。
 データ送信計算機1100、ストリームデータ処理計算機1200、および結果受信計算機1300は、はパーソナルコンピュータやブレード型の計算機システムなどの、任意のコンピュータシステムでよい。
 メモリ1130、メモリ1230、およびメモリ1330は、例えば、高速にアクセス可能な揮発性記憶媒体である。
 データ送信計算機1100におけるストリームデータの生成および送信の機能、および結果受信計算機1300におけるストリームデータの受信および利用の機能は、ストリームデータ処理計算機1200上のプログラムとして実装されても良い。
 以上のように、ストリームデータ処理計算機1200は、直接ストリームデータを受信してもよいし、他の計算機を介してストリームデータを受信してもよい。また、ストリームデータの例としては、ファイナンシャルアプリケーションにおける株価配信情報、小売業におけるPOSデータ、交通情報システムにおけるプローブカー情報、および計算機システム管理におけるエラーログなどが挙げられる。
 次に、図2を用いて本発明の原理を説明する。
 図2は、データ送信計算機1100とストリームデータ処理計算機1200の間で行われる処理の流れと、データ送信計算機1100内のデータ送信部1131と、流量制御部1140と、クエリ解析部1133の間で行われるデータの流れを示している。
 まず、S201で、データ送信計算機1100がストリームデータ処理計算機1200にストリームデータを入力する前に、データ送信計算機1100内に存在するクエリ解析部1133が、ストリームデータ処理計算機1200内に存在するクエリ送信部1252とデータ送信計算機1100内に存在するクエリ受信部1132を通して、ストリームデータ処理計算機1200にあらかじめ登録されているクエリ情報を取得する。
 データ処理計算機1200によるクエリ解析部1133は、前記ストリームデータ処理計算機1200のクエリ情報を解析し、解析の結果得られる入力データ数と出力データ数の比率および入力データが出力データ数に与える条件を流量判定規則テーブル1144に格納する。
 次に、S202で、データ送信計算機1100がストリームデータ処理計算機1200に前記データを入力する時に、データ送信部1131が入力データの読み込みを行い、前記データを流量制御部1140に送信する。
 次に、S203で、流量制御部1140内に存在するデータ判定部1141が前記入力データを受信し、流量判定規則テーブル1144を参照し、前記データをストリームデータ処理計算機1200に入力した場合に、ストリームデータ処理計算機1200からの出力データ数に与える影響を求める。図2の例では、出力データ数に与える影響として、データ判定部1141が前記入力データを入力した時に出力されるデータ数の予測値を求める。
 次に、S204で、データ判定部1141が前記影響(予測値)を流量予測保持テーブル1142に反映する。図2の例では、流量予測保持テーブル1142は予測値(出力データ数/秒)の値を保持していて、データ判定部1141は前記予測値(出力データ数/秒)を流量予測保持テーブル1142の値に加算する。
 次に、S205で、データ送信計算機1100のデータ判定部1141が最大受信流量設定テーブル1143に保持する最大出力量と流量予測保持テーブル1142に保持する予測出力数(予測値)を比較する。
 最後に、S206で、前記S205における予測値が最大出力量を超えないならばデータ送信部1131にストリームデータの送信許可を与え、逆に、予測値が最大出力量を超える場合にはデータ送信部1131にストリームデータの送信停止を要求する。図2の例では、最大受信流量設定テーブル1143と流量予測保持テーブル1142は予測値(出力データ数/秒)の値と閾値(受信可能なデータ数/秒)の値を保持している。
 このように、流量制御部1140では、データ送信部1131が、これからストリームデータ処理計算機1200へ送信しようとしているストリームデータについて、ストリームデータ処理計算機1200から結果受信計算機1300へ入力されるデータ量を推定し、推定した予測値が閾値を超えると、データ送信部1131からのストリームデータの送信を規制する。これにより、結果受信計算機1300が受信するデータ量が過大になるのを防止できる。
 次に、本発明の詳細を説明する。
 まず、本実施例における定義、テーブル、およびデータの内容を、図3から図7を参照して説明する。
 図3はクエリ定義1264の例を示す。クエリ定義1264はストリームデータ処理計算機1200が受信する、ストリームデータのカラムの種類と参照名と、ストリームデータ処理計算機1200が分析するクエリの内容を定義するものである。図中ストリームS1は、1カラム目がINTEGER型の参照名c0、2カラム目がINTEGER型の参照名c1、3カラム目がTIMESTAMP型の参照名c2であることを示す。また、図中クエリq1は、分析するストリームの範囲をS1の最新のデータ3個分とし、出力するストリームデータはS1のうちc1の最大値を出力する。
 図4はデータ送信計算機1100の流量判定規則テーブル1140の例を示す。流量判定規則テーブル1140は、クエリ解析部1133で得られた解析結果を、「入力数:出力数」テーブル410に「5:1~5」を格納し、「出力データ数に与える影響」テーブル420に格納する。「入力数:出力数」テーブル401は、クエリ情報1264を解析して入力データ数と出力データ数の比率を保持する。「出力データ数に与える影響」テーブル420は、入力データが出力データ数に与える影響の内容を、データ数に対する影響と、前述の影響が起こる入力データの条件を保持する。
 図5は最大受信流量設定テーブル1143の例を示す。最大受信流量テーブル1143は、ストリームデータ処理計算機1200の出力データを受信する結果受信計算機1300で処理が可能な、1秒あたりのデータ数を保持する。本実施形態において、最大受信流量設定テーブル1143の閾値は結果受信計算機1300のユーザが事前に設定するものとする。なお、最大受信流量設定テーブル1143の閾値の設定は、結果受信計算機1300のユーザのみならず、計算機システムの管理者などが上記閾値を設定するようにしてもよい。
 図6は流量予測保持テーブル1142の例を示す。流量予測保持テーブル1142は、データ送信部1131からストリームデータ処理計算機1200に対して実際に入力されたデータ数と、前述の入力データから予測される出力データ数を保持する。例えば、図中511:50~250は、図7に示す511番目のストリームデータ720をストリームデータ処理計算機1200へ入力した場合、最小で50個、最大で250個のデータがストリームデータ処理計算機1200から出力されることが予測された例を示す。
 図7はストリームデータs1用の送信データの構成例を示す。ストリームデータ710は、1カラム目701がINTEGER型で値は510、2カラム目702がINTEGER型で値は−2、3カラム目703がTIMESTAMP型で値は12:00:01であることを示す。同様にストリームデータ720~740が順次データ送信計算機1100からストリームデータ処理計算機1200へ送信される。そして、ストリームデータ処理計算機1200では、ストリームデータ710~740を分析した結果を結果受信計算機1300に送信する。
 次に、本実施形態の処理の流れを、図8から図10に基づいて説明する。
 図8はストリームデータ処理計算機1200へのクエリ登録を契機にクエリ情報テーブル1253を作成し、クエリ定義1264をデータ送信計算機1100に転送するフローチャートを示す。まず、S801でストリームデータ処理計算機1200のクエリ登録部1251がクエリを受け付ける。
 次に、S802で前記クエリ登録部1251がクエリ情報テーブル1253を作成する。
 次に、S803でストリームデータ処理計算機1200のクエリ送信部1252が、クエリ情報テーブル1253を、データ送信計算機1100のクエリ受信部1132に転送する。
 次に、S804で、データ送信計算機1100のクエリ解析部1133がクエリ受信部1132で受信したクエリ情報テーブル1253を受け取り、クエリ情報テーブル1253を解析し、ストリームデータ処理計算機1200における入力データ数と出力データ数の比率および入力データが出力データ数に与える影響を算出する。
 最後に、S805で、クエリ解析部1133が算出された情報を流量判定規則テーブル1144に格納する。
 図9は図8のS804で行われるクエリ解析部1133における解析処理のフローチャートを示す。以下ではクエリ解析部1133における解析処理を、図3に示したクエリ定義1264の例と、流量判定規則テーブル1140の例を用いて説明する。
 クエリ解析部1133で解析処理が開始されると、まずS901により、クエリ定義1264を解析し、演算内容を得る。本実施形態では、図3のクエリ定義1264中のSELECT句を解析し、ストリームデータのウィンドウ中のデータの中からカラムc2の最大値を求める、クエリ解析部1133は集合演算MAX(ウインドウ内の最大値を求める)を認識する。
 次に、クエリ解析部1133はS902により、上記S901で認識した演算内容から入力データ数と出力データ数の比率を得る。本実施形態では、集合演算MAXの場合の入力データ数と出力データ数の比率は「レンジ幅:1~レンジ幅:レンジ幅」であると認識する。なお、レンジ幅は、ストリームデータ処理において、直近の入力データ(ストリームデータ)の内、保持するデータ数(=ウインドウの幅)を規定するものとする。
 次に、S903により、S902で得られた入力データ数と出力データ数の比率が、クエリ内の情報を参照しているかを判定する。クエリ定義1264から得られた入力データ数と出力データ数の比率は、「レンジ幅:1~レンジ幅」であり、クエリ内の情報として、レンジ幅を参照している。
 レンジ幅等の情報を参照している場合は、S904により、クエリ解析部1133はクエリを解析し、クエリ内の情報を得る。図3に示すクエリ定義1264の入力の場合、クエリ定義1264中の「FROM S1[ROWS 5]」からレンジ幅を解析して、レンジ幅=5を得る。
 次に、S905により、クエリ内の情報を入力データ数と出力データ数の比率に適用する。図3に示すクエリ定義1264の入力例の場合、クエリ定義1264中のレンジ幅5を適用し、入力データ数と出力データ数の比率を「5:1~5」とする。S904、S905の処理では、クエリ定義1264を解析して入力データ数と出力データ数の比率が確定するまで、処理を繰り返す。
 逆にクエリ内の情報を参照していないか、クエリ内の情報の解決が完了した場合、換言すれば、入力データ数と出力データ数の比率が確定した場合は、S906により、上記演算内容から、入力データの数が出力データ数に与える影響を得る。本実施形態の場合、集合演算MAX(q1.c1)の場合の入力データの内容が出力データ数に与える影響は「条件:c1の値が前回のデータより小さい場合 出力データ数:0」であると認識する。
 次に、S907により、入力データの内容について出力データ数に与える影響が、クエリ内の情報を参照するかどうかを確認する。
 参照している場合は、S908により、クエリを解析し、クエリ内の情報を得る。
 次に、S909により、クエリ内の情報を入力データ数と出力データ数の比率に適用する。本入力例の場合はクエリ内の情報を参照していないが、仮に参照している入力の場合、S904からS905までの処理と同等の処理が行われる。
 逆にクエリ内の情報を参照していないか、クエリ内の情報の解決が完了した場合は、解析処理を終了する。すなわち、S906~S909により、流量判定規則テーブル1144の出力データ数に与える影響420が確定するまで、S907~S909を繰り返す。このため、クエリ解析部1133はクエリ定義1264内のSELECT句等の入力データと出力データの数の関係を解釈するため予め設定された内部テーブル1135を備え、この内部テーブル1135を参照してクエリ定義1264内の入力データと出力データの数の関係を特定する。この内部テーブル1135は、例えば、クエリ内で用いる関数(MAX等)や演算子毎に入力データと出力データの数の関係を予め設定しておくテーブルである。
 図10はデータ判定部1141における流量制御処理のフローチャートを示す。図10の処理は、データ送信部1131が入力データを読み込んで、データ判定部1141に入力データを送信する度に実行される。データ送信部1131は読み込んだ入力データについて、データ判定部1141の流量制御処理の結果に応じて入力データの送信を決定する。
 以下では、データ判定部1141における流量制御処理を、図3のクエリ定義1264の例と、流量判定規則テーブルの例1140と、最大受信流量設定テーブルの例1143と、流量予測保持テーブルの例1142と、ストリームデータs1用送信データの構成例700を用いて説明する。
 データ判定部1141で流量制御処理が開始されると、まずS1001により、データ判定部1141がデータ送信部1131から入力データを受信する。
 次に、S1002により、データ判定部1141は流量判定規則テーブルを参照する。図3のクエリ定義1264の入力例の場合、流量判定規則テーブル1144の内容は、図4で示したように、入力データ数と出力データ数の比率が「5:1~5」であり、入力データの内容が出力データ数に与える影響は「条件:c1の値が前回のデータより小さい場合 出力データ数:0」である。
 次に、S1003により、データ判定部1141は、入力データについて、まだ確認していない出力に与える影響が存在するかどうかを確認する。図3のクエリ定義1264の例の場合、出力データ数に与える影響は、上述のように1つ存在する。
 存在する場合は、S1004により、入力データの値が、出力に与える影響の「条件」に合致するかどうかを判定する。
 合致する場合は、S1005により、このデータを入力した時の出力データ数を、上記「条件」に対応する「データ数」であるとみなす。
 上記条件に合致しない場合は、S1003に戻って判定を継続する。
 入力データの値が出力に与える影響の「条件」に合致しない場合は、S1006により、流量判定規則テーブル1144の「入力数:出力数」を参照し、当該比率に基づいてこのデータを入力した時の出力データ数を求める。S1003からS1006の処理について、図3のクエリ定義1264の例の場合は、S1001で受信したデータが、図7のストリームデータ720の場合、c1の値が前回のデータ710より小さいため条件に合致し、ストリームデータ720を入力した時の出力データ数は0である。一方、S1001で受信したストリームデータが図7のストリームデータ730の場合、c1の値が前回のストリームデータ720より大きいため条件に合致せず、ストリームデータ730を入力した時の出力データ数は上記比率に基づいて0.2~1である。
 次に、S1007により、データ判定部1141求めた出力データ数を、流量予測保持テーブル1142に反映する。
 次に、S1008により、データ判定部1141は流量予測保持テーブル1142に保持された予測出力数が、最大受信流量設定テーブル1143の値を超えているか否かを判定する。
 予測出力数が最大受信流量設定テーブル1143の値を超えている場合は、S1009により、流量制御部1140が、データ送信部1131からストリームデータ処理計算機1200へのストリームデータの入力を停止するよう要求する。
 一方、予測出力数が最大受信流量設定テーブル1143の値を超えていない場合は、S1010により、流量制御部1140は、データ送信部1131からストリームデータ処理計算機1200へのデータの入力を継続するよう要求する。S1007からS1010の処理について、図3のクエリ定義1264の場合は、S1001で受信したデータが図7のストリームデータ720の場合、ストリームデータ720を入力した時の出力データ数は0であるため、流量予測保持テーブル1142の予測出力数は50~250(個/秒)から変わらず、最大受信流量設定テーブル1143に設定されている値=250(個/秒)を超えないため、データ送信部1131はストリームデータ処理計算機1200へストリームデータ720の入力(送信)を行う。
 一方、S1001で受信したデータが図7のストリームデータ730(512番目のデータ)の場合、ストリームデータ730を入力した時の出力データ数は0.2~1個(5:1~5:5)であるため、この値(0.2~1)加えると流量予測保持テーブル1142の予測出力数は、例えば、前回の出力データ数が50~250の場合は、新たな出力データの数が50.2~251(個/秒)となり、最大受信流量設定テーブル1143に設定されている250(個/秒)を超えるため、データ送信部1131はストリームデータ処理計算機1200へストリームデータ730の入力(送信)を行わない。本実施形態の場合は、所定の単位時間(例えば、1秒)が経過するたび流量予測保持テーブル1142の予測出力数を0~0(個/秒)に戻すリセット処理を行う。このため、ストリームデータ処理計算機1200へのストリームデータ730の入力は、前記のリセット処理を行った後に行われる。したがって、流量予測保持テーブル1142は、上記図2のS204の処理で、データ判定部1141が予測値(出力データ数/秒)を求める度に、前回の値に新たな予測値が加算され、所定の単位時間が経過する度に初期化(最小値=0~最大値=0)される。
 以上のように、本発明によれば、ストリームデータ処理部1260へストリームデータを入力(送信)するデータ量を、結果受信計算機1300の利用者が設定した最大受信量設定テーブルの閾値を超過しないようにストリームデータの送信側のデータ量を規制することで、結果受信計算機1300等のストリームデータ処理結果を受け付ける計算機で処理速度超過を回避することが可能となり、円滑なストリームデータの利用を実現できる。
 なお、上記実施形態においては、流量制御部1140とデータ送信部1131及びクエリ解析部1133を備えるデータ送信計算機1100と、ストリームデータ処理部1260とクエリ管理部1230を備えるストリームデータ処理計算機1200を独立した計算機として分離した例を示したが、これらの各処理部がひとつの計算機で実行されても良い。
 本発明によればストリームデータを送信する計算機と、ストリームデータを受信して処理する計算機と、ストリームデータの処理結果を受信して利用する計算機を備えたストリームデータ処理システムに適用することができる。

Claims (14)

  1.  プロセッサと記憶装置を備えた計算機が、ストリームデータの処理結果を結果受信計算機に送信するストリームデータ処理システムであって、
     前記計算機は、
     前記ストリームデータを処理するクエリを受け付けるクエリ情報格納部と、
     前記クエリ情報格納部が受け付けたクエリによって前記ストリームデータを処理するストリームデータ処理部と、
     前記ストリームデータ処理部で処理した結果を前記結果受信計算機へ送信する処理結果送信部と、
     前記ストリームデータ処理部へストリームデータを送信するデータ送信部と、を備え、
     前記クエリ情報格納部に格納されたクエリを取得するクエリ取得部と、
     前記クエリを解析して前記処理結果送信部が結果受信計算機へ送信するデータ量の予測値を演算するクエリ解析部と、
     前記予測値と予め設定した閾値とを比較して、前記予測値が閾値を超える場合には、前記データ送信部がストリームデータ処理部へ送信するストリームデータを規制する流量制御部と、
    を有することを特徴とするストリームデータ処理システム。
  2.  請求項1に記載のストリームデータ処理システムであって、
     前記計算機は、
     前記データ送信部と、前記クエリ取得部と、クエリ解析部及び流量制御部を含む第1の計算機と、
     前記クエリ情報格納部とストリームデータ処理部及びデータ送信部を含む第2の計算機と、を有し、
     前記第2の計算機のクエリ情報格納部は、
     前記受け付けたクエリを前記第1の計算機の前記送信部へ送信するクエリ送信部を含み、
     前記第1の計算機のクエリ取得部は、
     前記クエリ送信部から送信されたクエリを受信するクエリ受信部を有し、
     前記第1の計算機の前記クエリ解析部は、
     前記データ送信部が第2の計算機へ送信するストリームデータについて前記予測値を求め、
     前記第1の計算機の前記流量制御部は、
     前記クエリ解析部が求めた前記予測値が閾値を超える場合には、前記第2の計算機へ送信するストリームデータを規制することを特徴とするストリームデータ処理システム。
  3.  請求項1に記載のストリームデータ処理システムであって、
     前記クエリ解析部は、
     前記データ送信部が前記ストリームデータ処理部へ送信するストリームデータを入力データとし、前記ストリームデータ処理部が出力するクエリの処理結果を出力データとし、入力データと出力データの数の比を予測値として演算することを特徴とするストリームデータ処理システム。
  4.  請求項3に記載のストリームデータ処理システムであって、
     前記クエリ解析部は、
     前記入力データが出力データの数に与える条件の有無を前記クエリを解析して判定し、前記判定により前記条件がある場合には、当該条件に基づく入力データと出力データの数の関係を求め、
     前記流量制御部は、
     前記予測値と前記条件に基づく入力データと出力データの数が前記閾値を超えたときには、前記データ送信部がストリームデータ処理部へ送信するストリームデータを規制することを特徴とするストリームデータ処理システム。
  5.  請求項1に記載のストリームデータ処理システムであって、
     前記クエリ解析部は、
     前記解析するクエリの関数又は演算子について予め入力データと出力データの数の関係を設定し、当該関係に基づいて前記入力データと出力データの数の比を予測値として演算することを特徴とするストリームデータ処理システム。
  6.  プロセッサと記憶装置を備えた計算機が、ストリームデータの処理結果を結果受信計算機に送信するストリームデータ処理方法であって、
     前記計算機が、前記ストリームデータを処理するクエリを受け付ける第1のステップと、
     前記計算機が、前記受け付けた前記クエリを解析して、前記ストリームデータを処理したときに前記結果受信計算機へ送信するデータ量の予測値を演算する第2のステップと、
     前記計算機が、前記予測値と予め設定した閾値とを比較して、前記予測値が閾値を超える場合には、前記ストリームデータ処理部へ送信するストリームデータを規制する第3のステップと、
     前記計算機が、前記予測値が閾値以下の場合には、前記ストリームデータを前記計算機のストリームデータ処理部へ送信する第4のステップと、
     前記計算機のストリームデータ処理部が、前記ストリームデータを受信して前記クエリによって処理する第5のステップと、
     前記クエリによって前記ストリームデータを処理した結果を前記結果受信計算機へ送信する第6のステップと、
    を有することを特徴とするストリームデータ処理方法。
  7.  請求項6に記載のストリームデータ処理方法であって、
     前記計算機は、
     前記ストリームデータ処理部を備えて、前記第1のステップと、第5のステップと、第6のステップを処理する第2の計算機と、前記第2のステップと、第3のステップと、第4のステップを処理する第1の計算機から構成されて、
     前記第1のステップは、
     前記第2の計算機が、前記受け付けたクエリを前記第1の計算機の前記送信部へ送信し、前記第1の計算機は、前記第2の計算機が送信したクエリを受信し、
     前記第2のステップは、
     前記第1の計算機が、前記受け付けた前記クエリを解析して、前記ストリームデータを処理したときに前記第2の計算機のストリームデータ処理部が前記結果受信計算機へ送信するデータ量の予測値を演算し、
     前記第3のステップは、前記第1の計算機が、前記予測値と予め設定した閾値とを比較して、前記予測値が閾値を超える場合には、前記第1の計算機が前記第2の計算機のストリームデータ処理部へ送信するストリームデータを規制し、
     前記第4のステップは、
     前記第1の計算機が、前記予測値が閾値以下の場合には、前記ストリームデータを前記第2の計算機のストリームデータ処理部へ送信するストリームデータ処理方法。
  8.  請求項6に記載のストリームデータ処理方法であって、
     前記第2のステップは、
     前記計算機が、前記ストリームデータ処理部へ送信するストリームデータを入力データとし、前記ストリームデータ処理部が出力するクエリの処理結果を出力データとし、入力データと出力データの数の比を予測値として演算することを特徴とするストリームデータ処理方法。
  9.  請求項8に記載のストリームデータ処理方法であって、
     前記第2のステップは、
     前記入力データが出力データの数に与える条件の有無を前記クエリを解析して判定し、前記判定により前記条件がある場合には、当該条件に基づく入力データと出力データの数の関係を求め、
     前記第3のステップは、
     前記予測値と前記条件に基づく入力データと出力データの数が前記閾値を超えたときには、前記データ送信部がストリームデータ処理部へ送信するストリームデータを規制することを特徴とするストリームデータ処理方法。
  10.  請求項6に記載のストリームデータ処理方法であって、
     前記第2のステップは、
     前記解析するクエリの関数又は演算子について予め入力データと出力データの数の関係を設定し、当該関係に基づいて前記入力データと出力データの数の比を予測値として演算することを特徴とするストリームデータ処理方法。
  11.  プロセッサと記憶装置を備えた計算機が、ストリームデータの処理結果を結果受信計算機に送信するプログラムであって、
     前記ストリームデータを処理するクエリを受け付ける第1の手順と、
     前記受け付けた前記クエリを解析して、前記ストリームデータを処理したときに前記結果受信計算機へ送信するデータ量の予測値を演算する第2の手順と、
     前記予測値と予め設定した閾値とを比較して、前記予測値が閾値を超える場合には、前記ストリームデータ処理部へ送信するストリームデータを規制する第3の手順と、
     前記予測値が閾値以下の場合には、前記ストリームデータを前記計算機のストリームデータ処理部へ送信する第4の手順と、
     前記計算機のストリームデータ処理部が、前記ストリームデータを受信して前記クエリによって処理する第5の手順と、
     前記クエリによって前記ストリームデータを処理した結果を前記結果受信計算機へ送信する第6の手順と、
    を前記計算機に実行させることを特徴とするプログラム。
  12.  請求項11に記載のプログラムであって、
     前記第2の手順は、
     前記計算機が、前記ストリームデータ処理部へ送信するストリームデータを入力データとし、前記ストリームデータ処理部が出力するクエリの処理結果を出力データとし、入力データと出力データの数の比を予測値として演算することを特徴とするプログラム。
  13.  請求項12に記載のプログラムであって、
     前記第2の手順は、
     前記入力データが出力データの数に与える条件の有無を前記クエリを解析して判定し、前記判定により前記条件がある場合には、当該条件に基づく入力データと出力データの数の関係を求め、
     前記第3の手順は、
     前記予測値と前記条件に基づく入力データと出力データの数が前記閾値を超えたときには、前記データ送信部がストリームデータ処理部へ送信するストリームデータを規制することを特徴とするプログラム。
  14.  請求項11に記載のプログラムであって、
     前記第2の手順は、
     前記解析するクエリの関数又は演算子について予め入力データと出力データの数の関係を設定し、当該関係に基づいて前記入力データと出力データの数の比を予測値として演算することを特徴とするプログラム。
PCT/JP2010/054274 2010-03-08 2010-03-08 ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム WO2011111235A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2010/054274 WO2011111235A1 (ja) 2010-03-08 2010-03-08 ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム
JP2012504260A JP5489025B2 (ja) 2010-03-08 2010-03-08 ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/054274 WO2011111235A1 (ja) 2010-03-08 2010-03-08 ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム

Publications (1)

Publication Number Publication Date
WO2011111235A1 true WO2011111235A1 (ja) 2011-09-15

Family

ID=44563077

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/054274 WO2011111235A1 (ja) 2010-03-08 2010-03-08 ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム

Country Status (2)

Country Link
JP (1) JP5489025B2 (ja)
WO (1) WO2011111235A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116109441A (zh) * 2023-02-24 2023-05-12 北明天时能源科技(北京)有限公司 基于物联网数据流式处理的热网数据治理系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004005520A (ja) * 2002-04-26 2004-01-08 Yamaha Corp ストリームデータ処理システム、ストリームデータ処理方法、ストリームデータ処理プログラム、及びこのプログラムを格納したコンピュータで読み取り可能な記録媒体
JP2006338432A (ja) * 2005-06-03 2006-12-14 Hitachi Ltd ストリームデータ処理システムのクエリ処理方法
JP2007328716A (ja) * 2006-06-09 2007-12-20 Hitachi Ltd ストリームデータ処理方法
JP2008123426A (ja) * 2006-11-15 2008-05-29 Hitachi Ltd インデックス処理方法及び計算機システム
JP2009059273A (ja) * 2007-09-03 2009-03-19 Nec Corp ストリームデータ制御システム、ストリームデータ制御方法およびストリームデータ制御用プログラム
JP2009134689A (ja) * 2007-10-29 2009-06-18 Hitachi Ltd ストリームデータのランキングクエリ処理方法およびランキングクエリ処理機構を有するストリームデータ処理システム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004005520A (ja) * 2002-04-26 2004-01-08 Yamaha Corp ストリームデータ処理システム、ストリームデータ処理方法、ストリームデータ処理プログラム、及びこのプログラムを格納したコンピュータで読み取り可能な記録媒体
JP2006338432A (ja) * 2005-06-03 2006-12-14 Hitachi Ltd ストリームデータ処理システムのクエリ処理方法
JP2007328716A (ja) * 2006-06-09 2007-12-20 Hitachi Ltd ストリームデータ処理方法
JP2008123426A (ja) * 2006-11-15 2008-05-29 Hitachi Ltd インデックス処理方法及び計算機システム
JP2009059273A (ja) * 2007-09-03 2009-03-19 Nec Corp ストリームデータ制御システム、ストリームデータ制御方法およびストリームデータ制御用プログラム
JP2009134689A (ja) * 2007-10-29 2009-06-18 Hitachi Ltd ストリームデータのランキングクエリ処理方法およびランキングクエリ処理機構を有するストリームデータ処理システム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116109441A (zh) * 2023-02-24 2023-05-12 北明天时能源科技(北京)有限公司 基于物联网数据流式处理的热网数据治理系统
CN116109441B (zh) * 2023-02-24 2024-03-19 北明天时能源科技(北京)有限公司 基于物联网数据流式处理的热网数据治理系统

Also Published As

Publication number Publication date
JPWO2011111235A1 (ja) 2013-06-27
JP5489025B2 (ja) 2014-05-14

Similar Documents

Publication Publication Date Title
US10409650B2 (en) Efficient access scheduling for super scaled stream processing systems
JP5337447B2 (ja) ストリームデータ処理方法、及びシステム
US20130332490A1 (en) Method, Controller, Program and Data Storage System for Performing Reconciliation Processing
CN109033206B (zh) 一种规则匹配方法、云服务器及规则匹配系统
JP2010134599A (ja) ストリームデータ処理制御方法、ストリームデータ処理装置及びストリームデータ処理制御プログラム
Plale et al. dQCOB: managing large data flows using dynamic embedded queries
US11966778B2 (en) Cloud application scaler
US10031901B2 (en) Narrative generation using pattern recognition
Backman et al. C-MR: continuously executing MapReduce workflows on multi-core processors
Bhatotia et al. Slider: Incremental sliding-window computations for large-scale data analysis
EP3413197A1 (en) Task scheduling method and device
Wang et al. A novel complex event processing engine for intelligent data analysis in integrated information systems
US20210303575A1 (en) Offloading statistics collection
Denninnart et al. Harnessing the potential of function-reuse in multimedia cloud systems
US11650966B2 (en) Assisted problem identification in a computing system
JP5489025B2 (ja) ストリームデータ処理システム、ストリームデータ処理方法及びストリームデータ流量制御プログラム
Park et al. Queue congestion prediction for large-scale high performance computing systems using a hidden Markov model
US10621163B2 (en) Tracking and reusing function results
CN115510139A (zh) 数据查询方法和装置
Wang et al. An adaptive elasticity policy for staging based in-situ processing
Deepthi et al. An efficient architecture for processing real-time traffic data streams using apache flink
JPWO2014054233A1 (ja) 情報システムの性能評価装置、方法およびプログラム
CN112948132B (zh) 云服务事件及服务等级合约数据的向量化方法
US20230153303A1 (en) Database Query Optimization Via Parameter-Sensitive Plan Selection
US20230086203A1 (en) Stale data recognition

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: 10847465

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012504260

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10847465

Country of ref document: EP

Kind code of ref document: A1