The present invention relates to a computation device or the like, which is suitable for processing an event sequence, and more particularly to a computation device or the like for processing an event sequence in which events of multiple types are multiplexed.
<Related Art 1: Hardware Configuration Method of Extracting an Event Sequence of a Predetermined Length and Performing Computation Processing for the Extracted Event Sequence>
Non Patent Literature 1 describes an example of related art directed to a computation device and a computation method for processing an event sequence. Non Patent Literature 1 discloses a hardware configuration method of extracting an event sequence of a predetermined length (also called as a “window”) from an input event sequence, and predetermined computation processing is performed for the extracted event sequence.
The technique of Non Patent Literature 1 is capable of configuring hardware of performing computation processing of counting the number of appearances of events, whose brand names each indicate a predetermined character string (“UBSN”, for example) from latest four events in an event sequence configured such that one event is formed by sets of four factors (serial number, brand name, price, and trading volume) (Q3 in Non Patent Literature 1).
The technique of Non Patent Literature 1 is also capable of configuring hardware of performing computation processing of extracting latest four event sequences whose brand names each indicate a predetermined character string (“UBSN”, for example) from an event sequence configured such that one event is formed by sets of four factors (serial number, brand name, price, and trading volume) (Q4 in Non Patent Literature 1), and calculating a weighted average of prices included in each of the four events (see FIG. 6 of Non Patent Literature 1).
<Related Art 2: Hardware Configuration Method of Detecting an Event Sequence Expressed by a Regular Expression of a Function and Performing Computation Processing for the Detected Event Sequence>
Non Patent Literature 2 describes an example of another related art directed to a computation device and a computation method for processing an event sequence. Non Patent Literature 2 discloses a hardware configuring method, in which an event sequence satisfying a predetermined regular expression is detected from an input event sequence, and predetermined computation processing is performed for the detected event sequence. FIG. 5 of Non Patent Literature 2 illustrates four configuration patterns for configuring a basic operator expressed by a regular expression into hardware.
The technique of Non Patent Literature 2 is capable of configuring hardware for performing computation processing of calculating a moving average of prices of four consecutive events from an event sequence configured such that one event is formed by sets of two factors (price and time) (see (a) of FIG. 6 of Non Patent Literature 2), and hardware for performing computation processing of detecting the limit (maximum or minimum) of the price (see (b) of FIG. 6 of Non Patent Literature 2).
<Other Related Arts>
Other related arts are disclosed in Patent Literatures 1 and 2, for instance.
The problem of the related arts resides in the fact that it is not possible to efficiently configure hardware for performing concurrent processing of an event sequence in which events of multiple types are multiplexed. Concurrent processing of an event sequence in which events of multiple types are multiplexed is the processing as described below. Referring to
The technique of Non Patent Literature 1 is capable of performing predetermined computation processing of an event sequence of the same type. The technique is also capable of performing predetermined computation processing of an event sequence (hereinafter, called as a sub-event sequence for each event type), which is obtained by extracting events of the same type from a multiplexed event sequence. For instance, it is possible to configure hardware for performing computation processing of calculating a weighted average of prices of latest four events whose brand names each indicate a predetermined character string (“UBSN”, for example), from the multiplexed event sequence illustrated in
On the other hand, concurrent processing of an event sequence in which events of multiple types are multiplexed is computation processing of extracting event sequences each of which includes the same brand name (hereinafter, called as sub-event sequences for individual brands) from the event sequence illustrated in
Non Patent Literature 1 fails to disclose a hardware configuration method for efficiently performing concurrent processing of a multiplexed event sequence as described above. Therefore, when concurrent processing of a multiplexed event sequence as described above is performed by applying the technique of Non Patent Literature 1, as illustrated in
For instance, Non-patent Literature 3 and Non-patent Literature 4 disclose an approach of configuring independent hardware for each event type. This is because in view of the necessity for performing predetermined computation processing to a plurality of events (in this example, four consecutive events), it is not possible to finish the computation processing each time an event arrives. Therefore, it is necessary to retain an interim result of computation processing all the time. Further, it is necessary to retain an interim result of computation processing for each brand in order to process an event of a certain brand which arrives during the computation processing of another brand.
However, there is considered a case, in which only one event arrives at one time in a multiplexed event sequence. In this case, when independent hardware for each brand is configured as illustrated in
On the other hand, hardware resources mountable in a semiconductor circuit are limited. Therefore, applying an inefficient configuration method may increase the circuit scale, and may limit the number of brands processable by one semiconductor circuit.
In view of the above, an object of the present invention is to provide a computation device and a computation method for processing an event sequence in which events of multiple types are multiplexed.
A computation device according to the invention includes:
an event identification unit receiving a first event and outputting an event ID associated with an event type;
a computation interim result retaining unit receiving the event ID, and outputting a first computation interim result associated with the event ID; and
a time-series computation processing unit receiving the first event and the first computation interim result, performing computation processing, and outputting a second event and a second computation interim result.
The computation interim result retaining unit receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
A computation method according to the invention for use in a computation device is provided with an event identification unit, a computation interim result retaining unit, and a time-series computation processing unit. In the method:
the event identification unit receives a first event and outputs an event ID associated with an event type,
the computation interim result retaining unit receives the event ID and outputs a first computation interim result associated with the event ID,
the time-series computation processing unit receives the first event and the first computation interim result, performs computation processing, and outputs a second event and a second computation interim result, and
the computation interim result retaining unit receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
A computation program according to the invention allows a computer to function as event identification unit, computation interim result retaining unit, and time-series computation processing unit. In the function:
the event identification unit receives a first event and outputs an event ID associated with an event type,
the computation interim result retaining unit receives the event ID and outputs a first computation interim result associated with the event ID,
the time-series computation processing unit receives the first event and the first computation interim result, performs computation processing, and outputs a second event and a second computation interim result, and
the computation interim result retaining unit receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
According to the present invention, it is possible to provide a computation device or the like for processing an event sequence in which events of multiple types are multiplexed.
In the following, embodiments for carrying out the present invention (hereinafter, called as “exemplary embodiments”) are described with reference to the accompanying drawings. The following exemplary embodiments are directed to predetermined computation processing of an event sequence in which events of multiple types are multiplexed. The present invention is adopted to a computation device or the like capable of implementing detection of complex events from an event sequence in which events of multiple types are multiplexed and computation defined in association with the detected event sequence.
In the following, there is described an event sequence in which events of multiple types are multiplexed. The computation devices in the exemplary embodiments perform predetermined processing on input events. The predetermined processing includes detection as to whether an event satisfies a predetermined condition, and predetermined computation using the event. The “event” means “various information or a set of information generated with occurrence of a certain phenomenon”. The predetermined detection is a detection as to whether information included in an event (hereinafter, called as “event information”) coincides with certain information, for instance. Alternatively, the predetermined detection is a detection as to whether the value of event information is not smaller (or not larger) than a certain threshold value, for instance. Further alternatively, the predetermined detection is a detection as to whether a plurality of event information items included in an event satisfy a predetermined relationship, for instance. The predetermined computation is computation using event information, for instance. Alternatively, the predetermined computation is computation with respect to event information and another information, for instance. Further, when a plurality of events are input in a time-series manner, in other words, when an event sequence is input, it is possible to define sequential processing of the respective events constituting an event sequence.
On the other hand, it is possible to classify one event by focusing on one or more event information items out of event information included in the event. This is called as event types. For instance, it is possible to classify one event on the basis of the value of predetermined event information. For instance, an event including four event information items (serial number, brand name, price, and trading volume) may be classified on the basis of the value of the brand name. Alternatively, an event may be classified as to whether the value of certain event information is included in a certain set. An event including four event information items (serial number, brand name, price, and trading volume) may be classified as to whether the brand name is included in a certain set (brands constituting the Nikkei stock average, for example).
When a plurality of events are input in a time-series manner, in other words, when an event sequence is input, it is possible to classify the respective events constituting the event sequence. Performing the classification makes it possible to constitute an event sequence obtained by extracting events of one type from an event sequence (hereinafter, called as a sub-event sequence for each event type), a plurality of events being input in a time-series manner to form the event sequence. An event sequence constituted of classifiable events as described above is called as an event sequence in which events of multiple types are multiplexed.
The computation device of the first exemplary embodiment is configured to receive a data group (hereinafter, called as an event) including one or more data items (hereinafter, called as input data) as input, and to perform predetermined computation. Specifically, the computation device is configured to receive first events 1000 in a time-series manner, perform predetermined computation, and output second events 1100 in a time-series manner.
As illustrated in
Events to be input to the computation device 100 are classified in advance on the basis of one or more event information items. This is called as event types. The event types are classified on the basis of the value(s) of one or more event information items, for instance. Further, for instance, the event types are classified on the basis as to whether the value(s) of one or more event information items is included in a predetermined set. Further, for instance, the event types are classified on the basis as to whether the values of a plurality of event information items are the same as each other. Further alternatively, the event types are classified on the basis of a time when events are input to the computation device 100. Furthermore, an identifier is associated with an event type (hereinafter, called as an event ID). A correlation between event types and event IDs is retained, in advance, in the event identification unit 2000.
The event identification unit 2000 identifies the type of the first event 1000 input to the computation device 100, and transmits the event ID associated with the event type to the computation interim result retaining unit 3000. An allocation mapping table is used for identifying the event type, for instance. The allocation mapping table is implemented by a memory, for instance, or is implemented by a register, for instance. Further, a CAM (Content Addressable Memory) is used for identifying the event type, for instance. Further, a search device based on a binary search tree is used for identifying the event type, for instance.
The computation interim result retaining unit 3000 retains, in advance, an interim result of immediately preceding computation processing in association with the event ID for each event type. The computation interim result retaining unit 3000 transmits, to the time-series computation processing unit 4000, a first computation processing interim result associated with the event ID transmitted from the event identification unit 2000.
The time-series computation processing unit 4000 receives the first event 1000. Further, the time-series computation processing unit 4000 receives the first computation processing interim result from the computation interim result retaining unit 3000. Furthermore, the time-series computation processing unit 4000 performs predetermined time-series computation processing on the basis of the first event 1000 and the first computation processing interim result. As the configuration of the time-series computation processing unit 4000, it is possible to use the technique of configuring a circuit for detecting an event sequence that satisfies a specific condition from multitudes of events, as described in Non Patent Literature 1, for instance. Alternatively, it is possible to use the technique of configuring hardware for performing “computation by a regular expression using a function as an element”, as described in Non Patent Literature 2.
The time-series computation processing unit 4000 generates the second event 1100 by predetermined time-series computation processing. The second event is output as a computation result of the computation device 100. Further, the time-series computation processing unit 4000 generates a second computation processing interim result by predetermined time-series computation processing. The second computation processing interim result is transmitted to the computation interim result retaining unit 3000.
The computation interim result retaining unit 3000 receives the second computation processing interim result from the time-series computation processing unit 4000, and retains the second computation processing interim result in association with the event ID.
The first computation result retaining unit 4200 receives the first computation processing interim result from the computation interim result retaining unit 3000 and retains the first computation processing interim result.
The time-series computation processing calculation unit 4100 receives the first event. Further, the time-series computation processing calculation unit 4100 receives the first computation processing interim result from the computation result retaining unit 4200. Furthermore, the time-series computation processing calculation unit 4100 performs predetermined time-series computation processing on the basis of the first event and the first computation processing interim result, and generates the second event and the second computation processing interim result. The time-series computation processing calculation unit 4100 transmits the computation processing interim result to the second computation result retaining unit 4300.
The second computation result retaining unit 4300 receives the second computation processing interim result from the time-series computation processing calculation unit 4100, and transmits the second computation processing interim result to the computation interim result retaining unit 3000.
The time-series computation processing calculation unit 4100 includes a time-series computation processing calculation circuit 4101 which performs predetermined time-series computation processing, receives the event 1000 and the first computation processing interim result, performs predetermined time-series computation processing, and generates the second event and the second computation processing interim result.
The second computation result retaining unit 4300 includes a register 4201, retains the second computation processing interim result generated by the time-series computation processing calculation circuit 4101, and also transmits the computation processing interim result to the computation interim result retaining unit 3000.
Next, an overall operation of the first exemplary embodiment is described in details referring to the block diagrams of
First of all, as illustrated in
Subsequently, the event identification unit 2000 in
Subsequently, the event identification unit 2000 transmits the event ID 2001 to the computation interim result retaining unit 3000. The computation interim result retaining unit 3000 selects a computation interim result associated with the event ID 2001 from among the computation interim results retained inside the computation interim result retaining unit 3000, and outputs the selected computation interim result as a first computation interim result 3001 (Step A103 in
Subsequently, the computation interim result retaining unit 3000 transmits the first computation interim result 3001 to the time-series computation processing unit 4000. Further, the time-series computation processing unit 4000 receives the first event 1000. The time-series computation processing unit 4000 performs predetermined time-series computation processing on the basis of the first computation interim result 3001 and the first event 1000, and outputs the second event 1100 and a second computation interim result 3002. The second event 1100 is output to the outside as a computation result of the computation device 100 (Step A104 in
Subsequently, the time-series computation processing unit 4000 transmits the second computation interim result 3002 to the computation interim result retaining unit 3000. The computation interim result retaining unit 3000 retains the second computation interim result 3002 inside the computation interim result retaining unit 3000, in association with the event ID 2001 (Step A105 in
Lastly, the operation returns to Step A101 in
Next, an advantageous effect of the first exemplary embodiment is described. In the first exemplary embodiment, the computation device is provided with an event identification unit, a computation interim state retaining unit, and a time-series computation processing unit. The event identification unit is operated to receive a first event and output an event ID associated with the event type. The computation interim state retaining unit is operated to receive the event ID and output a first computation interim result associated with the event ID. The time-series computation processing unit is operated to receive the first event and the first computation interim result, perform predetermined computation processing, and output a second event and a second computation interim result. Further, the computation interim state retaining unit is operated to receive the second computation interim result and retain the second computation interim result in association with the event ID. Thus, it is possible to perform computation processing of an event sequence in which events of multiple types are multiplexed.
The computation method in the first exemplary embodiment is such that the operation of the computation device 100 in the first exemplary embodiment is regarded as a method invention. Specifically, the computation method in the first exemplary embodiment is a computation method to be used for the computation device 100 provided with the event identification unit 2000, the computation interim result retaining unit 3000, and the time-series computation processing unit 4000. The event identification unit 2000 receives the first events 1000 and outputs an event ID associated with each event type. The computation interim result retaining unit 3000 receives the event ID and outputs the first computation interim result associated with the event ID. The time-series computation processing unit 4000 receives the first event 1000 and the first computation interim result, performs computation processing, and outputs the second event 1100 and the second computation interim result. The computation interim result retaining unit 3000 receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
The computation device 100 of the first exemplary embodiment may be implemented by software. The computation program of the first exemplary embodiment is configured to replace the respective elements of the computation device 100 in the first exemplary embodiment by respective function unit, and cause a computer to function as the respective unit. Specifically, the computation program of the first exemplary embodiment is a computation program which causes a computer to function as event identification unit (2000), computation interim result retaining unit (3000), and time-series computation processing unit (4000). The event identification unit (2000) receives the first events 1000 and outputs an event ID associated with each event type. The computation interim result retaining unit (3000) receives the event ID and outputs the first computation interim result associated with the event ID. The time-series computation processing unit (4000) receives the first event 1000 and the first computation interim result, performs computation processing, and outputs the second event 1100 and the second computation interim result. The computation interim result retaining unit (3000) receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other. The computer may be a general computer constituted of a memory, a CPU, an input/output interface, and the like. The program is loaded in the memory, and read line by line by the CPU for interpretation and execution. Further, the program may be recorded in a non-transitory storage medium such as an optical disc or a semiconductor memory. In the above case, the program is read from the storage medium by the computer for execution.
The computation device 200 in
The second event identification unit 5000 in
The second computation interim result retaining unit 6000 in
In the following, an overall operation of the exemplary embodiment is described in details referring to the block diagrams of
At Step A202, the second event identification unit 5000 identifies the event type on the basis of the first event 1000, and outputs the first event ID 2101 associated with the event type. Concurrently, the second event identification unit 5000 newly generates and outputs the second event ID 2201. Further, the second event identification unit 5000 retains the second event ID 2201 in association with the event type.
At Step A203, the computation interim result retaining unit 6000 receives the first event ID 2101 and the second event ID 2201 from the event identification unit 5000. Further, the computation interim result retaining unit 6000 selects a first computation interim result 3001 associated with the first event ID 2101 from among the computation interim results retained inside the computation interim result retaining unit 6000. Further, the computation interim result retaining unit 6000 outputs the selected first computation interim result 3001 to the time-series computation processing unit 4000.
At Step A205, the computation interim result retaining unit 6000 receives the second computation interim result 3002 from the time-series computation processing unit 4000. Further, the computation interim result retaining unit 6000 retains the second computation interim result 3002 and the second event ID 2201 in association with each other.
Next, an advantageous effect of the second exemplary embodiment is described. The computation device of the second exemplary embodiment is provided with a second event identification unit, a second computation interim state retaining unit, and a time-series computation processing unit. The event identification unit is operated to receive a first event, output a first event ID associated with the event type and a second event ID which is newly generated with respect to the event, and also retain the second event ID in association with the event type. The second interim state retaining unit is operated to receive the first event ID, and output a first computation interim result associated with the event ID. The time-series computation processing unit is operated to receive the first event and the first computation interim result, perform predetermined computation processing, and output a second event and a second computation interim result. Further, the computation interim state retaining unit is operated to receive the second computation interim result, and retain the second computation interim result in association with the second event ID. Thus, it is possible to achieve computation processing of an event sequence in which events of multiple types are multiplexed.
Further, in the second exemplary embodiment, the second event identification unit is operated to newly assign the second event ID. Therefore, it is possible to associate the event ID, even when the event type which may be input to the computation device is unknown. Further, in the second exemplary embodiment, the second event identification unit is operated to newly assign the second event ID. Therefore, it is possible to associate an event ID with an event type, even when the number of types of events to be input to the computation device is larger than the number of event IDs.
The computation method in the second exemplary embodiment is such that the operation of the computation device 100 of the second exemplary embodiment is regarded as a method invention. Specifically, the computation method in the second exemplary embodiment is a computation method for use in the computation device 200 provided with the event identification unit 5000, the computation interim result retaining unit 6000, and the time-series computation processing unit 4000. The event identification unit 5000 receives the first event 1000, outputs the first event ID associated with the event type, newly generates the second event ID, outputs the second event ID, and also retains the event type and the second event ID in association with each other. The computation interim result retaining unit 6000 receives the first event ID, and outputs the first computation interim result associated with the first event ID. The time-series computation processing unit 4000 receives the first event 1000 and the first computation interim result, performs computation processing, and outputs the second event 1100 and the second computation interim result. The computation interim result retaining unit 6000 receives the second computation interim result and the second event ID, and retains the second computation interim result and the second event ID in association with each other.
The computation device 200 of the first exemplary embodiment may be implemented by software. The computation program of the second exemplary embodiment is configured to replace the respective elements of the computation device 200 of the second exemplary embodiment by respective function unit, and cause the respective unit to be functioned by a computer. Specifically, the computation program of the first exemplary embodiment is a computation program which causes event identification unit (5000), computation interim result retaining unit (6000), and time-series computation processing unit (4000) to be functioned by a computer. The event identification unit (5000) receives the first event 1000, outputs the first event ID associated with the event type, newly generates the second event ID, outputs the second event ID, and also retains the event type and the second event ID in association with each other. The computation interim result retaining unit (6000) receives the first event ID, and outputs the first computation interim result associated with the first event ID. The time-series computation processing unit (4000) receives the first event 1000 and the first computation interim result, performs computation processing, and outputs the second event 1100 and the second computation interim result. The computation interim result retaining unit (6000) receives the second computation interim result and the second event ID, and retains the second computation interim result and the second event ID in association with each other. The computer may be a general computer constituted of a memory, a CPU, an input/output interface, and the like. The program is loaded in the memory, and read line by line by the CPU for interpretation and execution. Further, the program may be recorded in a non-transitory storage medium such as an optical disc or a semiconductor memory. In the above case, the program is read from the storage medium by the computer for execution.
In the following, operations of the first and second exemplary embodiments are described using concrete examples.
The event 1001 input to the computation device 100 is respectively transmitted to a search key extraction unit 2101 in an event identification unit 2000, and to a register 4201A in a time-series computation processing calculation unit 4100. The search key extraction unit 2101 in the event identification unit 2000 extracts the value of the city “city” in the event 1001 as a search key, and transmits the search key to an event ID search unit 2201.
The event ID search unit 2201 in the event identification unit 2000 retains, in advance, sets of a city “key” and an event ID “event_id”. Referring to
In a memory 3101 in the computation interim result retaining unit 3000, an event ID “event_id”, a yesterday temperature “t0”, and a day before yesterday temperature “t1” are stored in advance. Reading the value of the address indicated by the value of the event ID “event_id” from the memory 3101 makes it possible to respectively read the yesterday temperature “t0” and the day before yesterday temperature “t1” of each city. In the memory 3101 in
The memory read control unit 3201 in the computation interim result retaining unit 3000 receives the event ID “event_id” from the event ID search unit 2201, and reads the value of the address indicated by the value of the event ID “event_id”. Concurrently, the memory read control unit 3201 transmits the event ID “event_id” to a memory write control unit 3401. Further, the memory read control unit 3201 stores the yesterday temperature “t0” read from the memory in a register 4201B included in the time-series computation processing calculation unit 4100, and the day before yesterday temperature “t1” read from the memory in a register 4201C, respectively.
The time-series computation processing calculation unit 4100 in the time-series computation processing unit 4000 reads an event from the register 4201A, a first yesterday temperature “prev_t0” from the register 4201B, and a first day before yesterday temperature “prev_μl” from the register 4201C, respectively. Further, the time-series computation processing calculation unit 4100 extracts event information temperature “ev.temp” from an event “ev”, and calculates an average of the first yesterday temperature “prev_t0” and the first day before yesterday temperature “prev_μl”. The time-series computation processing calculation unit 4100 stores the calculated average value in an event information temperature “ave.temp” of a calculation result “ave”. Further, the time-series computation processing calculation unit 4100 extracts event information city “city” from the event “ev”, and stores the event information city “city” in event information “ave.city” of the calculation result “ave”. Further, the time-series computation processing calculation unit 4100 stores the calculation result “ave” in a register 4301A. Further, the time-series computation processing calculation unit 4100 stores the value of the event information temperature “ev.temp” of the event “ev” in a register 4301B as a second yesterday temperature “next_t0”. Further, the time-series computation processing calculation unit 4100 stores the first yesterday temperature “prev_t0” in a register 4301C as a second day before yesterday temperature “next_t1”.
The memory write control unit 3401 in the computation interim result retaining unit 3000 receives the event ID “event_id” from the memory read control unit 3201. Further, the memory write control unit 3401 reads the second yesterday temperature from the register 4301B, and the second day before yesterday temperature from the register 4301C, respectively. Further, the memory write control unit 3401 writes the second yesterday temperature and the second day before yesterday temperature in the address indicated by the event ID “event_id” in the memory 3101.
Operation 1 (event 1001_1 {city=SAPPORO, temp=−3})
Next, a method for processing an event sequence by the computation device in the first example is described.
First of all, the event 1001_1 is respectively transmitted to the search key extraction unit 2101 in the event identification unit 2000 and to the register 4201A in the time-series computation processing unit 4000. The search key extraction unit 2101 extracts the value of the city “city” (SAPPORO) from the transmitted event 1001_1, and transmits the extracted value to the event ID search unit 2201 as a search key. The event ID search unit 2201 searches the value of the event ID “event_id” (4) on the basis of the value of the search key (SAPPORO), and transmits the event ID to the memory read control unit 3201 in the computation interim result retaining unit 3000.
The memory read control unit 3201 reads the first yesterday temperature “t0” and the first day before yesterday temperature “t1” from the fourth address in the memory 3101, on the basis of the value of the event ID “event_id” (4). The values read by this operation are {t0=−8, t1=−4}, respectively. The memory read control unit 3201 respectively stores the values in the register 4201B and in the register 4201C in the time-series computation processing unit 4000.
The time-series computation processing calculation unit 4100 respectively reads the values from the registers 4201A, 4201B, and 4201C; and performs predetermined computation. A second event with the city “city” being SAPPORO, and the temperature “temp” being “−5” is generated, and the second event is output as output data from the computation device 100. Further, the value of the second yesterday temperature “next_t0” (−3) is stored in the register 4301B, and the value of the second day before yesterday temperature “next_μl” (−8) is stored in the register 4301C.
The memory write control unit 3401 receives the event “event_id” from the memory read control unit 3201, and concurrently reads the second yesterday temperature and the second day before yesterday temperature from the registers 4301B and 4301C, respectively. Further, the memory write control unit 3401 stores the value of the second yesterday temperature (−3) and the value of the second day before yesterday temperature (−8) in the fourth address in the memory 3101, on the basis of the value of the event ID “event_id” (4).
Operation 2 (event 1001_2 {city=HIROSHIMA, temp=25})
The event identification unit 2000 extracts a search key (HIROSHIMA) from the event 1001_2, acquires the value of the event ID “event_id” (1) on the basis of the search key, and transmits the acquired value to the computation interim result retaining unit 3000. The computation interim result retaining unit 3000 acquires the values of the first yesterday temperature and the first day before yesterday temperature {t0=20, t1=22}, on the basis of the value of the event ID “event_id” (1); and transmits the acquired values to the time-series computation processing unit 4000.
The time-series computation processing unit 4000 performs predetermined computation on the basis of the first event “ev”, the first yesterday temperature, and the first day before yesterday temperature; and generates the value of the second event “ave” {city=HIROSHIMA, temp=22}, the value of the second yesterday temperature (25), and the value of the second day before yesterday temperature (20). The second yesterday temperature and the second day before yesterday temperature are transmitted to the computation interim result retaining unit 3000. The computation interim result retaining unit 3000 respectively stores the value of the second yesterday temperature (25) and the value of the second day before yesterday temperature (20) in the first address in the memory 3101, on the basis of the value of the event ID “event_id” (1).
The computation device 200 in
in a sub-event sequence obtained by classifying an event sequence on the basis of each location,
an event such that the value of the temperature sensor is 45 or higher arrives, and
an event such that the value of the smoke sensor is 1 subsequently arrives within five minutes thereafter.
This is one of the implementation examples, in which the processing device is configured to detect occurrence of fire with use of the temperature sensor and the smoke sensor, and detection of an event sequence such that “the temperature is 45° C. or higher” and “substantially concurrently, smoke is detected” is used as detection for occurrence of fire. Further, this is one of the implementation examples, in which the processing device is configured to detect abnormality of a device with use of the temperature sensor and the smoke sensor, and detection of an event sequence such that “the temperature is 45° C. or higher” and “substantially concurrently, smoke is detected” is used as detection for abnormality of the device.
The event 1002 input to the computation device 200 is transmitted to a search key extraction unit 2101 in an event identification unit 5000. The search key extraction unit 2101 in the event identification unit 5000 extracts the values of the location “Area” and time “TimeStamp” in the event 1002 as a search key, and transmits the search key to an event ID search unit 5201. The event ID search unit 5201 in the event identification unit 5000 retains, in advance, sets of a location “Area”, an event ID “event_id”, and a time “TimeStamp”.
Referring to
The event ID search unit 5201 receives a search key “key”={Area, TimeStamp} from the search key extraction unit 5101. Further, the event ID search unit 5201 searches the first event ID and the second event ID on the basis of the following rules. Rule 1: When there is a set whose value of “Area” in the “key” coincides within the retained “sets of a location “Area”, an event ID “event_id”, and a time “TimeStamp””, the values of “event_id” in the set are defined as the first event ID “event_id—1” and the second event ID “event_id—2”.
Rule 2: When there is no set whose value of “Area” in the “key” coincides within the retained “sets of a location “Area”, an event ID “event_id”, and a time “TimeStamp””, the value of the first event ID “event_id—1” is set to “0”. Further, a set with the oldest “TimeStamp” value is selected from among the retained “sets of a location “Area”, an event ID “event_id”, and a time “TimeStamp””. Further, the value of the “event_id” in the selected set is defined as the second event ID “event_id—2”. Then, the search key “key” and the second event ID are associated with each other to be retained by replacing the former set with the present set.
The event ID search unit 5201 transmits the searched first event ID “event_id—1” and the searched second event ID “event_id—2” to a second computation interim result retaining unit 6000. The second computation interim result retaining unit 6000 stores, in a memory 3101, in advance, an event ID and a computation interim result of a time-series computation processing calculation unit 4100 in association with each other. The computation interim result in the second example includes a determination result “A” such that an immediately preceding event is “an event whose value of the temperature sensor is 45 or higher”, and a value of the time of the event “ts”.
The memory 3101 respectively stores therein the immediately preceding event determination result “A”=0, and the event time “ts”=9:00, as the value of the first event ID “event_id”=1 (in the first address in the memory), for instance. Reading the value of the address indicated by the value of the first event ID “event_id—1” allows for reading the value of the event determination result “A” and the value of the event time “ts”, respectively. The read values are transmitted to the time-series computation processing calculation unit 4100 as the first event determination result “A”, and the first event time.
The time-series computation processing calculation unit 4100 in
The time-series computation processing calculation unit 4100 receives the first event, the first event determination result “A”, and the first event time “ts”; performs predetermined computation; and generates the second event, the second event determination result “A”, and the second event time “ts”. The second event is output as a computation result of the computation device 200. The second event determination result “A” and the second event time “ts” are transmitted to the second computation interim result retaining unit 6000.
The second computation interim result retaining unit 6000 receives the second event determination result “A” and the second event time “ts”, and retains the second event determination result “A” and the second event time “ts” in association with the second event ID. Specifically, the second computation interim result retaining unit 6000 writes the value of the second event determination result “A” and the value of the second event time “ts” in the memory 3101, while using the value of the second event ID “event_id—2” as an address.
Operation 1 (event 1002_1 {SensorType=Smoke, Area=3F, TimeStamp=9:05, Value=1})
Next, a method for processing an event sequence by the computation device in the second example is described.
First of all, the event 1002_1 is transmitted to the search key extraction unit 5101 in the event identification unit 5000. The search key extraction unit 5101 extracts the value of the location “Area” (3F) and the time (9:05) from the transmitted event 1002_1 as a search key “key”, and transmits the search key to the second event ID search unit 5201.
The second event ID search unit 5201 searches a set whose location “Area” coincides with the value of the search key ((Area=3F, TimeStamp=9:05)), on the basis of a predetermined procedure. The second event ID search unit 5201 retains, in advance, a set whose value of the location “Area” is 3F. Therefore, the second event ID search unit 5201 acquires the value of the event ID “event_id” (2) in the set. The second event ID search unit 5201 defines the acquired value of the event ID “event_id” as the values of the first event ID “event_id—1” and the second event ID “event_id—2”. Further, the acquired first event ID and the acquired second event ID are transmitted to the second computation interim result retaining unit 6000.
A memory read control unit 3201 in the second computation interim result retaining unit 6000 receives the first event ID “event_id—1”, and respectively reads the value of the event determination result “A” (1) and the value of the event time “ts” (9:01) from the second address in the memory 3101, on the basis of the value of the first event ID “event_id l” (2). Further, the read values are transmitted to the time-series computation processing calculation unit 4100 as the first event determination result “A” and the first event time. The transmitted values of the first event determination result “A” and the first event time “ts” are stored in the register 4202A and register 4202B, respectively.
The time-series computation processing calculation unit 4100 in the time-series computation processing unit 4000 respectively reads the values from the registers 4202A, 4202B, and 4202C, and performs predetermined computation. The time-series computation processing calculation unit 4102A for determining whether the input event is the event A such that “the value of the temperature sensor is 45 or higher” stores the value “0” of the event determination result “A” in a register 4302A, because the sensor type “SensorType” of the event 1002_1 read from the register 4202C is the smoke sensor “Smoke”. Concurrently, the time-series computation processing calculation unit 4102A stores the value “9:05” of the time “TimeStamp” of the event 1002_1 in a register 4302B.
The time-series computation processing calculation unit 4102B determines whether the input event is the event B such that “the event whose value of the smoke sensor is 1, and a time lag between the time of the immediately preceding event and the time of the target event is five minutes or less”. The time-series computation processing calculation unit 4102B determines that the input event is the event B, because the sensor type “SensorType” of the event 1002_1 read from the register 4202C is the smoke sensor “Smoke”, the value “Value” is 1, and a time lag between the time of the immediately preceding event “9:01” read from the register 4202B and the time of the event 1002_1 “9:05” is within five minutes. Further, the value of the immediately preceding event determination result “A” read from the register 4202A is 1, and the value of the determination result “B” of the event B to be output from the time-series computation processing calculation unit 4102B is 1. Therefore, the time-series computation processing calculation unit 4102B determines that the events A and B consecutively appear in an event sequence constituted of an event whose value of the location “Area” is 3F, and stores the resultant value “1” in a register 4302C.
A memory write control unit 3401 in the second computation interim result retaining unit 6000 receives the second event ID “event_id—2” from the second event ID search unit 5201, and concurrently reads the second event determination result “A” and the second event time “ts” from the registers 4302A and 4302B, respectively. Further, the memory write control unit 3401 stores the value of the second event determination result (0) and the value of the second event time (9:05) in the second address in the memory 3101, on the basis of the value of the second event ID “event_id—2” (2).
Lastly, the value “1” stored in the register 4302C is output as the second event, which is an output from the computation device 200. Specifically, occurrence of fire is detected, for instance. Alternatively, abnormality of a device is detected, for instance.
Operation 2 (event 1002_2 (SensorType=Temperature, Area=2F, TimeStamp=9:07, Value=50))
The second event identification unit 5000 extracts the search key ({Area=2F, TimeStamp=9:07}) from the event 1002_2. Then, the second event identification unit 5000 searches a set whose location “Area” coincides with a value based on the search key according to a predetermined procedure. The second event identification unit 5000 does not retain a set whose value of the location “Area” is “2F”. Therefore, the second event identification unit 5000 sets the value of the first event ID “event_id—1” to “0”. Further, the second event identification unit 5000 sets the value of the event ID “event_id” (1) in the set whose time “TimeStamp” is the oldest among the retained sets (first row), as the value of the second event ID. Then, the search key “key”={Area=2F, TimeStamp=9:07} and the value of the second event ID (1) are associated with each other, and are retained by replacing the former set (first row) with the present set. Further, the acquired first event ID and the acquired second event ID are transmitted to the second computation interim result retaining unit 6000.
The second computation interim result retaining unit 3000 tries to acquire the first event determination result “A” and the first event time “ts”, on the basis of the value of the first event ID “event_id—1” (0). However, there is no data in the zero-th address in the memory 3101. Therefore, the second computation interim result retaining unit 6000 transmits “0” as the value of the first event determination result “A”, and invalid value “n/a” as the first event time respectively to the time-series computation processing unit 4000.
The time-series computation processing unit 4000 performs predetermined computation on the basis of the first event, the first event determination result (0), and the first event time (n/a); and respectively generates the second event (0), the second event determination result “A” (1), and the second event time (9:07).
The computation interim result retaining unit 6000 respectively stores the value of the second event determination result “A” (1) and the value of the second event time (9:07) in the first address in the memory 3101, on the basis of the value of the second event ID “event_id—2” (1).
In the second example, when the event type whose location “Area” is 2F appears for the first time, second event ID search unit associates the location “Area” with a new event ID. Therefore, it is possible to retain a computation interim result in preparation for arrival of a next event, even when the second computation interim result retaining unit 3000 does not retain the computation interim result of an event sequence whose location “Area” is 2F.
As described above, the present invention has been described referring to the foregoing exemplary embodiments and examples. The present invention, however, is not limited to the foregoing exemplary embodiments and examples. It is possible to add various modifications, comprehensible to a person skilled in the art, to the configuration and the details of the present invention. Further, the present invention may include combination of part of or all of the configurations according to the exemplary embodiments and examples as necessary.
Part of or all of the exemplary embodiments and examples may be described as the following Supplemental Notes. The present invention, however, is not limited to the following configurations.
[Supplemental Note 1] A computation device, including: an event identification unit receiving a first event and outputting an event ID associated with an event type;
a computation interim result retaining unit receiving the event ID, and outputting a first computation interim result associated with the event ID; and
a time-series computation processing unit receiving the first event and the first computation interim result, performing computation processing, and outputting a second event and a second computation interim result,
wherein the computation interim result retaining unit receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
[Supplemental Note 2] A computation device, including:
an event identification unit receiving a first event, outputting a first event ID associated with an event type, newly generating a second event ID, outputting the second event ID, and retaining the event type and the second event ID in association with each other;
a computation interim result retaining unit receiving the first event ID, and outputting a first computation interim result associated with the first event ID; and
a time-series computation processing unit receiving the first event and the first computation interim result, performing computation processing, and outputting a second event and a second computation interim result,
wherein the computation interim result retaining unit receives the second computation interim result and the second event ID, and retains the second computation interim result and the second event ID in association with each other.
[Supplemental Note 3] The computation device according to Supplemental Note 1 or 2, wherein
the computation processing is computation processing by a regular expression using a function as an element.
[Supplemental Note 4] A computation method for use in a computation device provided with an event identification unit, a computation interim result retaining unit, and a time-series computation processing unit, wherein
the event identification unit receives a first event and outputs an event ID associated with an event type,
the computation interim result retaining unit receives the event ID and outputs a first computation interim result associated with the event ID,
the time-series computation processing unit receives the first event and the first computation interim result, performs computation processing, and outputs a second event and a second computation interim result, and
the computation interim result retaining unit receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
[Supplemental Note 5] A computation method for use in a computation device provided with an event identification unit, a computation interim result retaining unit, and a time-series computation processing unit, wherein
the event identification unit receives a first event, outputs a first event ID associated with an event type, newly generates a second event ID, outputs the second event ID, and retaining the event type and the second event ID in association with each other,
the computation interim result retaining unit receives the first event ID and outputs a first computation interim result associated with the first event ID,
the time-series computation processing unit receives the first event and the first computation interim result, performs computation processing, and outputs a second event and a second computation interim result, and
the computation interim result retaining unit receives the second computation interim result and the second event ID, and retains the second computation interim result and the second event ID in association with each other.
[Supplemental Note 6] The computation method according to Supplemental Note 4 or 5, wherein
the computation processing is computation processing by a regular expression using a function as an element.
[Supplemental Note 7] A computation program to allow a computer to function as event identification unit, computation interim result retaining unit, and time-series computation processing unit, wherein
the event identification unit receives a first event and outputs an event ID associated with an event type,
the computation interim result retaining unit receives the event ID and outputs a first computation interim result associated with the event ID,
the time-series computation processing unit receives the first event and the first computation interim result, performs computation processing, and outputs a second event and a second computation interim result, and
the computation interim result retaining unit receives the second computation interim result, and retains the second computation interim result and the event ID in association with each other.
[Supplemental Note 8] A computation program to allow a computer to function as event identification unit, computation interim result retaining unit, and time-series computation processing unit, wherein
the event identification unit receives a first event, outputs a first event ID associated with an event type, newly generates a second event ID, outputs the second event ID, and retaining the event type and the second event ID in association with each other,
the computation interim result retaining unit receives the first event ID and outputs a first computation interim result associated with the first event ID,
the time-series computation processing unit receives the first event and the first computation interim result, performs computation processing, and outputs a second event and a second computation interim result, and
the computation interim result retaining unit receives the second computation interim result and the second event ID, and retains the second computation interim result and the second event ID in association with each other.
[Supplemental Note 9] The computation program according to Supplemental Note 7 or 8, wherein
the computation processing is computation processing by a regular expression using a function as an element.
This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2012-059262, filed on Mar. 15, 2012, the disclosure of which is incorporated herein in its entirety by reference.
The present invention is applicable for use in processing real-time information (event sequence) from a sensor or a terminal. In particular, the present invention is applicable for use in classifying events of an event sequence to be transmitted from multitudes of sensors or multitudes of terminals for each individual sensor, and performing predetermined processing for each classified event. Further, the present invention is applicable for use in classifying sensors on the basis as to whether each sensor belongs to a predetermined set (such as a sensor disposed in each household, a sensor disposed in each building, and a sensor disposed in each floor of the building), and performing predetermined processing for each classified set.
Number | Date | Country | Kind |
---|---|---|---|
2012-059262 | Mar 2012 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2013/055989 | 3/5/2013 | WO | 00 |