Event rule processing method and apparatus and event processing method and apparatus
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional event buses in serverless function computing are inadequate for processing complex event filtering rules, particularly in IoT scenarios, due to limited filtering rules, lack of custom rule configuration, and inefficiencies in handling duration or repeatability conditions.
Innovation Solution
A programmed event rule expression and plugin manner are introduced to support custom extension rules, including duration or repetitive function conditions, allowing for more complex event filtering scenarios by matching events with rules that include timing or count conditions, and storing these rules in a map structure for efficient management.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conventional event bus filtering rules are used, then simple event filtering is supported, but complex event filtering scenarios (such as IoT scenarios with duration or repeatability conditions) cannot be met
Solution Approach 1:
The event matching rule is designed to be dynamic and configurable, allowing users to define custom filtering conditions including duration and repeatability. The rule structure supports flexible configuration where conditions, comparison operators, and thresholds can be dynamically adjusted to meet different filtering scenarios without requiring system redesign.
Solution Approach 2:
The event matching rule is segmented into distinct components: event type conditions, duration conditions, repeatability conditions, and action configurations. This segmentation allows each component to be independently configured and managed, enabling complex filtering logic to be built from modular elements that can be combined flexibly.
2Ease of operation
If fixed filtering rules are implemented in event bus, then implementation is simple, but custom rule configuration by users is not supported
Solution Approach 1:
The event matching rule structure is designed with universal applicability, supporting multiple filtering scenarios through a unified configuration framework. The same rule structure can handle simple filtering, duration-based filtering, repeatability-based filtering, and complex combinations thereof, eliminating the need for separate systems for different filtering needs.
Solution Approach 2:
Users are empowered to self-configure event matching rules according to their specific needs. The system provides a configurable interface where users can define their own filtering conditions, comparison operators, thresholds, and actions without requiring system administrator intervention or complex programming, enabling end-users to adapt the system to their requirements.
3Reliability
If conventional event bus is used, then basic event filtering is achieved, but duration or repeatability function conditions cannot be processed
Solution Approach 1:
The system performs preliminary evaluation of event conditions before triggering actions. Duration and repeatability conditions are pre-configured with thresholds and time windows, allowing the system to pre-assess whether incoming events meet the specified criteria before executing filtering logic, thereby ensuring reliable and accurate event filtering.
Solution Approach 2:
The event matching rule acts as an intermediary layer between event sources and event destinations. It mediates the event filtering process by introducing configurable conditions, comparison logic, and decision thresholds that enable sophisticated filtering (including duration and repeatability) without requiring complex changes to the underlying event bus architecture.
4Adaptability or versatility
If comprehensive event filtering rules are implemented, then complex scenarios are supported, but processing overhead increases
Solution Approach 1:
The filtering logic is segmented into discrete, independently evaluable conditions. Each condition (event type, duration, repeatability) can be evaluated separately and combined using logical operators. This segmentation enables the system to process complex filtering rules by breaking them down into manageable evaluation steps, improving processing efficiency through structured condition assessment.
Data Source
AI summary
An event processing method is provided, applied to filtering of events in a server. The method includes: matching a to-be-filtered event with an event matching rule, where the event matching rule is used for performing filtering to obtain an event that meets one or more first conditions and one or more second conditions, and the second condition indicates duration or repeatability of the one or more first conditions; and sending an instruction to a destination address when the to-be-filtered event meets the event matching rule. The event processing method provided in this application supports condition rule configuration of duration or repeatability, for example, a timing rule or a count rule.


