WO2016127577A1 - 一种处理事件的方法及装置 - Google Patents

一种处理事件的方法及装置 Download PDF

Info

Publication number
WO2016127577A1
WO2016127577A1 PCT/CN2015/084477 CN2015084477W WO2016127577A1 WO 2016127577 A1 WO2016127577 A1 WO 2016127577A1 CN 2015084477 W CN2015084477 W CN 2015084477W WO 2016127577 A1 WO2016127577 A1 WO 2016127577A1
Authority
WO
WIPO (PCT)
Prior art keywords
matching
event
state machine
machine instance
events
Prior art date
Application number
PCT/CN2015/084477
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 EP15881737.9A priority Critical patent/EP3121715B1/en
Publication of WO2016127577A1 publication Critical patent/WO2016127577A1/zh
Priority to US15/336,194 priority patent/US9658903B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for processing an event.
  • CEP Complex Event Processing
  • Pattern matching is one of the important capabilities of the CEP system. It is mainly used to identify the best time for business execution based on specific events in a real-time business scenario. In the matching process, the matching is performed by the sliding machine or the state machine instance of the event in the batch window. When an event occurs in the window, the CEP system needs to establish a state machine instance for the event that occurs, and the new event will be generated.
  • the state machine instance that has notified the event in the window taking the sliding window as an example: the success condition of the matching is that there are three consecutive events, and the three events are in the order of time, event 1, event 2 and event 3, when the event After the occurrence of 3, the CEP system establishes a state machine instance corresponding to event 3, and notifies the occurrence of event 3 to the state machine instance of the established event 1 and the state machine instance of event 2, respectively, and the state machine instance of event 1 performs matching, And determine that the number of events that have appeared in the window is three, the matching is successful; if the sliding window occurs after the event 3 occurs, the event 1 is separated from the sliding window, then the state machine instance of the event 2 performs matching, and determines that the window has been The number of events that occurred was less than three and the match failed.
  • the length of the window is required to cover more events.
  • the pattern matching function of the CEP system is used to filter out frequently dropped users, and during the call, the specified number of times exceeds the specified number of times.
  • the call drop event determines that the match was successful. Since the time of the dropped call event in the actual application cannot be predicted, it may be distributed at any time during the entire call.
  • the length of the window needs to be extended to improve the window for the call process. The coverage of the dropped call event. However, the longer the window, the more events that may be covered. If a match is made, the long window is overwritten.
  • the creation of a state machine instance requires a part of memory resources.
  • the CEP system needs to occupy a large amount of memory resources to create events for events in the long matching window.
  • the machine instance increases the memory overhead when the CEP system performs pattern matching in complex scenarios.
  • the embodiment of the invention provides a method and a device for processing an event, which can reduce the memory overhead of the CEP system when performing pattern matching in a complex scenario.
  • the embodiment of the present invention adopts the following technical solutions:
  • an embodiment of the present invention provides a method for processing an event, where the method includes:
  • the state machine instance matches in the current matching period, wherein the state machine instance is used to match the event that has occurred with the preset matching rule in a matching period, and obtain a matching result.
  • the matching result is a result of matching success or a result of matching failure;
  • the state machine instance detects whether the number of events that have occurred currently is greater than 1;
  • the time at which the X+1 event occurs is taken as the start time of the next matching period, and the matching is re-matched in the next matching period, where the The events are sequentially arranged in the order of chronological order from the first event to the X+1 event.
  • the method further includes:
  • the method further includes:
  • any one of the first to the second possible implementation manners of the first aspect in a third possible implementation manner of the first aspect, includes: The state machine instance does not get the matching result in the current matching period.
  • any one of the first to the second possible implementation manners of the first aspect, in the fourth possible implementation manner of the first aspect, the result that the matching is not successful includes: The state machine instance obtains the result of the matching failure in the current matching period.
  • the method further includes: when the first event occurs Establish the state machine instance.
  • the preset matching rule at least includes: The number of events that have occurred in a matching period reaches a threshold, and/or the type of event that has occurred in the one matching period conforms to a preset type.
  • the preset matching rule is: the type of the event that has occurred in the one matching period is consistent with Preset type; the method further includes:
  • the state machine instance detects whether the number of currently occurring events exceeds a preset value
  • At least one of the events recorded by the state machine instance is deleted.
  • the method further includes: removing information corresponding to the deleted event in the attribute list for performing matching.
  • an embodiment of the present invention provides an apparatus for processing an event, where the apparatus includes:
  • a processing module configured to perform matching in a current matching period after the occurrence of the X event, where the processing module is further configured to match an event that has occurred with a preset matching rule in a matching period, and A matching result is obtained, and the matching result is a result of matching success or a result of matching failure;
  • a judging module configured to detect whether the number of currently occurring events is greater than 1 when the result of the matching success is not obtained
  • the processing module is further configured to: if the current number of events that have occurred is greater than 1, the time when the X+1 event occurs is used as the start time of the next matching period, and is re-created in the next matching period. A matching is performed, wherein the events that have occurred are sequentially arranged in the order of occurrence of the events from the first event to the X+1 event.
  • the processing module is further configured to: if the number of currently occurring events is equal to 1, delete the currently occurring event and end State machine instance.
  • the processing module is further configured to: when the result of the matching is successful, delete the Describe the currently occurring event and end the state machine instance.
  • any one of the first to the second possible implementation manners of the second aspect, in a third possible implementation manner of the second aspect, the result that the matching is not successful includes: The state machine instance does not get the matching result in the current matching period.
  • any one of the first to the second possible implementation manners of the second aspect, in the fourth possible implementation manner of the second aspect, the result that the matching is not successful includes: The state machine instance obtains the result of the matching failure in the current matching period.
  • the device further includes: an establishing module, configured to The state machine instance is established when the first event occurs.
  • the preset matching rule at least includes: the number of events that have occurred in the one matching period reaches a threshold, and/or in the one matching period The type of event that has occurred matches the preset type.
  • the preset matching rule is: the type of the event that has occurred in the one matching period is consistent with Preset type; the device further includes:
  • a detecting module configured to detect whether the number of currently occurring events exceeds a preset value
  • the processing module is further configured to delete at least one of the events recorded by the state machine instance if the number of currently occurring events exceeds a preset value.
  • the information in the attribute list is used to perform the matching.
  • the processing module is further configured to remove information corresponding to the deleted event in the attribute list for performing matching.
  • the method and device for processing an event when the X event occurs, the state machine instance performs matching in the current matching period. When the result of the matching success is not obtained, if the state machine instance detection currently appears If the number of events is greater than 1, the time at which the X+1 event occurs is taken as the start time of the next matching period, and the matching is re-matched in the next matching period.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and avoidance
  • the omission of events in a complex scenario reduces the memory resources occupied by creating multiple state machine instances, thereby reducing the memory overhead of the CEP system for pattern matching in complex scenarios.
  • FIG. 1 is a schematic structural diagram of a specific application scenario according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for processing an event according to an embodiment of the present invention
  • FIG. 3 is a flowchart of another method for processing an event according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a specific application scenario according to an embodiment of the present disclosure.
  • FIG. 5 is a flowchart of another method for processing an event according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of another specific application scenario according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of another specific application scenario according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another specific application scenario according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of another specific application scenario according to an embodiment of the present disclosure.
  • FIG. 10 is a flowchart of another method for processing an event according to an embodiment of the present invention.
  • FIG. 11 is a flowchart of another method for processing an event according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of an apparatus for processing an event according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of an apparatus for processing an event according to an embodiment of the present invention.
  • the embodiment of the present invention may be specifically implemented on a device running a system with a pattern matching function, and the specific type of the device running the system with the pattern matching function is not limited.
  • a device running a system with a pattern matching function may be used. It includes components such as an input unit, a processor unit, an output unit, a communication unit, and a storage unit. These components communicate over one or more buses.
  • the structure of the device running the system with the pattern matching function does not constitute a limitation of the present invention, and it may be a bus-shaped structure or a star structure, and may include more or less. Parts, or combine some parts, or different parts.
  • the device running the system with the pattern matching function may be any device having the functions of data storage, processing, and transmission, including but not limited to a blade server, a tower server, a rack server, a mobile workstation, Personal computer, and combinations of two or more of the above.
  • systems with pattern matching capabilities can include PostgreSQL (relational database management server) definitions, algebraic expression compilers, pattern optimization, state machine instance compilation, metadata distribution services, routing and state machine engines, clients.
  • PostgreSQL relational database management server
  • algebraic expression compilers By defining PostgreSQL, add keyword support (SLIDING DISMATCH) in the policy category of PostgreSQL, and identify the keyword from the pattern matching syntax; set the policy category to the attribute of the algebraic expression through the algebraic expression compiler; After mode optimization or directly based on strategy, and algebraic expression
  • the policy in the formula is compiled by the state machine instance; the metadata distribution service distributes the compiled result to the routing and state machine engine, wherein the state machine engine module is mainly used to manage the operation of the basic state machine; Save the state machine engine output event to the business system.
  • the user defines the business model that needs to be identified through the client.
  • PostgreSQL definition, algebraic expression compiler, pattern optimization, and state machine instance compilation compile user-defined business patterns into state machine instance metadata and distribute them by metadata.
  • the service is deployed to the routing and state machine engine module.
  • the route receives the input event and sends it to the state machine engine module, distributes the event to the state machine instance corresponding to the event, and determines whether it is satisfied in the state machine instance in real time.
  • a user-defined business model that, if satisfied, outputs a new event to a third-party business system.
  • the specific compilation process includes at least the following processes:
  • the embodiment of the present invention provides a method for processing an event, as shown in FIG. 2, which may include:
  • the state machine instance matches in the current matching period.
  • the state machine instance is configured to match an event that has occurred and a preset matching rule in a matching period, and obtain a matching result, where the matching result is a result of a successful matching or a result of a matching failure.
  • the triggering conditions for the device of the system with the pattern matching function to start the matching process may be various.
  • a state machine corresponding to the time-based matching window is established. Instances, and begin to perform the matching process; for example, in an event-based application scenario, when the first event occurs, a state machine instance corresponding to the event-based matching window is established, and the matching process is started.
  • a state machine instance running on a device with a pattern matching function records the occurrence of the event, and Information about the events that occur is recorded in the state machine instance.
  • a state machine instance running on a device with a pattern matching function records the type of event that occurs in the attribute list.
  • a counter is set in the state machine instance to count the number of events that have occurred, and the number of counters is incremented by one when a new one occurs.
  • the matching period is defined as a time period in the matching process. When the matching period is reached, the matching process time is considered to have reached a limited time period. It should be noted that the matching period can be set at the time of designing the service, and the specific value of the set matching period is used as information related to the service, and is read when the state machine instance is established, and is executed as a trigger state machine instance.
  • One of the triggering conditions of the detection process for example, in 102, the trigger condition for triggering the state machine instance to perform the detection process is the result that the matching is not successful.
  • the state machine instance detects whether the number of events that have occurred currently is greater than 1.
  • the specific matching rule is not limited, and the matching rule may be preset according to different service requirements.
  • the preset matching rule includes at least: an event that has occurred in the one matching period. The number reaches a threshold, and/or the type of event that has occurred in the one matching period conforms to a preset type.
  • the time when the X+1 event occurs is used as the start time of the next matching period, and the matching is performed again in the next matching period.
  • the events that have occurred are sequentially arranged in the chronological order of occurrence from the first event to the X+1 event.
  • the user starts to make a call
  • the total length of the call is 30 minutes, and there are a total of 3 dropped calls in 30 minutes, appearing in the 10th, 11th, and 15th minutes, respectively, in the 10th minute.
  • the dropped call event can be called the currently occurring event, which appears in the 11th minute.
  • the event can be called the X+1 event.
  • the matching period may be matched with the event that has appeared in the matching window before the sliding and the preset matching rule.
  • the matching period is the same, or the next matching period is reset in the matching process according to the requirements of the business scenario for the event that has appeared in the sliding matching window and the preset matching rule.
  • the dropped event is reported.
  • the matching rule is set to appear 3 times in the 5-minute window or More than 3 dropped calls are reported.
  • the time when the first dropped event occurs is used as the starting time of the matching period, and is detected in the 5-minute window in the matching period.
  • the dropped call event occurs 3 times or more, if the dropped call event in the 5 minute window only appears once, 2 times, or no dropped call event, the 5 minute window is swept to the second dropped call. The event, and the moment when the second call-off event occurs is used as the starting time of the next matching period, and the 5-minute window after the sliding is re-matched.
  • a method for processing an event is provided by the embodiment of the present invention.
  • the state machine instance After the X event occurs, the state machine instance performs matching in the current matching period. When the result of the matching success is not obtained, if the state machine instance detects the current event that has occurred. If the number is greater than 1, the time when the X+1 event occurs is taken as the starting time of the next matching period, and the matching is re-matched in the next matching period.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resources occupied by the state machine instance, thereby reducing The memory overhead of the CEP system for pattern matching in complex scenarios is reduced.
  • the implementation manner shown in FIG. 3 can also be implemented:
  • the currently occurring event satisfies the matching rule, it is considered that the event that has occurred in the matching period matches the preset matching rule, and the result of the matching is successful, and all the events appearing in the matching window in the matching period are deleted. Ending the state machine instance corresponding to the matching window, and when a new event occurs or restarting the event in a new matching window to match the preset matching rule, a new matching window and a state corresponding to the new matching window are created. Machine instance.
  • the preset matching rule is that two or more events occur.
  • one event appears in the window 1, and the window 1 does not satisfy the preset matching rule, and the matching is not completed.
  • 3 events appear in window 2, then window 2 satisfies the preset matching rule, deletes all events appearing in window 2, namely event 1, event 2 and event 3, and ends the state machine instance corresponding to window 2.
  • a method for processing an event is provided by the embodiment of the present invention.
  • the state machine instance After the X event occurs, the state machine instance performs matching in the current matching period. When the result of the matching success is not obtained, if the state machine instance detects the current event that has occurred. If the number is greater than 1, the time when the X+1 event occurs is used as the starting time of the next matching period, and the matching is re-matched in the next matching period; if the number of currently occurring events is equal to 1, the currently existing one is deleted. This event ends the state machine instance.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance. And since the starting time of each matching period is the starting moment of each event, the sliding window is slid based on the starting moment of each occurrence event, thereby avoiding the missing event of the sliding window in the sliding process in the complex scene. The problem.
  • the CEP system does not have to be for each Events create a state machine instance that requires only one state machine instance to match, and avoids event omissions in complex scenarios, reducing memory resources used by creating multiple state machine instances, thereby reducing the CEP system. Memory overhead when pattern matching occurs in complex scenes.
  • the implementation manner shown in FIG. 5 can also be implemented:
  • a method for processing an event is provided by the embodiment of the present invention.
  • the state machine instance After the X event occurs, the state machine instance performs matching in the current matching period. When the result of the matching success is not obtained, if the state machine instance detects the current event that has occurred. If the number is greater than 1, the time when the X+1 event occurs is used as the starting time of the next matching period, and the matching is re-matched in the next matching period; when the result of the matching is successful, the currently occurring event is deleted and the end is ended. The state machine instance.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance. And since the starting time of each matching period is the starting moment of each event, the sliding window is slid based on the starting moment of each occurrence event, thereby avoiding the missing event of the sliding window in the sliding process in the complex scene. The problem.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resources occupied by the state machine instance, which reduces the memory overhead of the CEP system when performing pattern matching in complex scenarios.
  • the result that the matching is not successful includes: the state machine instance does not obtain the matching result in the current matching period.
  • the number of events will be initialized, that is, the current number of events is 1, and it is determined whether the event in the matching window in the matching period matches the preset matching rule to obtain a successful matching result. If the matching is successful, the current The event occurs and ends the state machine instance. If the match fails, the wait state is entered after resetting the state machine instance; when the match cycle is reached, the state machine instance detects the number of events. If the number of events is equal to 1, the event is deleted and the state is ended.
  • the state machine instance is reset and enters the waiting state, and the starting time of the next occurring event is taken as the starting time of the next matching period, and then the event iteration, that is, the current number of events The value is increased by 1, and then matched.
  • state machine instance reset refers to resetting the stateful parameters in the state machine, wherein the stateful parameter may be that after the event occurs in the matching window, the state machine performs the process shown in FIG. 6. The parameters generated during this process, the list of attributes present in the state machine instance do not need to be reset.
  • a method for processing an event when the X event occurs, the state machine instance performs matching in the current matching period, and if the state machine instance does not obtain a matching result in the current matching period, if the state machine instance If the number of events that have occurred currently is greater than 1, the time when the X+1 event occurs is taken as the starting time of the next matching period, and the matching is performed again in the next matching period.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resources occupied by the state machine instance, which reduces the memory overhead of the CEP system when performing pattern matching in complex scenarios.
  • the result that the matching is not successful includes: the state machine instance obtaining the result of the matching failure in the current matching period.
  • the implementation process of the time-based matching window sliding in the state machine instance is as follows:
  • the number of events will be initialized, that is, the current number of events is 1.
  • the matching period it is determined whether the matching event in the matching window matches the preset matching rule to obtain a successful matching result. If the matching is successful, the current deletion is deleted. The event has occurred and ends the state machine instance; if the match fails, the state machine instance detects the number of events. If the number of events is equal to 1, the event is deleted and the state machine instance is ended. If the number of events is greater than 1, the state machine instance is reset and The waiting state is entered, and the starting time of the next occurring event is taken as the starting time of the next matching period, and then the event iteration is performed, that is, the current event number is increased by one.
  • the preset matching rule is that there are 3 or more timeout events.
  • the matching period two events appear in the window, the window does not satisfy the matching rule, the matching fails, and the window is slid. Go to the second event, event 2, and use the time when event 2 appears as the starting time of the matching period.
  • a method for processing an event when the X event occurs, the state machine instance performs matching in the current matching period, and when the state machine instance obtains a matching failure result in the current matching period, if the state machine When the instance detects that the number of events that have occurred currently is greater than 1, the time when the X+1 event occurs is taken as the starting time of the next matching period, and the matching is re-matched in the next matching period.
  • the embodiment in which the event occurs can be used as the starting time of the next matching period, and Re-matching in the next matching period, by repeatedly performing the matching process, enables all events in the sliding window to be matched by only one state machine instance.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resources occupied by the state machine instance, which reduces the memory overhead of the CEP system when performing pattern matching in complex scenarios.
  • the implementation manner shown in FIG. 10 can also be implemented:
  • the state machine instance is established when the first event occurs.
  • the state machine instance is first established, and then the matching process is performed in each matching period by the established state machine.
  • a method for processing an event is provided by the embodiment of the present invention.
  • the state machine instance is established.
  • the state machine instance matches in the current matching period, and when the matching is not successful, As a result, if the state machine instance detects that the number of events that have occurred currently is greater than 1, the time at which the X+1 event occurs is taken as the start time of the next matching period, and the matching is re-matched in the next matching period.
  • the embodiment of the present invention may establish the state machine instance when the first event occurs, and in the process of matching the state machine instance, the time when the next event occurs can be used as the next matching period.
  • the preset matching rule at least includes: the number of events that have occurred in the one matching period reaches a threshold, and/or the type of the event that has occurred in the one matching period meets Preset type.
  • the preset matching rule when the preset matching rule does not need to use the parameter related to the number of events, when the number of currently occurring events exceeds the preset value, and at least one event exists in the state machine instance, The event in the state machine instance is deleted.
  • the preset matching rule is: the type of the event that has appeared in the one matching period conforms to the preset type; the basis of the implementation manner shown in FIG.
  • it also includes the implementation as shown in Figure 11:
  • the state machine instance detects whether the number of currently occurring events exceeds a preset value.
  • the state machine instance If the number of currently occurring events exceeds the preset value, you can delete the earliest event in the event recorded by the state machine instance, that is, the first event in the event, and decrement the number of execution events of the state machine instance by 1.
  • the start time of the matching period is changed from the start time of the first event to the start time of the second event, and the value of the number of events existing in the matching window is increased by 1; or the event recorded by the state machine instance is deleted. Any one or more events in the event, and after deleting any one or more events, the state machine instance also includes at least one event.
  • the preset matching rule is that the type of the event that has occurred in a matching period conforms to the preset type, since the number of events does not affect whether the type of the determining event matches the matching result of the preset type, At least one event recorded by the state machine instance can be deleted.
  • the state machine instance does not delete the recorded event.
  • the user can preset the number of events that can be accommodated in the matching window in the matching period according to the current service requirement, that is, the preset value of the current number of events that have been preset according to the current service requirement, and match
  • the event in the matching window in the period matches the preset matching rule
  • the number of events that have occurred in the current state exceeds the preset value
  • the event recorded by the state machine instance is deleted.
  • the preset value of the number of events is 2, If the number of currently occurring events is greater than 2, you can delete the earliest event in the event recorded by the state machine instance, which is the first event that occurred in the state machine instance record.
  • a method for processing an event is provided by the embodiment of the present invention.
  • the state machine instance After the X event occurs, the state machine instance performs matching in the current matching period. When the result of the matching success is not obtained, if the state machine instance detects the current event that has occurred. If the number is greater than 1, the time when the X+1 event occurs is used as the starting time of the next matching period, and the matching is re-matched in the next matching period; when the preset matching rule does not need to use the parameter related to the number of events
  • the event in the state machine instance can be deleted if the number of currently occurring events exceeds the preset value and there is at least one event in the state machine instance.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance. And since the starting time of each matching period is the starting moment of each event, the sliding window is slid based on the starting moment of each occurrence event, thereby avoiding the missing event of the sliding window in the sliding process in the complex scene. The problem.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resource occupied by the state machine instance; when the preset matching rule does not need to use the parameter related to the number of events, at least one of the current state events may exist when the number of events has exceeded the preset value.
  • deleting an event in the state machine instance reduces the memory resources occupied by the event, thereby reducing the internal matching of the CEP system in complex scenarios. Save overhead.
  • the state machine instance has an attribute list, where the attribute list stores information for performing matching, and when deleting an event that has occurred, the method further includes: removing the attribute list. The information corresponding to the deleted event is used to match.
  • the earliest one in the attribute list corresponds to the last attribute in the attribute list.
  • the attribute is removed. The last attribute in the list.
  • a method for processing an event is provided by the embodiment of the present invention.
  • the state machine instance After the X event occurs, the state machine instance performs matching in the current matching period. When the result of the matching success is not obtained, if the state machine instance detects the current event that has occurred. If the number is greater than 1, the time when the X+1 event occurs is used as the starting time of the next matching period, and the matching is re-matched in the next matching period.
  • the attribute list may be removed. The information corresponding to the deleted event is used to match.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance. And since the starting time of each matching period is the starting moment of each event, the sliding window is slid based on the starting moment of each occurrence event, thereby avoiding the missing event of the sliding window in the sliding process in the complex scene. The problem.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple
  • the memory resource occupied by the state machine instance when deleting an event that has occurred, the information corresponding to the deleted event in the attribute list can be removed, and the memory resource occupied by the attribute list is reduced, thereby reducing the CEP.
  • the embodiment of the present invention provides an apparatus 20 for processing an event.
  • the apparatus 20 may include:
  • the processing module 21 is configured to perform matching in the current matching period after the occurrence of the X event, where the processing module 21 is further configured to match the event that has occurred and the preset matching rule in a matching period. And get a matching result, the matching result is the result of matching success or the result of matching failure.
  • the determining module 22 is configured to detect whether the number of events that have occurred currently is greater than 1 when the result of the successful matching is not obtained.
  • the processing module 21 is further configured to: if the current number of events that have occurred is greater than 1, the time when the X+1 event occurs is used as the start time of the next matching period, and in the next matching period. The matching is performed again, wherein the events that have occurred are sequentially arranged in the chronological order of occurrence from the first event to the X+1 event.
  • the processing module 21 is further configured to delete the current event that has occurred and end the state machine instance if the number of currently occurring events is equal to 1.
  • the processing module 21 is further configured to: when the result of the matching is successful, delete the currently occurring event and end the state machine instance.
  • the result that the matching is not successful includes: the state machine instance does not obtain the matching result in the current matching period.
  • the result that the matching is not successful includes: the state machine instance obtaining the result of the matching failure in the current matching period.
  • the apparatus 20 further includes: an establishing module 23, configured to establish the state machine instance when the first event occurs.
  • the preset matching rule at least includes: the number of events that have occurred in the one matching period reaches a threshold, and/or the type of the event that has occurred in the one matching period meets Preset type.
  • the preset matching rule is that the type of the event that has occurred in the one matching period meets the preset type; the device 20 further includes:
  • the detecting module 24 is configured to detect whether the number of events that have occurred currently exceeds a preset value.
  • the processing module 21 is further configured to delete at least one of the events recorded by the state machine instance if the number of currently existing events exceeds a preset value.
  • the state machine instance has an attribute list, where the attribute list stores information for performing matching, and when the event that has occurred is deleted, the processing module 21 is further configured to remove the The information corresponding to the deleted event in the attribute list for matching.
  • An apparatus for processing an event when the X event occurs, the state machine instance performs matching in the current matching period, and when the result of the matching success is not obtained, if the state machine instance detects the currently occurring event If the number is greater than 1, the time when the X+1 event occurs is taken as the starting time of the next matching period, and the matching is re-matched in the next matching period.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resources occupied by the state machine instance, which reduces the memory overhead of the CEP system when performing pattern matching in complex scenarios.
  • An embodiment of the present invention provides a device 30 for processing an event, where the device 30 can be used for a device running a system with a pattern matching function; as shown in FIG. 13 , it is a possible specific implementation manner of the device 30 .
  • the components include an input unit 31, a processor unit 32, an output unit 33, a communication unit 34, a storage unit 35, and the like. These components communicate over one or more buses. It will be understood by those skilled in the art that the structure of the device 30 shown in the drawings does not constitute a limitation of the present invention. It may be a bus-shaped structure or a star-shaped structure, and may include more or less than the illustration. Parts, or combine some parts, or different parts.
  • the device 30 can be any device with data storage, processing, and transmission functions, including but not limited to a blade server, a tower server, a rack server, a mobile workstation, a personal computer, and the above two or two items. The above combinations and the like.
  • the input unit 31 is used to implement interaction between the operator and the device 30 and/or information input into the device 30.
  • the input unit 31 can receive numeric or character information input by an operator to generate a signal input related to an operator or function control.
  • the input unit 31 may be a touch panel or other human-computer interaction interface, such as a physical input key.
  • the physical input keys used by the input unit 31 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like. kind or more.
  • the processor unit 32 is the control center of the device 30, connecting various portions of the entire device 30 using various interfaces and lines, by running or executing software programs and/or modules stored in the storage unit 35, and by calling the storage in the storage unit 35. Data within to perform various functions of device 30 and/or process data.
  • the processor unit 32 may be composed of an integrated circuit (IC), for example, may be composed of a single packaged IC, or may be composed of a plurality of packaged ICs that have the same function or different functions.
  • the processor unit 32 may include only a central processing unit (CPU), or may be a GPU, a digital signal processor (DSP), and a control chip in the communication unit (for example, a baseband chip). )The combination.
  • the CPU may be a single operation core, and may also include multiple operation cores.
  • Communication unit 34 is used to establish a communication channel through which device 30 is connected to other devices.
  • the device 30 may specifically be a remote server.
  • the communication unit 34 may include a wired LAN module, a wireless local area network (wireless LAN) module, a Bluetooth module, a baseband module, and the like.
  • the communication module is used to control communication of components in the device 30 and can support Direct Memory Access.
  • the various communication modules in the communication unit 34 generally appear in the form of an integrated circuit chip, and can be selectively combined without including all communication modules and corresponding Physical cable, antenna group.
  • communication modules, such as baseband modules, in the communication unit 34 may be integrated into the processor unit 32, typically an APQ+MDM series platform such as that provided by Qualcomm.
  • the output unit 33 includes, but is not limited to, an image output unit and a sound output unit.
  • the image output unit is used to output text, pictures, and/or video.
  • the image output unit may include a display panel, such as an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), a field emission display (FED), or the like. Display panel.
  • the image output unit may comprise a reflective display, such as an electrophoretic display, or a display utilizing an Interferometric Modulation of Light.
  • the image output unit may comprise a single display or multiple displays of different sizes.
  • the touch panel used by the input unit 31 can also serve as the display panel of the output unit 33 at the same time.
  • the touch panel detects a touch or proximity gesture operation thereon, it is transmitted to the processor unit 32 to determine the type of the touch event, and then the processor unit 32 provides a corresponding on the display panel according to the type of the touch event.
  • Visual output Although in FIG. 13, the input unit 31 and the output unit 33 function as two independent components to implement the input and output functions of the device 30, in some embodiments, the touch panel and the display panel may be integrated into one. Input and output functions of device 30.
  • the image output unit can display various graphical user interfaces (GUIs) as virtual control components, including but not limited to windows, scroll axes, icons, and scrapbooks, for the user to touch. Take action.
  • GUIs graphical user interfaces
  • the image output unit includes a filter and an amplifier for filtering and amplifying the video output by the processor unit 32.
  • the audio output unit includes a digital to analog converter for converting the audio signal output by the processor unit 32 from a digital format to an analog format.
  • the storage unit 35 can be used to store software programs and modules, and the processor unit 32 executes various functional applications of the device 30 and implements data processing by running software programs and modules stored in the storage unit 35.
  • the storage unit 55 mainly includes a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, such as a sound playing program, an image playing program, and the like; and the data storage area may be stored according to the device 30. Use the created data (such as audio data, phone book, etc.).
  • the storage unit 35 may include a volatile memory, such as a non-volatile volatile random access memory (NVRAM), a phase change random access memory (PRAM), Magnetoresistive random access memory (MRAM), etc., may also include non-volatile memory, such as at least one disk storage device, Electronically Erasable Programmable Read-Only Memory (EEPROM) ), flash memory devices, such as NOR flash memory or NAND flash memory.
  • NVRAM non-volatile volatile random access memory
  • PRAM phase change random access memory
  • MRAM Magnetoresistive random access memory
  • EEPROM Electronically Erasable Programmable Read-Only Memory
  • flash memory devices such as NOR flash memory or NAND flash memory.
  • the non-volatile memory stores the operating system and applications executed by processor unit 32.
  • the processor unit 32 loads running programs and data from the non-volatile memory into memory and stores the digital content in a plurality of storage devices.
  • the operating system includes various components and/or drivers for controlling and managing conventional system tasks such as memory management, storage device control, power management, and the like, as well as facilitating communication between various hardware and software.
  • the operating system may be a Linux system, an iOS system developed by Apple Inc., or a Windows operating system developed by Microsoft Corporation, or an embedded operating system such as Vxworks.
  • the application includes any application installed on device 30, including but not limited to browsers, email, instant messaging services, word processing, keyboard virtualization, widgets, encryption, digital rights management, voice recognition, Voice copying, positioning (such as those provided by GPS), music playback, etc.
  • Power source 36 is used to power different components of device 30 to maintain its operation.
  • the power source 36 can be an external power source that directly supplies power to the device 30, such as an AC adapter, etc., and also includes a built-in battery, such as a conventional lithium ion battery, a nickel metal hydride battery, or the like.
  • the power supply 36 can be further defined, for example, a power management system, a charging system, a power failure detection circuit, a power converter or an inverter, and a power status indicator (such as a light emitting diode). And any other components associated with the power generation, management, and distribution of device 30.
  • the processor unit 32 is configured to: when the X event occurs, the state machine instance performs matching in the current matching period, where the state machine instance is used in a matching period.
  • the event that occurs is matched with the preset matching rule, and a matching result is obtained, and the matching result is a result of matching success or a result of matching failure;
  • the state machine instance detects whether the number of events that have occurred currently is greater than 1;
  • the time at which the X+1 event occurs is taken as the start time of the next matching period, and the matching is re-matched in the next matching period, where the The events are sequentially arranged in the order of chronological order from the first event to the X+1 event.
  • the processor unit 32 is further configured to delete the current event that has occurred and end the state machine instance if the number of events that have occurred currently is equal to one.
  • the processor unit 32 is further configured to delete the currently occurring event and end the state machine instance when a result of successful matching is obtained.
  • the result that the matching is not successful includes: the state machine instance does not obtain the matching result in the current matching period.
  • the result that the matching is not successful includes: the state machine instance obtaining the result of the matching failure in the current matching period.
  • the processor unit 32 is further configured to establish the state machine instance when the first event occurs.
  • the preset matching rule at least includes: the number of events that have occurred in the one matching period reaches a threshold, and/or has appeared in the one matching period.
  • the type of event matches the preset type.
  • the preset matching rule is: the type of the event that has occurred in the one matching period meets the preset type; the processor unit 32 is further used to detect the state machine instance. Whether the number of currently occurring events exceeds a preset value;
  • At least one of the events recorded by the state machine instance is deleted.
  • the state machine instance has an attribute list, where the attribute list stores information for performing matching, and when deleting an event that has occurred, the method further includes: removing the attribute list. The information corresponding to the deleted event is used to match.
  • An apparatus for processing an event when the X event occurs, the state machine instance performs matching in the current matching period, and when the result of the matching success is not obtained, if the state machine instance detects the currently occurring event If the number is greater than 1, the time when the X+1 event occurs is taken as the starting time of the next matching period, and the matching is re-matched in the next matching period.
  • the embodiment of the present invention can use the time when the next event occurs as the start time of the next matching period, and re-match in the next matching period, by repeating Performing the matching process enables all events in the sliding window to be matched by only one state machine instance.
  • the CEP system does not have to create a state machine instance for each event, only one state machine instance is needed to match, and the event omission in the complex scene is avoided, thereby reducing the creation of multiple The memory resources occupied by the state machine instance, which reduces the memory overhead of the CEP system when performing pattern matching in complex scenarios.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Multimedia (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种处理事件的方法及装置,涉及数据处理技术领域,能够减少CEP系统在复杂场景中进行模式匹配时的内存开销。该方法包括:当第X事件出现后,状态机实例在当前匹配周期中进行匹配(101);当未得到匹配成功的结果时,所述状态机实例检测当前已出现的事件数量是否大于1(102);若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配(103)。所述处理事件的方法及装置适用于运行了具有模式匹配功能的系统的设备。

Description

一种处理事件的方法及装置 技术领域
本发明涉及数据处理技术领域,尤其涉及一种处理事件的方法及装置。
背景技术
目前,大数据处理技术已被应用在很多领域,在需要实时分析的大数据处理场景中,常用的分析系统是CEP(Complex Event Processing,复杂事件处理)系统。模式匹配是CEP系统的重要的能力之一,主要用来在实时业务场景下根据具体事件来识别业务执行的最佳时机。在匹配的过程中,由滑动窗口或是分批窗口中的事件的状态机实例执行匹配,当窗口中出现一个事件后,CEP系统需要为出现的事件建立状态机实例,并且将新出现的事件通知给窗口中已有事件的状态机实例,以滑动窗口为例:匹配成功的判定条件为连续出现3个事件,这3个事件按照时间出现顺序为事件1,事件2和事件3,当事件3出现后,CEP系统建立事件3对应的状态机实例,并将事件3的出现分别通知给已建立的事件1的状态机实例和事件2的状态机实例,事件1的状态机实例执行匹配,并判定窗口中已出现的事件的数量为3个,匹配成功;若事件3出现后,滑动窗口发生滑动,事件1脱离了滑动窗口,则事件2的状态机实例执行匹配,并判定窗口中已出现的事件的数量不足3个,匹配失败。
由于实时业务场景的复杂程度日益增加,需要窗口的长度以便能够覆盖更多的事件,例如:使用CEP系统的模式匹配功能筛选出经常掉话的用户,在通话过程中,连续出现指定次数以上的掉话事件就判定匹配成功。由于实际应用中掉话事件的发生时间无法预知,可能分布在整个通话过程中的任意时刻,为了保证匹配过程能够覆盖通话过程中的掉话事件,就需要延长窗口的长度以提高窗口对于通话过程中掉话事件的覆盖率。但是窗口越长,可能覆盖到的事件也就越多,若在某一次匹配过程中,长窗口覆 盖到了大量事件,则CEP系统所需创建的对应于事件的状态机实例大大增多,而创建一个状态机实例需要占用一部分内存资源,CEP系统需要占用大量内存资源为长匹配窗口中的事件创建状态机实例,增加了CEP系统在复杂场景中进行模式匹配时的内存开销。
发明内容
本发明实施例提供一种处理事件的方法及装置,能够减少CEP系统在复杂场景中进行模式匹配时的内存开销。
为达到上述目的,本发明实施例采用如下技术方案:
第一方面,本发明实施例提供一种处理事件的方法,所述方法包括:
当第X事件出现后,状态机实例在当前匹配周期中进行匹配,其中,所述状态机实例用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果;
当未得到匹配成功的结果时,所述状态机实例检测当前已出现的事件数量是否大于1;
若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配,其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
结合第一方面,在第一方面的第一种可能的实现方式中,所述方法还包括:
若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束所述状态机实例。
结合第一方面,或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述方法还包括:
当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状 态机实例。
结合第一方面、第一方面的第一至第二种可能的实现方式中任意一项,在第一方面的第三种可能的实现方式中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果。
结合第一方面、第一方面的第一至第二种可能的实现方式中任意一项,在第一方面的第四种可能的实现方式中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
结合第一方面、第一方面的第一至第四种可能的实现方式中任意一项,在第一方面的第五种可能的实现方式中,所述方法还包括:当第1事件出现时建立所述状态机实例。
结合第一方面、第一方面的第一至第五种可能的实现方式中任意一项,在第一方面的第六种可能的实现方式中,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
结合第一方面的第六种可能的实现方式,在第一方面的第七种可能的实现方式中,所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;所述方法还包括:
所述状态机实例检测所述当前已出现的事件数量是否超过预设值;
若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
结合第一方面、第一方面的第一至第七种可能的实现方式中任意一项,在第一方面的第八种可能的实现方式中,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述方法还包括:移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
第二方面,本发明实施例提供一种处理事件的装置,所述装置包括:
处理模块,用于当第X事件出现后,在当前匹配周期中进行匹配,其中,所述处理模块,还用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果;
判断模块,用于当未得到匹配成功的结果时,检测当前已出现的事件数量是否大于1;
所述处理模块,还用于若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配,其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
结合第二方面,在第二方面的第一种可能的实现方式中,所述处理模块,还用于若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束状态机实例。
结合第二方面,或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述处理模块,还用于当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状态机实例。
结合第二方面、第二方面的第一至第二种可能的实现方式中任意一项,在第二方面的第三种可能的实现方式中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果。
结合第二方面、第二方面的第一至第二种可能的实现方式中任意一项,在第二方面的第四种可能的实现方式中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
结合第二方面、第二方面的第一至第四种可能的实现方式中任意一项,在第二方面的第五种可能的实现方式中,所述装置还包括:建立模块,用于当第1事件出现时建立所述状态机实例。
结合第二方面、第二方面的第一至第五种可能的实现方式中任意一项, 在第二方面的第六种可能的实现方式中,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
结合第二方面的第六种可能的实现方式,在第二方面的第七种可能的实现方式中,所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;所述装置还包括:
检测模块,用于检测所述当前已出现的事件数量是否超过预设值;
所述处理模块,还用于若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
结合第二方面、第二方面的第一至第七种可能的实现方式中任意一项,在第二方面的第八种可能的实现方式中,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述处理模块,还用于移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
本发明实施例提供的一种处理事件的方法及装置,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了 复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本发明实施例提供的一种具体应用场景的结构示意图;
图2为本发明实施例提供的一种处理事件的方法流程图;
图3为本发明实施例提供的另一种处理事件的方法流程图;
图4为本发明实施例提供的一种具体应用场景示意图;
图5为本发明实施例提供的另一种处理事件的方法流程图;
图6为本发明实施例提供的另一种具体应用场景的结构示意图;
图7为本发明实施例提供的另一种具体应用场景示意图;
图8为本发明实施例提供的另一种具体应用场景的结构示意图;
图9为本发明实施例提供的另一种具体应用场景示意图;
图10为本发明实施例提供的另一种处理事件的方法流程图;
图11为本发明实施例提供的另一种处理事件的方法流程图;
图12为本发明实施例提供的一种处理事件的装置的结构示意图;
图13为本发明实施例提供的一种处理事件的设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,“删除”在本领域技术人员之间也常被认为“消费”,即“删除一个事件”的含义应该与“消费一个事件”的含义相同。
本发明实施例具体可以实现在运行了具有模式匹配功能的系统的设备上,运行了具有模式匹配功能的系统的设备的具体类型并不限定,例如:运行了具有模式匹配功能的系统的设备可以包括输入单元、处理器单元、输出单元、通信单元、存储单元等组件。这些组件通过一条或多条总线进行通信。本领域技术人员可以理解,运行了具有模式匹配功能的系统的设备的结构并不构成对本发明的限定,它既可以是总线形结构,也可以是星型结构,还可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施方式中,运行了具有模式匹配功能的系统的设备可以是任何具备数据存储、处理、传输功能的设备,包括但不限于刀片式服务器、塔式服务器、机柜式服务器、移动工作站、个人电脑,以及上述两项或两项以上的组合等。
如图1所示,具有模式匹配功能的系统可以包括PostgreSQL(关系数据库管理服务器)定义、代数表达式编译器、模式优化、状态机实例编译、元数据分发服务、路由和状态机引擎,客户端通过对PostgreSQL定义,从而在PostgreSQL的策略类别中增加关键字支持(SLIDING DISMATCH),并从模式匹配语法中识别该关键字;通过代数表达式编译器将策略类别设置到代数表达式的属性中;经过模式优化之后或直接根据策略,以及代数表达 式中的策略由状态机实例编译;元数据分发服务将编译结果分发至路由和状态机引擎,其中,状态机引擎模块主要用于管理基本的状态机的运行;当事件输入之后,通过路由转存再经过状态机引擎输出事件至业务系统。
例如:用户通过客户端对需要识别的业务模式进行定义,PostgreSQL定义、代数表达式编译器、模式优化和状态机实例编译将用户定义的业务模式编译为状态机实例元数据,并由元数据分发服务部署到路由和状态机引擎模块上,在运行过程中,路由接收到输入事件再发送至状态机引擎模块,将事件分发给与事件对应的状态机实例,在状态机实例中实时判断是否满足用户定义的业务模式,若满足则输出新的事件给第三方的业务系统。其中,具体的编译过程至少包括以下流程:
通过在PostgreSQL的策略类别中增加关键字支持来增强PostgreSQL;经过解析转换之后,从模式匹配语法中识别关键字;经过再一次转换之后,将策略类别设置到代数表达式的属性中;之后经过编译,使状态机实例根据策略以及代数表达式中的策略执行匹配窗口滑动。需要说明的是,对于不同的策略,需要通过不同的状态机实例来实现。
本发明实施例提供一种处理事件的方法,如图2所示,可以包括:
101、当第X事件出现后,状态机实例在当前匹配周期中进行匹配。
其中,所述状态机实例用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果。
在本实施例中,具有模式匹配功能的系统的设备开始执行匹配过程的触发条件可以有多种,比如在基于时间的应用场景中,当达到指定时刻建立对应于基于时间的匹配窗口的状态机实例,并开始执行匹配过程;再比如在基于事件的应用场景中,当第一个事件出现时建立对应于基于事件的匹配窗口的状态机实例,并开始执行匹配过程。当每一个事件出现时,在具有模式匹配功能的系统的设备上运行的状态机实例记录出现的事件,并 将出现的事件的相关信息记录在状态机实例中,例如:具有模式匹配功能的系统的设备上运行的状态机实例将出现的事件的类型记录在属性列表中。在状态机实例中设置有计数器,用于统计已出现的事件的数量,当新的一个事件出现后计数器的数量加1。
匹配周期作为匹配过程中的对时间周期的限定,当达到匹配周期,则认为匹配过程的时间已达到限定的时间周期。需要说明的是,匹配周期可以在设计业务的时候设定,并将所设定的匹配周期的具体数值作为与业务有关的信息,在状态机实例建立时读取,并作为触发状态机实例执行检测过程的触发条件之一,例如在102中,触发状态机实例执行检测过程的触发条件为未得到匹配成功的结果。
102、当未得到匹配成功的结果时,所述状态机实例检测当前已出现的事件数量是否大于1。
在本次匹配过程开始后出现的第一个事件出现的时刻作为匹配周期的起始时刻来检测在匹配周期内,窗口中的事件是否匹配成功。需要说明的是,当匹配窗口中的事件满足预设的匹配规则时,则认为匹配成功。在本发明实施例中,并不限定具体的匹配规则,匹配规则可以根据不同的业务需求进行预先设定,例如:预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
103、若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配。
其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
例如:用户开始打电话,打电话的总时长为30分钟,在30分钟内总共出现了3次掉话事件,分别出现在第10分钟、第11分钟和第15分钟,则出现在第10分钟的掉话事件可以称为当前已出现的事件,出现在第11分钟的掉 话事件可以称为第X+1事件。需要说明的是,当滑动后的匹配窗口中已出现的事件和预设的匹配规则进行匹配时的匹配周期,可以与滑动前的匹配窗口中已出现的事件和预设的匹配规则进行匹配时的匹配周期相同,或者根据业务场景的需求针对滑动后的匹配窗口中已出现的事件和预设的匹配规则在匹配过程中重新设定下一匹配周期。比如:业务场景为在任意一个5分钟窗口内满足预设的匹配规则就将掉话事件上报,其中,为了避免频繁上报掉话事件,因此将匹配规则设置为在5分钟窗口内出现3次或3次以上掉话事件则上报。在窗口中已出现的事件和预设的匹配规则进行匹配时,即匹配过程开始之后,将第一个掉话事件出现的时刻作为匹配周期的起始时刻,检测在匹配周期内5分钟窗口中的掉话事件是否出现3次或3次以上,若5分钟窗口中的掉话事件仅出现1次、2次,或未出现掉话事件,则将该5分钟窗口滑动到第二个掉话事件,并将第二个掉话事件出现的时刻作为下一匹配周期的起始时刻,对滑动后的5分钟窗口重新进行匹配。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减 少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例中,在如图2所示的实现方式的基础上,还可以实现为如图3所示的实现方式:
104、若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束所述状态机实例。
若当前已出现的事件满足相应的匹配规则,则认为匹配周期中的已出现的事件和预设的匹配规则进行匹配,并得到匹配成功的结果,删除匹配周期内的匹配窗口中出现的全部事件并结束匹配窗口对应的状态机实例,当出现新的事件或重新开始一个新的匹配窗口中的事件和预设的匹配规则进行匹配时,再创建新的匹配窗口和对应新的匹配窗口的状态机实例。
例如:如图4所示,预设的匹配规则为出现2次或2次以上事件,在匹配周期内,窗口1中出现1个事件,则窗口1不满足预设的匹配规则,未完成匹配;窗口2中出现3个事件,则窗口2满足预设的匹配规则,删除窗口2中出现的全部事件,即事件1、事件2和事件3,并结束窗口2对应的状态机实例。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配;若当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束所述状态机实例。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一 个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例中,在如图2或图3所示的实现方式的基础上,还可以实现为如图5所示的实现方式:
105、当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状态机实例。
当未得到匹配成功的结果时,执行上述102。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配;当得到匹配成功的结果时,删除当前已出现的事件并结束所述状态机实例。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果。
例如:如图6所示,基于事件的匹配窗口滑动在状态机实例中的实现流 程具体如下:
当事件发生之后,将初始化事件数量,即当前事件数量为1,判断匹配周期内的匹配窗口中的事件和预设的匹配规则进行匹配是否得到匹配成功的结果,若匹配成功,则删除当前已出现的事件并结束状态机实例,若匹配失败,则在重置状态机实例之后进入等待状态;当达到匹配周期,则状态机实例检测事件数量,若事件数量等于1,则删除事件并结束状态机实例,若事件数量大于1,则重置状态机实例并进入等待状态,同时将下一个发生的事件的起始时刻作为下一匹配周期的起始时刻,再进行事件迭代,即当前事件数量值增加1,之后再进行匹配。
需要说明的是,状态机实例重置是指将状态机中的状态性的参数进行重置,其中,状态性的参数可以是当匹配窗口中出现事件之后,状态机执行如图6所示流程这一过程中所产生的参数,状态机实例中存在的属性列表不需要进行重置。
例如:如图7所示,若窗口中的事件和预设的匹配规则进行匹配,得到匹配失败的结果,且达到匹配周期,删除窗口中出现的时刻最早的事件,即事件1,且窗口滑动到下一个事件,即事件2。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当状态机实例在当前匹配周期中没有得到匹配结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的 过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
例如:如图8所示,基于时间的匹配窗口滑动在状态机实例中的实现流程具体如下:
当事件发生之后,将初始化事件数量,即当前事件数量为1,当达到匹配周期,判断匹配窗口中的事件和预设的匹配规则进行匹配是否得到匹配成功的结果,若匹配成功,则删除当前已出现的事件并结束状态机实例;若匹配失败,则状态机实例检测事件数量,若事件数量等于1,则删除事件并结束状态机实例,若事件数量大于1,则重置状态机实例并进入等待状态,同时将下一个发生的事件的起始时刻作为下一匹配周期的起始时刻,再进行事件迭代,即当前事件数量加1。
再例如:如图9所示,预设的匹配规则为出现3次或3次以上超时事件,在匹配周期内,窗口中出现2个事件,则窗口不满足匹配规则,匹配失败,将窗口滑动到第2个事件,即事件2,并以事件2出现的时刻作为匹配周期的起始时刻。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当状态机实例在当前匹配周期中得到匹配失败的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并 在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例中,在如图2或图3所示的实现方式的基础上,还可以实现为如图10所示的实现方式:
106、当第1事件出现时建立所述状态机实例。
需要说明的是,当第X事件为第1事件时,先建立状态机实例,再通过建立的状态机在各个匹配周期中执行匹配过程。
本发明实施例提供的一种处理事件的方法,当第1事件出现时建立所述状态机实例,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例可以在第1事件出现时建立所述状态机实例,并在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事 件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
在本发明实施例中,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
本发明实施例中,当预设的匹配规则不需要用到和事件数量相关的参数时,可以在当前已出现的事件数量超过预设值时,且保证状态机实例中存在至少一个事件的情况下,删除状态机实例中的事件,例如:所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;在如图10所示的实现方式的基础上,还包括如图11所示的实现方式:
107、所述状态机实例检测所述当前已出现的事件数量是否超过预设值。
108、若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
若当前已出现的事件数量超过预设值,可以删除状态机实例记录的事件中最早的一个事件,即事件中第一个发生的事件,并将状态机实例的执行事件的数量减1,将匹配周期的起始时刻从第一个事件发生的起始时刻修改为第二个事件发生的起始时刻,并将匹配窗口中存在的事件数量值增加1;或者,删除状态机实例记录的事件中的任意一个或多个事件,且在删除任意一个或多个事件之后,状态机实例中至少还包括一个事件。需要说明的是,当预设的匹配规则为在一个匹配周期中已出现的事件的类型符合预设类型时,由于事件的数量不会影响判定事件的类型是否符合预设类型的匹配结果,因此可以删除状态机实例记录的至少一个事件。
109、若所述当前已出现的事件数量未超过预设值,则所述状态机实例不对记录的事件做删除处理。
需要说明的是,用户可以根据当前业务需求预先设定匹配周期内的匹配窗口中所能容纳的事件数量,即根据当前业务需求预先设定的当前已出现的事件数量的预设值,在匹配周期内的匹配窗口中的事件和预设的匹配规则进行匹配过程时,当前已出现的事件数量超过预设值,则删除状态机实例记录的事件,比如:事件数量的预设值为2,当前已出现的事件数量大于2,则可以删除状态机实例记录的事件中最早的事件,即第一个出现在状态机实例记录的事件。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配;当预设的匹配规则不需要用到和事件数量相关的参数时,可以在当前已出现的事件数量超过预设值时,且保证状态机实例中存在至少一个事件的情况下,删除状态机实例中的事件。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源;当预设的匹配规则不需要用到和事件数量相关的参数时,可以在当前已出现的事件数量超过预设值时,且保证状态机实例中存在至少一个事件的情况下,删除状态机实例中的事件,减少了事件占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内 存开销。
本发明实施例中,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述方法还包括:移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
需要说明的是,属性列表中最早的一个事件对应了属性列表中的最后一个属性,在删除了事件中最早的一个事件且对状态机实例的执行事件数量减1的操作的同时,移除属性列表中最后一个属性。
本发明实施例提供的一种处理事件的方法,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,此外,在删除已出现的事件时,可以移除属性列表中被删除的事件对应的用于进行匹配的信息。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源;在删除已出现的事件时,可以移除属性列表中被删除的事件对应的用于进行匹配的信息,减少了属性列表所占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例提供一种处理事件的装置20,如图12所示,所述装置20可以包括:
处理模块21,用于当第X事件出现后,在当前匹配周期中进行匹配,其中,所述处理模块21,还用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果。
判断模块22,用于当未得到匹配成功的结果时,检测当前已出现的事件数量是否大于1。
所述处理模块21,还用于若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配,其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
在本发明实施例中,所述处理模块21,还用于若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束状态机实例。
在本发明实施例中,所述处理模块21,还用于当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状态机实例。
在本发明实施例中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果。
在本发明实施例中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
在本发明实施例中,所述装置20还包括:建立模块23,用于当第1事件出现时建立所述状态机实例。
在本发明实施例中,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
在本发明实施例中,所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;所述装置20还包括:
检测模块24,用于检测所述当前已出现的事件数量是否超过预设值。
所述处理模块21,还用于若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
在本发明实施例中,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述处理模块21,还用于移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
本发明实施例提供的一种处理事件的装置,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本发明实施例提供一种处理事件的设备30,所述设备30可以用于运行了具有模式匹配功能的系统的设备;如图13所示,为所述设备30的一种可能的具体实施方式,包括输入单元31、处理器单元32、输出单元33、通信单元34、存储单元35等组件。这些组件通过一条或多条总线进行通信。本领域技术人员可以理解,图中示出的设备30的结构并不构成对本发明的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施 方式中,所述设备30可以是任何具备数据存储、处理、传输功能的设备,包括但不限于刀片式服务器、塔式服务器、机柜式服务器、移动工作站、个人电脑,以及上述两项或两项以上的组合等。
其中,输入单元31用于实现操作人员与设备30的交互和/或信息输入到设备30中。例如,输入单元31可以接收操作人员输入的数字或字符信息,以产生与操作人员或功能控制有关的信号输入。在本发明具体实施方式中,输入单元31可以是触控面板,也可以是其他人机交互界面,例如实体输入键。在本发明的其他实施方式中,输入单元31所采用的实体输入键可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
处理器单元32为设备30的控制中心,利用各种接口和线路连接整个设备30的各个部分,通过运行或执行存储在存储单元35内的软件程序和/或模块,以及调用存储在存储单元35内的数据,以执行设备30的各种功能和/或处理数据。所述处理器单元32可以由集成电路(Integrated Circuit,IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器单元32可以仅包括中央处理器(Central Processing Unit,CPU),也可以是GPU、数字信号处理器(Digital Signal Processor,DSP)、及通信单元中的控制芯片(例如基带芯片)的组合。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。
通信单元34用于建立通信信道,使设备30通过所述通信信道以连接至其他设备。其中,设备30具体可以是远程服务器。所述通信单元34可以包括有线局域网模块、无线局域网(Wireless Local Area Network,wireless LAN)模块、蓝牙模块、基带(Base Band)模块等通信模块。所述通信模块用于控制设备30中的各组件的通信,并且可以支持直接内存存取(Direct Memory Access)。
在本发明的不同实施方式中,所述通信单元34中的各种通信模块一般以集成电路芯片(Integrated Circuit Chip)的形式出现,并可进行选择性组合,而不必包括所有通信模块及对应的物理线缆、天线组。在本发明的一些可选实施方式中,所述通信单元34中的通信模块,例如基带模块可以集成到处理器单元32中,典型的如高通(Qualcomm)公司提供的APQ+MDM系列平台。
输出单元33包括但不限于影像输出单元和声音输出单元。影像输出单元用于输出文字、图片和/或视频。所述影像输出单元可包括显示面板,例如采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)、场发射显示器(field emission display,FED)等形式来配置的显示面板。或者所述影像输出单元可以包括反射式显示器,例如电泳式(electrophoretic)显示器,或利用光干涉调变技术(Interferometric Modulation of Light)的显示器。所述影像输出单元可以包括单个显示器或不同尺寸的多个显示器。在本发明的具体实施方式中,上述输入单元31所采用的触控面板亦可同时作为输出单元33的显示面板。例如,当触控面板检测到在其上的触摸或接近的手势操作后,传送给处理器单元32以确定触摸事件的类型,随后处理器单元32根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图13中,输入单元31与输出单元33是作为两个独立的部件来实现设备30的输入和输出功能,但是在某些实施例中,可以将触控面板与显示面板集成一体而实现设备30的输入和输出功能。例如,所述影像输出单元可以显示各种图形化用户接口(Graphical User Interface,GUI)以作为虚拟控制组件,包括但不限于窗口、卷动轴、图标及剪贴簿,以供用户通过触控方式进行操作。在本发明具体实施方式中,影像输出单元包括滤波器及放大器,用来将处理器单元32所输出的视频滤波及放大。音频输出单元包括数字模拟转换器,用来将处理器单元32所输出的音频信号从数字格式转换为模拟格式。
存储单元35可用于存储软件程序以及模块,处理器单元32通过运行存储在存储单元35的软件程序以及模块,从而执行设备30的各种功能应用以及实现数据处理。存储单元55主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序,比如声音播放程序、图像播放程序等;数据存储区可存储根据设备30的使用所创建的数据(比如音频数据、电话本等)等。在本发明具体实施方式中,存储单元35可以包括易失性存储器,例如非挥发性动态随机存取内存(Nonvolatile Random Access Memory,NVRAM)、相变化随机存取内存(Phase Change RAM,PRAM)、磁阻式随机存取内存(Magetoresistive RAM,MRAM)等,还可以包括非易失性存储器,例如至少一个磁盘存储器件、电子可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、闪存器件,例如反或闪存(NOR flash memory)或是反及闪存(NAND flash memory)。非易失存储器储存处理器单元32所执行的操作系统及应用程序。所述处理器单元32从所述非易失存储器加载运行程序与数据到内存并将数字内容储存于大量储存装置中。所述操作系统包括用于控制和管理常规系统任务,例如内存管理、存储设备控制、电源管理等,以及有助于各种软硬件之间通信的各种组件和/或驱动器。在本发明实施方式中,所述操作系统可以是Linux系统、Apple公司开发的iOS系统或Microsoft公司开发的Windows操作系统等,或者是Vxworks这类的嵌入式操作系统。所述应用程序包括安装在设备30上的任何应用,包括但不限于浏览器、电子邮件、即时消息服务、文字处理、键盘虚拟、窗口小部件(Widget)、加密、数字版权管理、语音识别、语音复制、定位(例如由全球定位系统提供的功能)、音乐播放等。
电源36用于给设备30的不同部件进行供电以维持其运行。作为一般性理解,所述电源36可以是直接向设备30供电的外接电源,例如AC适配器等,也包括内置的电池,例如常见的锂离子电池、镍氢电池等。在本发明的一 些实施方式中,所述电源36还可以作更为广泛的定义,例如还可以包括电源管理系统、充电系统、电源故障检测电路、电源转换器或逆变器、电源状态指示器(如发光二极管),以及与设备30的电能生成、管理及分布相关联的其他任何组件。
在本发明实施例中,所述处理器单元32,用于当第X事件出现后,状态机实例在当前匹配周期中进行匹配,其中,所述状态机实例用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果;
当未得到匹配成功的结果时,所述状态机实例检测当前已出现的事件数量是否大于1;
若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配,其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
在本发明实施例中,所述处理器单元32,还用于若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束所述状态机实例。
在本发明实施例中,所述处理器单元32,还用于当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状态机实例。
在本发明实施例中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果。
在本发明实施例中,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
在本发明实施例中,所述处理器单元32,还用于当第1事件出现时建立所述状态机实例。
在本发明实施例中,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现 的事件的类型符合预设类型。
在本发明实施例中,所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;所述处理器单元32,还用于所述状态机实例检测所述当前已出现的事件数量是否超过预设值;
若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
在本发明实施例中,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述方法还包括:移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
本发明实施例提供的一种处理事件的设备,当第X事件出现后,状态机实例在当前匹配周期中进行匹配,当未得到匹配成功的结果时,若状态机实例检测当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配。相比较于现有技术,本发明实施例在状态机实例进行匹配的过程中,能够以后一个事件出现的时刻作为下一匹配周期的起始时刻,并在下一匹配周期中重新进行匹配,通过重复执行匹配过程,实现了只通过一个状态机实例就能够对滑动窗口中所有的事件进行匹配。并且由于每一个匹配周期的起始时刻都是各个事件的起始时刻,使得滑动窗口基于各个已出现的事件的起始时刻进行滑动,避免了在复杂场景中滑动窗口在滑动的过程中遗漏事件的问题。从而在复杂场景中进行模式匹配时,CEP系统不必为每一个事件创建一个状态机实例,仅需要一个状态机实例就可以进行匹配,并且避免了复杂场景中的事件遗漏,减少了因创建多个状态机实例而占用的内存资源,从而减少了CEP系统在复杂场景中进行模式匹配时的内存开销。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备实施例而言,由于其基本相似于方法实施例, 所以描述得比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。

Claims (16)

  1. 一种处理事件的方法,其特征在于,所述方法包括:
    当第X事件出现后,状态机实例在当前匹配周期中进行匹配,其中,所述状态机实例用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果;
    当未得到匹配成功的结果时,所述状态机实例检测当前已出现的事件数量是否大于1;
    若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配,其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束所述状态机实例。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状态机实例。
  4. 根据权利要求1至3中任意一项所述的方法,其特征在于,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果或者所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
  5. 根据权利要求1至4中任意一项所述的方法,其特征在于,所述方法还包括:当第1事件出现时建立所述状态机实例。
  6. 根据权利要求1至5中任意一项所述的方法,其特征在于,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈 值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
  7. 根据权利要求6所述的方法,其特征在于,所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;所述方法还包括:
    所述状态机实例检测所述当前已出现的事件数量是否超过预设值;
    若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
  8. 根据权利要求1至7中任意一项所述的方法,其特征在于,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述方法还包括:移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
  9. 一种处理事件的装置,其特征在于,所述装置包括:
    处理模块,用于当第X事件出现后,在当前匹配周期中进行匹配,其中,所述处理模块,还用于在一个匹配周期中将已出现的事件和预设的匹配规则进行匹配,并得到匹配结果,所述匹配结果为匹配成功的结果或者匹配失败的结果;
    判断模块,用于当未得到匹配成功的结果时,检测当前已出现的事件数量是否大于1;
    所述处理模块,还用于若所述当前已出现的事件数量大于1,则以第X+1事件出现的时刻作为下一匹配周期的起始时刻,并在所述下一匹配周期中重新进行匹配,其中,已出现的事件按照出现的时间先后顺序依次排列为第1事件至所述第X+1事件。
  10. 根据权利要求9所述的装置,其特征在于,所述处理模块,还用于若所述当前已出现的事件数量等于1,则删除当前已出现的这一个事件并结束状态机实例。
  11. 根据权利要求9或10所述的装置,其特征在于,所述处理模块,还 用于当得到匹配成功的结果时,删除所述当前已出现的事件并结束所述状态机实例。
  12. 根据权利要求9至11中任意一项所述的装置,其特征在于,所述未得到匹配成功的结果,包括:所述状态机实例在所述当前匹配周期中没有得到所述匹配结果或者所述状态机实例在所述当前匹配周期中得到所述匹配失败的结果。
  13. 根据权利要求9至12中任意一项所述的装置,其特征在于,所述装置还包括:建立模块,用于当第1事件出现时建立所述状态机实例。
  14. 根据权利要求9至13中任意一项所述的装置,其特征在于,所述预设的匹配规则至少包括:在所述一个匹配周期中已出现的事件的数量达到阈值,和/或在所述一个匹配周期中已出现的事件的类型符合预设类型。
  15. 根据权利要求14所述的装置,其特征在于,所述预设的匹配规则为:在所述一个匹配周期中已出现的事件的类型符合预设类型;所述装置还包括:
    检测模块,用于检测所述当前已出现的事件数量是否超过预设值;
    所述处理模块,还用于若所述当前已出现的事件数量超过预设值,则删除所述状态机实例记录的事件中的至少一项。
  16. 根据权利要求9至15中任意一项所述的装置,其特征在于,所述状态机实例中存在属性列表,所述属性列表中存储用于进行匹配的信息,在删除已出现的事件时,所述处理模块,还用于移除所述属性列表中被删除的事件对应的用于进行匹配的信息。
PCT/CN2015/084477 2015-02-11 2015-07-20 一种处理事件的方法及装置 WO2016127577A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15881737.9A EP3121715B1 (en) 2015-02-11 2015-07-20 Event processing method and apparatus
US15/336,194 US9658903B2 (en) 2015-02-11 2016-10-27 Event processing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510073491.7 2015-02-11
CN201510073491.7A CN105988863B (zh) 2015-02-11 2015-02-11 一种处理事件的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/336,194 Continuation US9658903B2 (en) 2015-02-11 2016-10-27 Event processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2016127577A1 true WO2016127577A1 (zh) 2016-08-18

Family

ID=56614120

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/084477 WO2016127577A1 (zh) 2015-02-11 2015-07-20 一种处理事件的方法及装置

Country Status (4)

Country Link
US (1) US9658903B2 (zh)
EP (1) EP3121715B1 (zh)
CN (1) CN105988863B (zh)
WO (1) WO2016127577A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628884B (zh) * 2017-03-20 2022-03-25 华为技术有限公司 一种复杂事件处理方法、系统及其装置
US11693862B2 (en) 2018-10-29 2023-07-04 Technion Research & Development Foundation Limited Efficient adaptive detection of complex event patterns
US20210103577A1 (en) * 2019-10-07 2021-04-08 Microsoft Technology Licensing, Llc Reliable detection of deleted assets in data stores
CN113297888B (zh) * 2020-09-18 2024-06-07 阿里巴巴集团控股有限公司 一种图像内容检测结果核查方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214187A (zh) * 2010-04-12 2011-10-12 阿里巴巴集团控股有限公司 复合事件处理方法及装置
CN103455611A (zh) * 2013-09-06 2013-12-18 北京邮电大学 Rfid中间件的数据处理方法
US20140047448A1 (en) * 2012-08-10 2014-02-13 Honeywell International Inc. Systems and methods for limiting user customization of task workflow in a condition based health maintenance system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7403866B2 (en) * 2004-10-06 2008-07-22 Telefonaktiebolaget L M Ericsson (Publ) High-resolution, timer-efficient sliding window
US20060274703A1 (en) * 2005-06-07 2006-12-07 Connelly Stephen P Method and apparatus of filtering and viewing real-time detail records based upon user specific criteria
US7945540B2 (en) * 2007-05-04 2011-05-17 Oracle International Corporation Method to create a partition-by time/tuple-based window in an event processing service
US9307038B2 (en) * 2009-12-29 2016-04-05 Motorola Solutions, Inc. Method for presence notification based on a sequence of events
US20110202999A1 (en) * 2010-02-12 2011-08-18 Research In Motion Limited System and method for controlling event entries
US20120030194A1 (en) * 2010-07-29 2012-02-02 Research In Motion Limited Identification and scheduling of events on a communication device
CN102467414B (zh) * 2010-11-19 2015-03-18 阿里巴巴集团控股有限公司 一种状态机控制方法、装置及状态机系统
US9864837B2 (en) * 2013-02-28 2018-01-09 Accenture Global Services Limited Clinical quality analytics system with recursive, time sensitive event-based protocol matching
CN104199889A (zh) * 2014-08-25 2014-12-10 山东瀚天信息技术有限公司 基于CEP技术的RTLogic大数据处理系统及方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214187A (zh) * 2010-04-12 2011-10-12 阿里巴巴集团控股有限公司 复合事件处理方法及装置
US20140047448A1 (en) * 2012-08-10 2014-02-13 Honeywell International Inc. Systems and methods for limiting user customization of task workflow in a condition based health maintenance system
CN103455611A (zh) * 2013-09-06 2013-12-18 北京邮电大学 Rfid中间件的数据处理方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3121715A4 *

Also Published As

Publication number Publication date
US9658903B2 (en) 2017-05-23
US20170046209A1 (en) 2017-02-16
EP3121715A1 (en) 2017-01-25
EP3121715A4 (en) 2017-05-17
CN105988863B (zh) 2019-06-21
CN105988863A (zh) 2016-10-05
EP3121715B1 (en) 2019-01-30

Similar Documents

Publication Publication Date Title
TWI718155B (zh) 應用程式控制方法、應用程式跳轉關聯配置方法及裝置
US11093715B2 (en) Method and system for learning and enabling commands via user demonstration
US20180275985A1 (en) Workflow generation and editing
US8078628B2 (en) Streaming faceted search
JP2013537340A (ja) ポータブルコンピューティングデバイスのリソースを管理するためのシステムおよび方法
US8601484B2 (en) System and method for managing resources and markers of a portable computing device
US20130067074A1 (en) Flow topology of computer transactions
US20130117319A1 (en) Objects in a storage environment for connected applications
JP5864754B2 (ja) ポータブルコンピューティングデバイスのリソースを管理するためのシステムおよび方法
WO2016127577A1 (zh) 一种处理事件的方法及装置
US9875137B2 (en) Intelligent application back stack management
US10509641B2 (en) Optimizing feature deployment based on usage pattern
CN106528156B (zh) 一种页面数据处理方法和装置
CN110908793A (zh) 长时任务执行方法、装置、设备及可读存储介质
US20090328043A1 (en) Infrastructure of data summarization including light programs and helper steps
CN112506854A (zh) 页面模板文件的存储和页面生成方法、装置、设备及介质
US20220318319A1 (en) Focus Events
CN104834715A (zh) 一种基于部件和容器的网站生成方法及系统
WO2024037132A1 (zh) 工作流处理方法、装置、设备、存储介质和程序产品
EP2975516B1 (en) Intelligent application back stack management
WO2013179468A1 (ja) 運用プロセス作成プログラム、運用プロセス作成方法、及び情報処理装置
CN104808985B (zh) 应用程序中对象的管理方法及装置
WO2017050162A1 (zh) 内容输入方法及装置
CN112578966B (zh) 应用程序切换方法、装置及电子设备
TWI694340B (zh) 內容輸入方法及裝置

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

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2015881737

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2015881737

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE