Event processing method in stream processing system and stream processing system
First Claim
1. An event processing method in a stream processing system, wherein the stream processing system comprises an input unit and a rule engine, wherein matching modes of the rule engine comprise at least a full-loop mode, a half-loop mode, and a non-loop mode, wherein each matching mode of the rule engine is corresponding to one engine memory, wherein each engine memory stores at least one basic event, and wherein the method comprises:
- acquiring, by using the input unit, the at least one basic event that is used to represent a status of a target object, wherein the basic event comprises at least one of a condition and attribute information of the target object;
matching the basic event with basic events stored in engine memories that are corresponding to each matching mode in the rule engine, to determine an engine memory comprising the basic event;
inputting the basic event into the full-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode;
adding a full-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode;
using the basic event to which the full-loop identifier is added as a full-loop matching result;
executing the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode;
modifying, according to the execution result, the attribute information of the target object in the engine memory corresponding to the full-loop mode;
matching the execution result with the basic events that are stored in the engine memories in the rule engine;
inputting the basic event into the half-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode;
adding a half-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode;
using the basic event to which the half-loop identifier is added as a half-loop matching result;
executing the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode;
modifying, according to the execution result, the attribute information of the target object in the engine memory corresponding to the half-loop mode;
outputting the execution result; and
inputting the basic event into the non-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode;
adding a non-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode;
using the basic event to which the non-loop identifier is added as a non-loop matching result;
executing the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode; and
outputting the execution result.
1 Assignment
0 Petitions
Accused Products
Abstract
An event processing method in a stream processing system includes matching a basic event with basic events stored in engine memories corresponding to each matching mode in a rule engine, to determine an engine memory including the basic event, and when it is determined that the engine memory including the basic event is an engine memory corresponding to a full-loop mode, inputting the basic event into the full-loop mode of the rule engine, adding a full-loop identifier to the basic event. This method implements classification processing on complex events by using different matching modes of the rule engine, improving performance of processing a complex event in an Event Stream Processing (ESP) service processing process.
6 Citations
12 Claims
-
1. An event processing method in a stream processing system, wherein the stream processing system comprises an input unit and a rule engine, wherein matching modes of the rule engine comprise at least a full-loop mode, a half-loop mode, and a non-loop mode, wherein each matching mode of the rule engine is corresponding to one engine memory, wherein each engine memory stores at least one basic event, and wherein the method comprises:
-
acquiring, by using the input unit, the at least one basic event that is used to represent a status of a target object, wherein the basic event comprises at least one of a condition and attribute information of the target object; matching the basic event with basic events stored in engine memories that are corresponding to each matching mode in the rule engine, to determine an engine memory comprising the basic event; inputting the basic event into the full-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode; adding a full-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode; using the basic event to which the full-loop identifier is added as a full-loop matching result; executing the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode; modifying, according to the execution result, the attribute information of the target object in the engine memory corresponding to the full-loop mode; matching the execution result with the basic events that are stored in the engine memories in the rule engine; inputting the basic event into the half-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode; adding a half-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode; using the basic event to which the half-loop identifier is added as a half-loop matching result; executing the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode; modifying, according to the execution result, the attribute information of the target object in the engine memory corresponding to the half-loop mode; outputting the execution result; and inputting the basic event into the non-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode; adding a non-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode; using the basic event to which the non-loop identifier is added as a non-loop matching result; executing the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode; and outputting the execution result. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A stream processing system, comprising:
-
an input unit, wherein the input unit is configured to acquire at least one basic event that is used to represent a status of a target object, wherein the basic event comprises at least one of a condition and attribute information of the target object; and a rule engine, wherein the rule engine comprises; a matching unit, wherein the matching unit is configured to match the basic event with basic events stored in engine memories that are corresponding to each matching mode in the rule engine, to determine an engine memory comprising the basic event; and an execution unit, wherein matching modes of the rule engine comprise at least; a full-loop mode; a half-loop mode; and a non-loop mode, wherein each matching mode of the rule engine is corresponding to one engine memory, and each engine memory stores at least one basic event, and wherein the execution unit is configured to; input the basic event into the full-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode; add a full-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the full-loop mode; use the basic event to which the full-loop identifier is added as a full-loop matching result; execute the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is the engine memory corresponding to the full-loop mode; modify, according to the execution result, the attribute information of the target object in the engine memory corresponding to the full-loop mode; match the execution result with the basic events that are stored in engine memories in the rule engine; input the basic event into the half-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the half-loop mode; add a half-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is the engine memory corresponding to the half-loop mode; use the basic event to which the half-loop identifier is added as a half-loop matching result; execute the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is the engine memory corresponding to the half-loop mode; modify, according to the execution result, the attribute information of the target object in the engine memory corresponding to the half-loop mode; output the execution result; input the basic event into the non-loop mode of the rule engine when it is determined that the engine memory comprising the basic event is an engine memory corresponding to the non-loop mode; add a non-loop identifier to the basic event when it is determined that the engine memory comprising the basic event is the engine memory corresponding to the non-loop mode; use the basic event to which the non-loop identifier is added as a non-loop matching result; execute the basic event to obtain an execution result when it is determined that the engine memory comprising the basic event is the engine memory corresponding to the non-loop mode; and output the execution result. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification