An event aggregation processing method, system, electronic device, and storage medium.

By identifying event types, recalling candidate rules, extracting target event fields, and performing hit judgments, aggregated event packages are generated for batch processing. This solves the problem of duplicate event processing in Internet businesses and improves the system's processing efficiency and data consistency.

CN123115162APending Publication Date: 2026-11-17GUANGZHOU YIJU FUTURE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611321905.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In real-time operation scenarios of internet businesses, the same event may be processed repeatedly due to the large number of candidate rules, resulting in a decrease in system resource utilization and overall processing efficiency.

Method used

By identifying event types and recalling candidate rule sets, the target event field is extracted, a hit judgment is made based on the target event field, the initial hit rule is determined, and batch event processing operations are performed to generate aggregated event packages for merging calculations and status updates, thus avoiding duplicate processing.

Benefits of technology

This reduces redundant processing, queries, and writes, improving the overall processing efficiency and data consistency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115162A_ABST
    Figure CN123115162A_ABST
Patent Text Reader

Abstract

This invention discloses an event aggregation processing method, system, electronic device, and storage medium. The method includes, upon obtaining original event information, identifying the event type of the original event information and recalling a set of candidate rules from a pre-configured rule set based on the event type; extracting the target event field corresponding to the union of the required fields of each candidate rule from the original event information based on the union of the required fields of each candidate rule; determining the initial hit rule based on the target event field and performing a hit judgment on each candidate rule; and performing batch event processing operations based on the original event information, the target event field, and each initial hit rule, and outputting the event processing results. This application improves the overall processing efficiency of the system by prioritizing the hit judgment of candidate rules and performing batch operations based on the same target event field and original event information, combined with multiple initial hit rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an event aggregation processing method, system, electronic device, and storage medium. Background Technology

[0002] In real-time operation scenarios of internet businesses, systems typically need to determine whether task conditions are met in real time based on user behavior events, recharge events, or device-reported events. As business complexity increases, a single event often needs to be evaluated across multiple activities and statistical dimensions simultaneously, placing higher demands on the throughput and computational efficiency of real-time processing systems.

[0003] When there are many candidate rules, the same event will be processed repeatedly, resulting in a decrease in the overall processing efficiency of the system. Summary of the Invention

[0004] This invention provides an event aggregation processing method, system, device, and medium, which solves the technical problem that when there are many candidate rules, the same event will be processed repeatedly, resulting in a decrease in the system's resource utilization and overall processing efficiency.

[0005] The first aspect of this invention provides an event aggregation processing method, comprising:

[0006] Upon obtaining the original event information, the event type of the original event information is identified, and a candidate rule set is recalled from the pre-configured rule set according to the event type; the candidate rule set includes at least one candidate rule.

[0007] Based on the union of the required fields of each candidate rule, extract the target event field corresponding to the union of the required fields from the original event information;

[0008] Based on the target event field, a hit judgment is made on each of the candidate rules to determine the initial hit rule;

[0009] Based on the original event information, the target event field, and each of the initial hit rules, perform batch event processing operations and output the event processing results.

[0010] Optionally, the step of determining the initial hit rule by judging the hit rate of each candidate rule based on the target event field includes:

[0011] Iterate through each condition field in the pending rules and check whether there is a common field associated with a reusable matching result; the pending rules are any one of the candidate rules, and the reusable matching result is generated after the common field is first matched with conditions;

[0012] If it exists, the reusable matching result associated with the public field is determined as the condition matching result of the same condition field as the public field;

[0013] Iterate through the non-public fields except for the public fields, and select the corresponding field values ​​in the target event field for condition matching to obtain the condition matching result for each non-public field;

[0014] If all the condition matching results associated with the pending rule are successful, then the pending rule is determined as the initial hit rule.

[0015] Optionally, the step of performing batch event processing operations and outputting event processing results based on the original event information, the target event field, and each of the initial hit rules includes:

[0016] Based on the original event information, the target event field, and each of the initial hit rules, an aggregated event package is generated;

[0017] Perform a batch status update operation on the aggregated event package to obtain the updated status corresponding to each of the initial hit rules;

[0018] Perform a batch write operation on each of the update states, and output the event processing result based on the target update state that was successfully written and the corresponding target hit rule.

[0019] Optionally, generating the aggregated event package based on the original event information, the target event field, and each of the initial hit rules includes:

[0020] Extract basic event information from the original event information;

[0021] Obtain the judgment result of the target event field in each of the initial hit rules;

[0022] An aggregated event package is generated using all the initial hit rules, the basic event information, the target event fields, and the judgment results.

[0023] Optionally, the step of performing a batch status update operation on the aggregated event package to obtain the updated status corresponding to each of the initial hit rules includes:

[0024] Iterate through each initial hit rule in the aggregated event package, and create a set of query status keys based on the statistical dimensions of each initial hit rule; the set of query status keys includes the query status keys corresponding to each initial hit rule.

[0025] Perform a batch query operation on the set of status keys to be queried to determine the historical status corresponding to each initial hit rule;

[0026] Based on each of the historical states and the target event field, the update state corresponding to each of the initial hit rules is calculated.

[0027] Optionally, the status key to be queried further includes an activity period; the method further includes:

[0028] If the initial hit rule has a periodic sub-rule associated with the activity period, the activity period boundary is determined based on the time information within the initial hit rule.

[0029] If the event time in the target event field is within the activity cycle boundary, and the difference between the event time and the activity cycle boundary is less than or equal to the preset late tolerance time, then continue to execute the step of calculating the update state corresponding to each of the initial hit rules based on each of the historical states and the target event field.

[0030] If the event time in the target event field is not within the activity cycle boundary, or the difference between the event time and the activity cycle boundary is greater than the preset late tolerance time, then the status update of the initial hit rule is skipped, and the late event information is recorded.

[0031] Optionally, the step of performing a batch write operation on each of the updated states, and outputting the event processing result based on the successfully written target updated state and the corresponding target hit rule, includes:

[0032] The update states are summarized into a set of states to be written;

[0033] Perform batch write operations on the set of states to be written, and record the write results;

[0034] Based on the target update status where the write result is successful, match the corresponding target hit rules and determine whether to trigger the subsequent process associated with the target hit rules;

[0035] If so, the event handling result is determined to be successful, and the subsequent process is executed.

[0036] If not, the event processing result is determined to be a failure, and the processing information is obtained and output based on the unique event identifier in the aggregated event package.

[0037] Optionally, the method further includes:

[0038] Obtain the rule configuration information corresponding to multiple preset data processing tasks;

[0039] After preprocessing the configuration information of each rule, multiple preprocessed rules are obtained;

[0040] The event type is used as a rule index, and each of the preprocessing rules is associated to generate the rule set;

[0041] If the rule configuration information fails to be obtained, the historical rule configuration information obtained at a historical time will be determined as the rule configuration information.

[0042] After obtaining the current rule configuration information, calculate the configuration summary of the current rule configuration information;

[0043] If the configuration summary is consistent with the historical configuration summary, then the preprocessing rule of the historical rule configuration information is used as the preprocessing rule corresponding to the current rule configuration information;

[0044] If the configuration summary is inconsistent with the historical configuration summary, the current rule configuration information is preprocessed to obtain multiple preprocessed rules, and the process jumps to the step of using the event type as the rule index and associating each of the preprocessed rules to generate the rule set.

[0045] A second aspect of the present invention provides an event aggregation processing apparatus, comprising:

[0046] The rule set recall module is used to identify the event type of the original event information when the original event information is obtained, and recall a candidate rule set from a pre-configured rule set according to the event type; the candidate rule set includes at least one candidate rule;

[0047] The target event field extraction module is used to extract the target event field corresponding to the union of the required fields from the original event information based on the union of the required fields of each candidate rule.

[0048] The hit determination module is used to determine the initial hit rule by performing a hit determination on each of the candidate rules based on the target event field.

[0049] The batch processing module is used to perform batch event processing operations and output event processing results based on the original event information, the target event field and each of the initial hit rules.

[0050] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the event aggregation processing method as described in any of the first aspects of the present invention.

[0051] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the event aggregation processing method as described in any of the first aspects of the present invention.

[0052] As can be seen from the above technical solutions, the present invention has the following advantages:

[0053] Upon obtaining the original event information, the system identifies the event type and retrieves a set of candidate rules from a pre-configured rule set based on the event type. It then extracts the target event field corresponding to the union of the required fields of each candidate rule from the original event information. Based on the target event field, it performs a hit judgment on each candidate rule to determine the initial hit rule. Finally, based on the original event information, the target event field, and each initial hit rule, it executes batch event processing operations and outputs the event processing results. This application improves the overall system processing efficiency by prioritizing the hit judgment of candidate rules and performing batch operations based on the same target event field and original event information, combined with multiple initial hit rules. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 An event triggering processing system architecture diagram provided in this application embodiment;

[0056] Figure 2 A flowchart illustrating the steps of an event aggregation processing method provided in an embodiment of the present invention;

[0057] Figure 3 A detailed flowchart of the event aggregation processing method provided in an embodiment of the present invention;

[0058] Figure 4 A flowchart illustrating the processing steps of the event handling method provided in this embodiment of the invention in the case of a single original event;

[0059] Figure 5 This is a flowchart illustrating the steps of the anomaly detection and fallback mechanism configuration in an embodiment of the present invention;

[0060] Figure 6 A flowchart illustrating the problem recording process of an event aggregation processing method provided in this embodiment of the invention;

[0061] Figure 7 This is a structural block diagram of an event aggregation processing device provided in an embodiment of the present invention;

[0062] Figure 8This is a schematic diagram of the architecture of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0063] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0064] Current mainstream event triggering processing methods typically involve pre-configuring several task rules, each defining the event types it focuses on and the corresponding judgment conditions. When an event enters the system, the system first identifies the event type, recalls candidate rules related to that event type from the rule set, and then extracts relevant information for each candidate rule and executes the corresponding rule judgment. However, this approach is prone to problems such as duplicate parsing, duplicate calculation, and duplicate state access when a single log may simultaneously hit multiple activities, multiple tasks, or multiple statistical periods. Specifically, the same log entry may be parsed and processed by multiple rules, resulting in duplicate field extraction, duplicate condition judgments, and duplicate calculations; each rule may query historical status separately, causing the number of status reads to increase linearly with the number of hit rules; each rule may write status separately, leading to an increase in the number of status submissions and also increasing the risk of inconsistencies between status and trigger results; the same user may participate in multiple activities simultaneously, and if the status key lacks activity identifiers or period boundaries, status confusion between different activities is likely to occur; the same event may involve multiple statistical periods such as activity periods, daily periods, and weekly periods, and if period boundaries are calculated separately, statistical inconsistencies across days, weeks, and activity periods are likely to occur; if a candidate rule that has not been hit continues to enter the subsequent status query and calculation process, invalid calculations and invalid status accesses will occur.

[0065] Therefore, this invention proposes an event aggregation processing method and a corresponding system based on pre-screening of hit rules and event package merging calculation to solve the above problems. This method uses a pre-screening mechanism to recall candidate rules based on event type after an event enters the system, and then uses hit rule pre-screening to retain only rules that actually match the event conditions, avoiding invalid calculations. Furthermore, through an event package merging calculation mechanism, all hit rules, field extraction results, and status key generation information are packaged into a single event package. Subsequent merging calculations, status queries, and status writing are then performed in one go based on this event package, thereby significantly reducing redundant parsing, redundant calculations, and redundant status accesses, improving system processing efficiency and data consistency.

[0066] The architecture of the event triggering system used to execute the event aggregation processing method can be found in [reference needed]. Figure 1 As shown, the system includes a configuration processing unit, an event filtering unit, a shared computing unit, and an event encapsulation unit. The configuration processing unit is responsible for acquiring and preprocessing rule configurations. The event filtering unit retrieves user behavior, device logs, or business events from event data sources as raw input, identifies event types, and recalls candidate rules from state storage or task configuration sources. The shared computing unit is responsible for merging and calculating event packages, including field extraction, condition judgment, status query and update, and outputting the processing results through a notification output channel. The event encapsulation unit is responsible for acquiring data processing tasks or candidate rules from task configuration sources, integrating hit rules, field views, status key information, and tracking identifiers into a unified aggregated event package, and passing it to the shared computing unit for multi-task merging processing. Through this architecture, the system achieves end-to-end optimization from event access to result output, significantly reducing redundant calculations and state access counts, and improving overall processing efficiency. Additionally, the system can include an exception and tracking unit to record the causes of exceptions and failure nodes in the event package processing chain, facilitating problem localization and system recovery.

[0067] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps of an event aggregation processing method provided in an embodiment of the present invention.

[0068] The present invention provides an event aggregation processing method, comprising:

[0069] Step 101: If the original event information is obtained, identify the event type of the original event information, and recall a candidate rule set from the pre-configured rule set according to the event type; the candidate rule set includes at least one candidate rule.

[0070] Raw event information refers to data units received by the system from external sources that describe a specific business action or device operation, such as a user recharge log or a device status report. Event type refers to an identifier used to distinguish different business actions or data sources, such as a "recharge event" or "login event," and may also include consumption events, task completion events, device reporting events, or other business events. Rule set refers to the collective logical judgment units generated by the system based on multiple pre-configured statistical tasks or triggering tasks. Candidate rule set refers to one or more subsets of rules selected from the rule set based on the current event type, which may be applicable to processing the event, including at least one candidate rule.

[0071] In this embodiment, raw event information can be obtained by periodically polling the logs or message queues of the business system, or by receiving triggers. After obtaining the raw event information, the system can identify the event type by parsing the data header or metadata of the raw event information. For example, if the raw event information comes from a user recharge log, the "event_type" field in its data header is parsed. If the value of this field is "recharge", the event type is identified as a "recharge event". After identifying the event type, the system uses the event type as an index to access the pre-configured rule set and recall all candidate rules associated with the event type, forming a candidate rule set. Through the preliminary event type matching, the system can quickly narrow down the scope of subsequent processing, avoiding a global traversal of all rules, thereby establishing the first efficient filtering layer for the entire processing flow.

[0072] like Figure 3 As shown, the system received a recharge log: User U001 recharged 120 yuan on 2026-07-03 at 10:00. The user's VIP level is V3, the recharge channel is iOS, and the region is Z. The system identifies the event type of this log as a "recharge event". Based on the recharge event, the system recalls the following candidate rules to form a candidate rule set:

[0073] T1: The cumulative recharge amount for Activity A is greater than 100, provided that it is within the activity period and the VIP level is V2 or above.

[0074] T2: The cumulative number of recharges for Activity A is greater than 3, provided that it is within the activity period and the channel is iOS.

[0075] T3: The cumulative recharge amount for Activity B is greater than 200, provided that it is within the activity period and the channel is Android.

[0076] T4: Event B requires a cumulative recharge of more than 5 times, provided that it is within the event period and the VIP level is V4 or above.

[0077] T5: For Activity C, a single recharge amount must be greater than or equal to 100, provided that it is within the activity period and the region is Z.

[0078] T6: The cumulative recharge amount for Activity D is greater than 500, provided that it is within the activity period and the user is a new user.

[0079] In addition to event type, combined indexes can be formed by combining multiple levels or multiple filtering conditions, such as combining event type with event source version number, so that the recall process can be more granularly adapted to the business logic of different client versions or different channels without modifying the core processing flow.

[0080] Step 102: Based on the union of the required fields of each candidate rule, extract the target event field corresponding to the union of the required fields from the original event information;

[0081] The union of required fields refers to a list of fields that does not contain duplicate fields, obtained by statistically merging the input fields required for each rule in the candidate rule set. This list contains all the data items that might be needed to process all rules in the current candidate rule set.

[0082] In this step, after determining the candidate rule set, each candidate rule in the set is traversed, and the required fields for executing each candidate rule are parsed. The required fields of all candidate rules are then summarized to obtain the union of the required fields. For example, for the above candidate rule set, T1 requires the fields "Recharge Amount", "VIP Level", and "Event Period"; T2 requires the fields "Recharge Count", "Event Period", and "Channel"; T3 requires the fields "Recharge Amount", "Event Period", and "Channel"; T4 requires the fields "Recharge Count", "Event Period", and "VIP Level"; T5 requires the fields "Recharge Amount", "Event Period", and "Region"; and T6 requires the fields "Recharge Amount", "Event Period", and "User Type". The union of the required fields obtained after summarizing is: Recharge Amount, VIP Level, Event Period, Recharge Count, Channel, Region, and User Type.

[0083] After obtaining the union of the required fields, the system extracts the target event fields corresponding to each required field from the structured data of the original event information in one go based on the union of the required fields. By extracting them in one go and on demand, the system avoids repeatedly parsing events and obtaining fields when processing each candidate rule, which effectively reduces I / O overhead and consumption of computing resources.

[0084] Furthermore, after the target event fields are extracted, the system can organize these target event fields into a unified field view for reuse by all subsequent candidate rules. This field view uses event packages as carriers and maintains a lightweight copy of structured data in memory, so that each candidate rule does not need to access the original event log again during execution, but only needs to read the required data from this field view.

[0085] Step 103: Based on the target event field, determine the hit rate of each candidate rule and identify the initial hit rule;

[0086] The initial hit rule refers to the set of rules that satisfy all the condition fields after verifying each condition field set in the candidate rule.

[0087] In this embodiment, after obtaining the field view formed by the target event field, the system iterates through each candidate rule in the candidate rule set. Based on the target event field in the field view, it judges each condition field in each candidate rule one by one to determine whether the extracted target event field meets the set conditions of each condition field. If all condition fields of a candidate rule are met, the rule is marked as the initial hit rule.

[0088] For example, among the candidate rules T1 to T6 extracted above, T1 is matched because it meets the conditions of Activity A cycle and VIP level; T2 is matched because it meets the conditions of Activity A cycle and channel; T3 is not matched because the channel requires Android; T4 is not matched because the VIP level is insufficient; T5 is matched because it meets the conditions of Activity C cycle, region, and single transaction amount; T6 is not matched because the user is not a new user. The resulting initial matched rules include T1, T2, and T5.

[0089] In one example of this application, step 103 may include the following sub-steps:

[0090] Iterate through each condition field in the pending rules and check if there is a common field associated with the reusable matching result; the pending rule is any one of the candidate rules, and the reusable matching result is generated after the common field is first matched with the conditions;

[0091] If it exists, the reusable matching result associated with the public field will be determined as the condition matching result of the condition field that is the same as the public field;

[0092] Iterate through the non-public fields except for the public fields, select the corresponding field values ​​in the target event field for condition matching, and obtain the condition matching result for each non-public field;

[0093] If all conditions associated with the pending rule match successfully, then the pending rule is determined as the initial hit rule.

[0094] "Pending rule" refers to a single rule in the candidate rule set that is currently undergoing a match determination. "Condition field" refers to the name of a data field associated with a specific judgment condition defined in the rule configuration, such as "channel" or "VIP level." "Reusable matching result" refers to the judgment result generated after the first conditional matching of a common field during this event processing; this result is temporarily stored for later reuse. "Common field" refers to a field that appears repeatedly in the condition fields of multiple pending rules and whose matching logic is completely identical. "Non-common field" refers to a field that appears only once in the candidate rule set for this event processing or whose matching logic has no reuse value.

[0095] In this embodiment, candidate rules do not directly enter the status query and cumulative calculation process. Instead, the system first uses event information to perform a hit judgment. When the system performs a hit judgment on each pending rule in the candidate rule set, it does not perform condition matching in isolation. Instead, it first traverses all condition fields of the rule and checks whether each field has been marked as a common field. If a condition field is identified as a common field, the system directly retrieves the reusable matching result generated when that field was first matched in this event processing flow from the cache, without re-performing the comparison operation. If the condition field is a common field but there is no reusable matching result at present, the system performs condition matching once and stores the result in the cache for subsequent rule reuse. For example, common judgment results such as activity cycle judgment, channel judgment, membership level judgment, and region judgment can be cached in the event package. That is, "whether the event time falls within the activity A cycle", "whether the channel is iOS", and "whether the VIP level has reached V2" only need to be judged once, and subsequent related rules can reuse the judgment results.

[0096] For non-public fields within candidate rules, the system selects the corresponding field values ​​from the target event fields one by one for independent condition matching and records the matching results. Only when all condition fields associated with the pending rule, including reusable matching results for public fields and independent matching results for non-public fields, pass, is the pending rule determined as the initial hit rule. If the matching result of any condition field fails, the rule is directly determined as a miss, and no further condition judgments are performed on the rule, thus avoiding invalid calculations. Through the above process, the repeated calculation of the same field among different rules is effectively avoided, especially in complex scenarios with high concurrency and multiple rules, significantly reducing the time consumed in the rule filtering stage.

[0097] It should be noted that the hit determination process for the initial hit rule may include, but is not limited to, the following determinations:

[0098] Activity cycle determination: Determine whether the event time falls between the activity start time and the activity end time, or whether it falls within the allowable lateness tolerance range.

[0099] User condition judgment: Determine whether a user belongs to the target user range, such as a specified user, a specified user group, a new user, an old user, or a user with a specific membership level.

[0100] Channel condition judgment: Determine whether the source channel of the event meets the rule configuration, such as iOS, Android, web page, third-party channel, etc.

[0101] Regional condition judgment: Determine whether the user's region, device region, or business region meets the rule configuration.

[0102] Amount condition judgment: Determine whether the required fields for single transaction amount and cumulative amount exist, or whether the single transaction amount reaches the rule threshold.

[0103] Field integrity check: Determines whether the fields required by the rule exist and are in a valid format.

[0104] Only candidate rules that meet the basic conditions are selected as the initial hit rules. Rules that are not hit will not enter the subsequent state query and cumulative calculation process, thereby reducing invalid state access and calculation overhead.

[0105] Step 104: Based on the original event information, target event fields, and initial hit rules, perform batch event processing operations and output the event processing results.

[0106] Batch event processing operations refer to a series of batch processing steps performed around the initial hit rules, including but not limited to status query, merging calculation, status writing, and result output. Event processing results refer to the final result data output by the system after batch event processing operations, which includes but is not limited to reward distribution records, points change records, user status update notifications, and activity participation statistics summaries for each hit rule.

[0107] In this step, the system aggregates the original event information, target event fields, and the initial set of hit rules into an aggregated event package, which serves as the unified input for subsequent batch event processing operations. Within this aggregated event package, the original event information is parsed only once, the target event fields are extracted only once, and the initial set of hit rules is carried entirely, thus avoiding the computational overhead of repeated parsing and extraction. The system then performs subsequent batch event processing operations on this aggregated event package as a unit, including steps such as status key aggregation, merging calculations, status writing, and result output. Specifically, the system first iterates through all initial hit rules in the aggregated event package, aggregating the status keys required for each rule to form a set of status keys to be queried; then, it performs a batch status query on this set to obtain the historical status data required for all rules at once; next, based on the historical status data returned by the batch query, the system calculates the new status for each hit rule within the event package and writes the updated status accordingly; finally, the system generates corresponding output events based on the calculation results of each rule, such as reward distribution, points changes, or user notifications, and distributes these output events uniformly to downstream processing modules. Through the above steps, the system aggregates the parsing, querying, calculation, and output processes that originally required each rule to be executed independently into a one-time batch processing process, which significantly reduces the number of repeated calculations and database interactions, and improves the overall processing efficiency.

[0108] In one example of this application, step 104 may include the following sub-steps S11-S13:

[0109] S11. Generate an aggregated event package based on the original event information, the target event field, and each initial hit rule;

[0110] S12. Perform a batch status update operation on the aggregated event package to obtain the updated status corresponding to each initial hit rule;

[0111] S13. Perform batch write operations on each update state, and output the event processing results based on the target update state that was successfully written and the corresponding target hit rule.

[0112] An aggregated event package refers to a unified processing carrier for a single original event in a multi-rule hit scenario. It includes, but is not limited to, the following: basic event information (such as event identifier, event type, event time, reception time, user identifier, and source channel), target event fields (such as recharge amount, VIP level, channel, region, new / old user markers, activity identifier, and activity cycle judgment result), a set of hit rules consisting of initial hit rules, a summary of reasons for non-hit (for rules that did not hit among candidate rules, the reasons for non-hit can be recorded, such as channel mismatch, insufficient VIP level, not a new user, amount not reaching the threshold, etc.), statistical cycle information (the statistical cycle corresponding to each hit rule, such as activity cycle, daily cycle, natural weekly cycle, or custom cycle), status key generation information (statistical key components used for subsequent batch querying and writing of status), and tracking identifiers (used to record the processing results of the event package at each stage of filtering, merging calculation, status query, status writing, and triggering output).

[0113] Batch state update operation refers to the process of iterating through all initial hit rules within an aggregated event package, generating a corresponding state query key for each rule, and sending a batch request to the state storage layer after obtaining all historical states. Based on the current event information, the new state values ​​for each rule are then derived all at once. Updated state refers to the latest statistical value or trigger flag calculated for each initial hit rule after incorporating the current event information.

[0114] Batch state write operation refers to the process of aggregating the updated states of all initially hit rules calculated into a set to be committed, and then submitting it to the state storage layer for persistence through a single write request. Target updated states refer to those updated states that are successfully persisted in the batch write operation. Target hit rules refer to the initial hit rules corresponding to the target updated states. Event handling results refer to the subsequent actions that the system performs and outputs after successful state persistence, based on the triggering conditions of each target hit rule. This result can be a triggered notification, a rights issuance instruction, a state record, or silent ignoring.

[0115] In this embodiment, after obtaining each initial hit rule, the system merges and encapsulates the initial hit rule set with event basic information, field views, periodic information, status key generation information, and tracking identifiers into an aggregated event package. This event package serves as a unified processing unit for subsequent merge calculations, batch status queries, batch status writes, and trigger judgments, ensuring that the original event information is parsed only once, the fields are extracted only once, the rule judgment results are reusable, and the status keys are summarized only once throughout the entire processing chain, thereby significantly reducing redundant calculations and I / O operations. Specifically, event basic information such as event identifier, event time, user identifier, channel identifier, region identifier, membership level, and new / old user tags can be extracted from the original event information, while simultaneously obtaining the judgment results of the target event fields in each initial hit rule. Using the aforementioned event basic information, judgment results, target event fields, and all initial hit rules, an aggregated event package containing a complete processing context is generated, ensuring that all hit rules of an original event share the same event context in subsequent processes, eliminating serialization overhead and consistency issues caused by data fragmentation.

[0116] Then, using the aggregated event package as input, the system iterates through all the initial hit rules contained within it, generating corresponding state keys based on the statistical dimensions and periodic boundaries of each rule. After all state keys have been collected, the system initiates a single batch read request to the state storage middleware to retrieve the current values ​​of all keys at once. After the batch read results are returned, the system processes each rule in parallel in memory: it accumulates or performs logical operations on the incremental information in the current event (such as recharge amount, number of actions, etc.) with the historical state values ​​to obtain the updated state corresponding to each rule. During this process, the state update calculations for all rules occur within the same processing transaction. Batch reads reduce multiple network round trips to a single one, significantly reducing the impact of state access latency on overall throughput.

[0117] Finally, the system aggregates all updated states into a set to be submitted and submits it to the state storage layer via a single batch write request. After successful write, the system determines whether the updated state of each target hit rule meets the preset threshold or logical condition. If it does, the corresponding trigger result is output, such as sending a notification, issuing benefits, or recording a trigger log; if it does not meet the condition, it is marked as silent and ignored, and the result of this event processing is recorded. Throughout the entire process, the aggregated event package serves as the sole data carrier. From event parsing, rule hitting, state querying, state updating to trigger determination, all steps are completed within the same context, avoiding the overhead of repeatedly transferring and parsing data between multiple modules, and achieving a closed-loop processing from event access to trigger output.

[0118] like Figure 4As shown, the process begins with receiving the raw event. After obtaining basic information such as the event name, user ID, and event time, the system first identifies the event type to locate the corresponding rule configuration. If there is no corresponding configuration for the current event type in the system, the event is discarded, the reason for the lack of configuration is recorded, and the process ends. For events with configurations, the system only extracts the necessary fields required for subsequent processing to reduce data redundancy. Then, it checks the completeness of identity information such as user ID and role ID. Events with incomplete identities are also discarded, and the reason is recorded. Events that pass identity verification enter the shared aggregation processing stage. The system merges and calculates multiple tasks according to the same user dimension and encapsulates all matching tasks into a unified event package, enabling a single event to carry the triggering requests of multiple tasks simultaneously. After the event package is generated, the system performs rule matching on each task within the package to determine whether the current event matches any task rules. If no rule is matched, the event is discarded, and the reason for the match is recorded. If a rule is matched, a list of matching tasks is obtained. Finally, after the status update is completed, it checks whether each task meets the trigger threshold. Tasks that meet the conditions output trigger notifications to drive downstream business actions. The entire process employs a three-layer filtering approach: pre-configuration verification, identity verification, and hit rule judgment. Combined with shared aggregation processing and event package encapsulation mechanisms, it eliminates invalid events early while minimizing the computational overhead of valid events.

[0119] Optionally, S11 may include the following sub-steps:

[0120] Extract basic event information from raw event information;

[0121] Retrieve the judgment results of the target event field in each initial hit rule;

[0122] An aggregated event package is generated by using all initial hit rules, basic event information, target event fields, and judgment results.

[0123] Basic event information refers to the metadata in the original event used to identify the environment and attribution of the event, including but not limited to event type, event time, user identifier, device identifier, channel source, region code, membership level, and new / old user tags. The judgment result refers to the Boolean value indicating pass or fail generated during the rule filtering phase after matching all condition fields of each initial rule. This judgment value has been calculated before event package aggregation.

[0124] In this embodiment, basic event information is extracted from the original event information and used as the metadata header of the aggregated event package. Simultaneously, the judgment results of each initial hit rule on the target event field are obtained. These judgment results cover the reused matching results of common fields and the independent matching results of non-common fields. The basic event information, all initial hit rules, and the judgment results corresponding to each rule are structurally assembled to form the aggregated event package. During the encapsulation process, an explicit association is established between the judgment results and the rule identifier, allowing the subsequent state update process to directly reference the pre-stored judgment conclusions when traversing rules without re-evaluating the conditions. By fully incorporating the computational output of the pre-screening stage into the event package, the system ensures that the condition satisfaction of each rule is verifiable and traceable throughout the entire chain from rule hit to state update, while avoiding repeated condition calculations in subsequent batch processing stages.

[0125] It should be noted that, in addition to the target event fields, judgment results, and basic event information mentioned above, the aggregated event package may also include additional fields such as a summary of the cause of the miss, statistical period information, status key generation information, and tracking identifier, in order to better support subsequent merging calculations, status queries, and trigger output processes.

[0126] Optionally, S12 may include the following sub-steps:

[0127] Iterate through each initial hit rule in the aggregated event package, and create a set of query status keys based on the statistical dimensions of each initial hit rule; the set of query status keys includes the query status keys corresponding to each initial hit rule.

[0128] Perform a batch query operation on the set of status keys to be queried to determine the historical status corresponding to each initial hit rule;

[0129] Based on the historical state and target event fields, calculate the update state corresponding to each initial hit rule.

[0130] Statistical dimensions refer to several classification boundaries used to define state attribution. They are typically composed of user identity, activity identifier, period type, and specific statistical indicator names. The combination of these boundaries determines the unique addressing path of the state in the storage layer. Historical state refers to the cumulative values ​​or state markers that have been persisted in the state storage layer and bound to a specific key before the current event is processed.

[0131] In this embodiment, the system iterates through each initial hit rule in the aggregated event package and generates a corresponding query status key based on its statistical dimensions. For example... Figure 3 As shown, the specific form of the status key to be queried can be:

[0132] Key1: User U001 + Activity A + Rule T1 + Cumulative Recharge Amount.

[0133] Key2: User U001 + Activity A + Rule T2 + Cumulative Recharge Times.

[0134] Key3: User U001 + Activity C + Rule T5 + Single recharge status or trigger record.

[0135] When multiple hit rules share the same state dimension or the same state key prefix, the system can further merge state reads. For example, if multiple rules belong to the statistical tasks of user U001 under activity A, the relevant states under activity A can be read in batches according to the prefix "user + activity".

[0136] By creating the aforementioned set of queryable status keys, the system consolidates the status keys that were originally scattered across various rules for independent queries, forming a single batch read request. Using this set of queryable status keys to perform batch status query operations, the system only needs one batch status read operation to obtain the historical status required for multiple initial hit rules, thereby significantly reducing the access pressure on the status storage layer and minimizing I / O overhead from repeated queries.

[0137] After the batch query returns the historical status, the system calculates the update status of each initial hit rule within the aggregated event package based on the historical status and the target time field. For example, the historical status shows that the cumulative recharge amount for Activity A is 80, and the cumulative recharge count for Activity A is 3. If the current recharge amount is 120, then the new cumulative amount for T1 is 200, and the new cumulative count for T2 is 4. For T5, since it is a single recharge rule for Activity C, it can be directly determined whether it meets the single recharge threshold based on the current recharge amount of 120.

[0138] It should be noted that although the status query and field extraction are executed together, the statistical results of each hit rule are still calculated and recorded separately to avoid confusion between different rules.

[0139] In another example of this application, the status key to be queried also includes an activity period; the method further includes:

[0140] If the initial hit rule has a periodic sub-rule associated with the activity period, the activity period boundary is determined based on the time information within the initial hit rule.

[0141] If the event time in the target event field is within the activity period boundary, and the difference between the event time and the activity period boundary is less than or equal to the preset late tolerance time, then continue to execute the step of calculating the update status corresponding to each initial hit rule based on each historical state and the target event field.

[0142] If the event time in the target event field is not within the activity period boundary, or the difference between the event time and the activity period boundary is greater than the preset late tolerance time, then the status update of the initial hit rule is skipped, and the late event information is recorded.

[0143] Periodic sub-rules refer to sub-rules that are configured in the initial hit rules to maintain the state based on a time period (such as the activity period, the natural day period, or the natural week period).

[0144] The activity cycle boundary refers to a time window calculated based on the activity start time, activity end time, business time zone, and lateness tolerance time in the rule configuration. This window defines the effective time range within which an event can participate in the rule status update.

[0145] Late arrival tolerance time refers to the maximum time offset by which the system allows an event to exceed the activity cycle boundary but still participate in the state update. It is used to balance the contradiction between the timeliness of real-time processing and network transmission delays or out-of-order arrivals. Late event information refers to the structured log data recorded by the system after determining that an event has skipped the state update due to exceeding the time boundary or tolerance range. This log data includes the event identifier, the hit rule identifier, the event time, the cycle boundary, and the reason for skipping the update.

[0146] In this embodiment, the status key to be queried includes not only the user identifier and rule identifier, but also the activity identifier, statistical period, or period boundary information. This avoids confusion regarding the status of the same user in different activities and periods. After creating the set of status keys to be queried, the system checks each initially hit rule in the aggregated event package to determine whether it is configured with a period sub-rule associated with the activity period. If such a sub-rule exists, the system calculates the precise activity period boundary based on the activity start and end times configured in that rule, combined with the business time zone information.

[0147] After obtaining the activity cycle boundary, the system retrieves the event time from the target event field and compares it with the activity cycle boundary. If the event time falls within the activity cycle boundary, the system further calculates the difference between the time information and the boundary's end time. If this difference does not exceed the preset lateness tolerance time, the event is considered a valid late event, and the subsequent state calculation process continues. If the event time does not fall within the activity cycle boundary, or although it does not fall within it, the difference exceeds the lateness tolerance time, the system terminates the state update process for the initial hit rule, generates a late event information record for the rule and writes it to the tracking log, and removes the rule from the current batch update queue, no longer participating in subsequent state reading and calculation. By introducing a dual determination mechanism of activity cycle boundary and lateness tolerance time, the system ensures data integrity within the activity cycle while avoiding the risk of state blocking caused by indefinitely waiting for late events, and also prevents expired events from incorrectly polluting the statistical state of the current cycle.

[0148] like Figure 3 As shown, a recharge event for the same user U001 may simultaneously trigger both activity A and activity C. The system will not simply use "user U001 + recharge event" as the status key, but will instead generate separate keys for each:

[0149] 1. User U001 + Activity A + Rule T1 + Activity A Period + Cumulative Recharge Amount.

[0150] 2. User U001 + Activity A + Rule T2 + Activity A Period + Cumulative Recharge Times.

[0151] 3. User U001 + Activity C + Rule T5 + Activity C cycle + Single recharge trigger record.

[0152] By adding activity identifiers and activity periods to the status keys, we can ensure that the statistical statuses of different activities are isolated from each other.

[0153] Based on this, the system determines the activity period, boundaries, and lateness tolerance time. For example, Activity A's period is from July 1, 2026 to July 7, 2026, and Activity C's period is from July 3, 2026 to July 10, 2026. User U001's recharge log at 10:00 on July 3, 2026, may fall under both Activity A and Activity C. Therefore, this log can hit the rules of both Activity A and Activity C. However, the system will maintain the status of Activity A and Activity C separately, and will not write the cumulative recharge amount of Activity A into the status of Activity C.

[0154] Activity cycles can include various cycle types such as daily cycles, weekly cycles, custom cycles, and multiple cycles coexisting. For daily cycle rules, the system normalizes the event time to a calendar day according to the business time zone. For example, if the event time is 2026-07-03 10:00 and the business time zone is Beijing time, then this event belongs to the 2026-07-03 daily cycle. The daily cycle status key can include the user identifier, rule identifier, and calendar day date. If the same event hits both the activity cycle rule and the daily cycle rule, the system will retain both types of cycle information in the event package and generate corresponding status keys for each. The activity cycle rule updates the activity status, and the daily cycle rule updates the calendar day status.

[0155] For natural week rules, the system determines the natural week to which an event belongs based on the business time zone. For example, the system can determine the natural week boundary according to Monday to Sunday. The natural week status key can include the user identifier, rule identifier, and the start and end dates of the natural week. If the same user generates multiple recharge events within the same week, these events will update the same natural week status; if the events span multiple weeks, they will enter a new natural week status. This avoids the mixing of statistical statuses caused by weekends, cross-time zones, or cross-week boundaries.

[0156] Task rules can also be configured with custom periods, such as the first day of the activity, the first 3 days of the activity, the last 24 hours of the activity, and a rolling 7-day period. During the configuration preprocessing phase, the system converts different periods into computable period boundary rules. In the event package generation phase, it calculates the corresponding period instance for each event based on the event time and the period boundary rules. The same event package can carry multiple period instances simultaneously. For example, the same recharge log can correspond to activity A period, activity C period, a daily period, and a weekly period. During the merging and calculation phase, the system selects the corresponding period instances according to the hit rules to generate status keys, and then aggregates these status keys for batch querying.

[0157] For late events, the system makes a judgment based on the event time, reception time, statistical period, and lateness tolerance time. If the event time still falls within the target period and the reception time does not exceed the lateness tolerance deadline for that period, recalculation and updating of the corresponding status are allowed. If the lateness tolerance time is exceeded, the status update for the corresponding rule is skipped, or the offline compensation process is initiated. The lateness judgment result can also be recorded in the event package for reuse by multiple matching rules. For example, if the same late recharge log hits both Activity A and Activity C, the system will determine whether it is still within the lateness tolerance range of Activity A and Activity C respectively, and decide whether to update the corresponding activity status accordingly.

[0158] In addition, multi-period state isolation maintenance can be performed. Assume that the period for activity A is from July 1, 2026 to July 7, 2026, and the period for activity C is from July 3, 2026 to July 10, 2026. The same recharge log occurs at 10:00 on July 3, 2026, therefore falling within the activity periods of both activity A and activity C.

[0159] The system records the events for Activity A and Activity C separately within the event package, and generates status keys for Activity A and Activity C respectively. Even if the user ID and recharge event are the same, the cumulative amount for Activity A will not be written into the status of Activity C, and a single trigger record for Activity C will not be written into the status of Activity A. This ensures that the recharge amount, number of recharges, and trigger records for the same user in different activities are maintained separately.

[0160] In one example of this application, S13 may include the following sub-steps:

[0161] Summarize all update states into a set of states to be written;

[0162] Perform batch write operations on the set of states to be written, and record the write results;

[0163] Based on the target update status where the write result is successful, match the corresponding target hit rules and determine whether to trigger the subsequent process associated with the target hit rules;

[0164] If so, the event handling result is determined to be successful, and subsequent processes are executed;

[0165] If not, the event processing result is determined to be a failure, and the processing information is obtained and output based on the unique event identifier in the aggregated event package.

[0166] The set of states to be written refers to a batch submission unit formed by summarizing all the updated states calculated by the initial hit rules within the aggregated event package according to the key-value pair format required by the state storage layer. Each state key in this set uniquely corresponds to a statistical dimension. The write result refers to the processing confirmation information returned by the state storage layer for each key-value pair in the batch write request, including the status code for success or failure of the write and an optional exception description.

[0167] The target hit rule refers to the hit rule corresponding to the target updated state that was successfully written to the set of states to be written. Subsequent processes refer to the downstream actions executed by the system after successful state persistence, based on the triggering conditions of the target hit rule. These include, but are not limited to, notification of rights issuance, writing of business records, alarm triggering, or compensation task scheduling. The unique event identifier refers to a globally unique tracking code assigned when the aggregated event package is generated. This code persists throughout the entire lifecycle of event processing and is used to associate and retrieve logs and intermediate data generated at each processing stage.

[0168] In this embodiment, after calculating the update status of each initial hit rule, the system needs to update the status in the status storage layer. This can be done by aggregating the updated statuses to form a set of states to be written, and then performing a batch write operation on the status storage layer. Based on the write results, the hit rule corresponding to the successfully written update state is used as the target hit rule, and it is determined whether to trigger its associated subsequent process. If the trigger is successful, the event processing result is considered successful, and the subsequent process is executed; if the trigger fails, the event processing result is considered failed, and processing information is obtained based on the unique event identifier for subsequent troubleshooting or retrying. By decoupling the status writing from the subsequent triggering process, the system can effectively isolate the impact of write failures on the overall process, avoiding interruption of the entire event processing due to a single status write anomaly. Simultaneously, through the global tracking capability of the unique event identifier, the system can quickly locate the specific rule and its cause of the write failure, providing accurate fault location basis for operation and maintenance, thereby improving the stability and maintainability of the event processing system.

[0169] like Figure 2 As shown, after retrieving the status keys Key1 to Key3, a batch status query is performed. The retrieved historical statuses are: Key1 historical cumulative amount is 80, Key2 historical cumulative count is 3, and Key3 historical record is not triggered. Based on the current recharge amount of 120, the system calculates: T1 new cumulative amount is 200, T2 new cumulative count is 4, and T5 single transaction amount is 120. The system aggregates Key1=200, Key2=4, Key3=120, or the corresponding trigger records into a set of statuses to be written, and performs batch status writing. After successful status submission, the system then judges and outputs the corresponding subsequent processes: T1 satisfies cumulative amount greater than 100, T2 satisfies cumulative count greater than 3, and T5 satisfies single transaction amount greater than or equal to 100.

[0170] It should be noted that state storage can utilize internal state processing systems, external key-value stores, databases, caches, or other persistent storage. Batch state queries can be performed by the complete state key, or by user, activity, or state key prefix to reduce the number of queries. Batch state writes also support batch writes by the complete state key or prefix, ensuring the atomicity and consistency of write operations. Output results can be notifications, tags, reward distributions, alarms, record writes, or compensation tasks. Tracking policies can be enabled by full volume, sampling, anomaly triggering, or specific activities.

[0171] like Figure 5 As shown in another example of this application, the method may further include the following steps:

[0172] Obtain the rule configuration information corresponding to multiple preset data processing tasks;

[0173] After preprocessing the configuration information of each rule, multiple preprocessed rules are obtained;

[0174] The event type is used as the rule index, and each preprocessing rule is associated to generate a rule set;

[0175] If the rule configuration information fails to be obtained, the historical rule configuration information obtained at a historical time will be used as the rule configuration information.

[0176] After obtaining the current rule configuration information, calculate the configuration summary of the current rule configuration information;

[0177] If the configuration summary is consistent with the historical configuration summary, the preprocessing rule of the historical rule configuration information is used as the preprocessing rule corresponding to the current rule configuration information;

[0178] If the configuration summary is inconsistent with the historical configuration summary, the current rule configuration information is preprocessed to obtain multiple preprocessed rules. Then, the process jumps to the step of using the event type as the rule index and associating each preprocessed rule to generate a rule set.

[0179] Data processing tasks refer to statistical or trigger-based business logic units executed when a specific event occurs, such as cumulative recharge amount statistics or single recharge trigger tasks. Rule configuration information refers to a complete set of definitions describing the conditions, thresholds, periods, user scope, and other parameters that a data processing task depends on during execution. A rule index refers to a mapping structure built with event type as the key and rule identifier as the value, used to quickly locate candidate rule sets. A configuration digest refers to a fixed-length digest value obtained by hashing the rule configuration information, used to quickly determine if the configuration has changed. Historical configuration digests refer to digest values ​​calculated from historical rule configuration information using the same hash algorithm.

[0180] In this embodiment, the generation of the rule set can be achieved by retrieving rule configuration information corresponding to multiple preset data processing tasks from persistent storage or a preset configuration center when the system starts up or when a periodic scheduling task is triggered. After obtaining the rule configuration information, it is preprocessed, including parsing rule conditions, extracting field dependencies, determining statistical periods, and generating rules based on status keys, thereby obtaining multiple preprocessed rules. Subsequently, each preprocessed rule is associated with its corresponding event type using the event type as an index, forming a rule set. For example, for the "recharge successful" event type, all preprocessed rules involving recharge amount statistics, frequency conditions, and periodic thresholds can be associated, facilitating the rapid location of candidate rules when subsequent events arrive.

[0181] If rule configuration information retrieval fails, historical rule configuration information obtained at a previous time is used as the current rule configuration information. This ensures that the system can continue to run based on existing rules even when the configuration source is unavailable, avoiding data processing interruptions due to configuration retrieval failure. If the rule configuration information is empty, the current rule set is cleared according to the business security policy, or the previous version of the rule set is used to avoid abnormal system behavior due to empty configuration. If a field is missing, the rule is removed from the hit rule set, and the missing field information is recorded to ensure that it can be supplemented and improved during subsequent rule optimization. If the rule configuration information is consistent with the historical configuration summary, the historical preprocessing rule is directly reused to avoid duplicate calculations and improve system processing efficiency. Through the above mechanisms, the system can update the rule set in a timely manner when configuration changes occur and provide a fallback guarantee in case of configuration anomalies, ensuring the stability and availability of the rule set, thereby supporting the efficient and accurate execution of data processing tasks.

[0182] like Figure 6 As shown in another example of this application, the method may further include the following steps:

[0183] If the target event field does not meet the preset requirements, or the candidate rule set does not meet the preset rule conditions, or the batch historical status operation fails, or the batch status write operation fails, record the corresponding exception reason.

[0184] In this embodiment, a fallback strategy can be set for exception handling, as follows:

[0185] If rule configuration retrieval fails, the available configuration from the previous version is used, and the exception is recorded. If the rule configuration is empty, the current rule set is cleared according to the business security policy, or the rule set from the previous version is continued to be used. If a field is missing, the rule with the missing field is removed from the set of hit rules, and the reason for the missing field is recorded. If no rule is hit, a no-hit result is recorded, and the status query and cumulative calculation process is not entered. If batch status query fails, the current event packet does not output the trigger result, and the status query exception is recorded, allowing the retry or compensation process to proceed. If some status writing fails, the subsequent process is only output for rules that are successfully written and meet the trigger conditions; rules that fail to write do not output the trigger result. If the delay exceeds the limit, the corresponding periodic status update is skipped, or the offline compensation process is entered. If output fails, the reason for the output failure is recorded, and retry is performed according to the configuration. Through the above fallback strategies, the system can maintain stable operation under various abnormal scenarios, avoiding overall processing interruption due to single-point failure.

[0186] Simultaneously, the system generates a tracking identifier for each aggregated event package, recording the original event identifier, event type, event time, reception time, number of candidate rules, number of hit rules and reasons for misses, field extraction results and field missing status, judgment results for each period, set of status keys to be queried, batch query results, set of statuses to be written and batch write results, new status of each hit rule, trigger judgment results and output results, as well as abnormal stages, abnormal reasons and processing time. Through the above tracking and feedback mechanism, the system can accurately locate the specific reasons for rule misses, status query failures, status write failures, periodic judgment anomalies or output failures, providing data support for subsequent rule optimization and system tuning.

[0187] Furthermore, after event handling is complete, a tracking feedback and closed-loop optimization process can be executed. The process begins with the processing link recording stage, where the system writes the processing status of the event package at each stage—rule filtering, status query, status writing, and trigger output—in chronological order to the tracking log. Each record is associated with a unique event identifier within the aggregated event package. This is followed by the structured metric statistics stage, where the system categorizes and aggregates the tracking data according to processing stage (e.g., hit filtering, status reading, status writing), result type (success, failure, skipped), and anomaly cause, generating quantitative metrics for display on the monitoring dashboard. When the failure rate or anomaly rate in the structured metrics exceeds a preset threshold, the system triggers an alarm and troubleshooting process. Operations personnel can use the alarm information combined with the tracking records to pinpoint the root cause of the problem, determining whether it's a configuration error, data quality issue, or storage layer anomaly. After troubleshooting and fixing the problem, the system enters the processing effect feedback stage. By comparing the trends of indicators such as trigger success rate, average processing latency, and anomaly occurrence rate within the same time period before and after optimization, the actual effectiveness of the adjustment measures is quantitatively evaluated. Finally, based on the feedback evaluation results, the system drives the rule and window correction process to adjust and optimize rule configuration conditions, late-tolerance window size, or batch processing strategies. The adjusted configuration re-enters the preprocessing and index building stages, forming a complete closed loop from link tracing to configuration correction. This closed-loop mechanism enables the system's processing strategy to continuously evolve according to actual operating conditions, rather than being fixed in the initial deployment state, thus improving the system's adaptability and long-term operational stability.

[0188] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0189] The event aggregation processing system provided in the embodiments of this application is described below. The event aggregation processing system described below can be referred to in correspondence with the event aggregation processing method described above.

[0190] Please see Figure 7 , Figure 7 An embodiment of the present invention provides an event aggregation processing apparatus, comprising:

[0191] The rule set recall module 201 is used to identify the event type of the original event information when the original event information is obtained, and recall a candidate rule set from the pre-configured rule set according to the event type; the candidate rule set includes at least one candidate rule;

[0192] The target event field extraction module 202 is used to extract the target event field corresponding to the union of required fields from the original event information based on the union of required fields of each candidate rule.

[0193] The hit determination module 203 is used to determine the initial hit rule by judging the hit of each candidate rule based on the target event field.

[0194] The batch processing module 204 is used to perform batch event processing operations based on the original event information, the target event field and each initial hit rule, and output the event processing results.

[0195] Optionally, the hit determination module 203 is specifically used for:

[0196] Iterate through each condition field in the pending rules and check if there is a common field associated with the reusable matching result; the pending rule is any one of the candidate rules, and the reusable matching result is generated after the common field is first matched with the conditions;

[0197] If it exists, the reusable matching result associated with the public field will be determined as the condition matching result of the condition field that is the same as the public field;

[0198] Iterate through the non-public fields except for the public fields, select the corresponding field values ​​in the target event field for condition matching, and obtain the condition matching result for each non-public field;

[0199] If all conditions associated with the pending rule match successfully, then the pending rule is determined as the initial hit rule.

[0200] Optionally, the batch processing module 204 includes:

[0201] The aggregated event package generation submodule is used to generate aggregated event packages based on the original event information, target event fields, and each initial hit rule;

[0202] The batch status update submodule is used to perform batch status update operations on the aggregated event package to obtain the updated status corresponding to each initial hit rule;

[0203] The event batch processing submodule is used to perform batch state write operations on each update state, and output the event processing results according to the target update state that was successfully written and the corresponding target hit rule.

[0204] Optionally, the aggregated event package generation submodule is specifically used for:

[0205] Extract basic event information from raw event information;

[0206] Retrieve the judgment results of the target event field in each initial hit rule;

[0207] An aggregated event package is generated by using all initial hit rules, basic event information, target event fields, and judgment results.

[0208] Optionally, the batch status update submodule is specifically used for:

[0209] Iterate through each initial hit rule in the aggregated event package, and create a set of query status keys based on the statistical dimensions of each initial hit rule; the set of query status keys includes the query status keys corresponding to each initial hit rule.

[0210] Perform a batch query operation on the set of status keys to be queried to determine the historical status corresponding to each initial hit rule;

[0211] Based on the historical state and target event fields, calculate the update state corresponding to each initial hit rule.

[0212] Optionally, the status key to be queried may also include an activity period; the device may also include a period determination module, used for:

[0213] If the initial hit rule has a periodic sub-rule associated with the activity period, the activity period boundary is determined based on the time information within the initial hit rule.

[0214] If the event time in the target event field is within the activity period boundary, and the difference between the event time and the activity period boundary is less than or equal to the preset late tolerance time, then continue to execute the step of calculating the update status corresponding to each initial hit rule based on each historical state and the target event field.

[0215] If the event time in the target event field is not within the activity period boundary, or the difference between the event time and the activity period boundary is greater than the preset late tolerance time, then the status update of the initial hit rule is skipped, and the late event information is recorded.

[0216] Optionally, the event batch processing submodule is specifically used for:

[0217] Summarize all update states into a set of states to be written;

[0218] Perform batch write operations on the set of states to be written, and record the write results;

[0219] Based on the target update status where the write result is successful, match the corresponding target hit rules and determine whether to trigger the subsequent process associated with the target hit rules;

[0220] If so, the event handling result is determined to be successful, and subsequent processes are executed;

[0221] If not, the event processing result is determined to be a failure, and the processing information is obtained and output based on the unique event identifier in the aggregated event package.

[0222] Optionally, the device also includes a rule configuration module for:

[0223] Obtain the rule configuration information corresponding to multiple preset data processing tasks;

[0224] After preprocessing the configuration information of each rule, multiple preprocessed rules are obtained;

[0225] The event type is used as the rule index, and each preprocessing rule is associated to generate a rule set;

[0226] If the rule configuration information fails to be obtained, the historical rule configuration information obtained at a historical time will be used as the rule configuration information.

[0227] After obtaining the current rule configuration information, calculate the configuration summary of the current rule configuration information;

[0228] If the configuration summary is consistent with the historical configuration summary, the preprocessing rule of the historical rule configuration information is used as the preprocessing rule corresponding to the current rule configuration information;

[0229] If the configuration summary is inconsistent with the historical configuration summary, the current rule configuration information is preprocessed to obtain multiple preprocessed rules. Then, the process jumps to the step of using the event type as the rule index and associating each preprocessed rule to generate a rule set.

[0230] This invention provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the event aggregation processing method as described in any embodiment of this invention.

[0231] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the event aggregation processing method as described in any embodiment of this invention.

[0232] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0233] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.

[0234] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0235] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0236] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0237] Indicatively, such as Figure 8 As shown, Figure 8 This is a schematic diagram of the internal structure of an electronic device 300 provided in an embodiment of this application. The electronic device 300 can be provided as a server. (Refer to...) Figure 8The electronic device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the text recognition method of any of the above embodiments.

[0238] Electronic device 300 may also include a power supply component 303 configured to perform power management of electronic device 300, a wired or wireless network interface 304 configured to connect electronic device 300 to a network, and an input / output (I / O) interface 305. Electronic device 300 may operate based on storage.

[0239] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An event aggregation processing method, characterized in that, include: Once the original event information is obtained, the event type of the original event information is identified, and a candidate rule set is recalled from the pre-configured rule set according to the event type; The candidate rule set includes at least one candidate rule; Based on the union of the required fields of each candidate rule, extract the target event field corresponding to the union of the required fields from the original event information; Based on the target event field, a hit judgment is made on each of the candidate rules to determine the initial hit rule; Based on the original event information, the target event field, and each of the initial hit rules, perform batch event processing operations and output the event processing results.

2. The event aggregation processing method according to claim 1, characterized in that, The step of determining the initial hit rule by performing a hit judgment on each of the candidate rules based on the target event field includes: Iterate through each condition field in the pending rules and check whether there is a common field associated with a reusable matching result; the pending rules are any one of the candidate rules, and the reusable matching result is generated after the common field is first matched with conditions; If it exists, the reusable matching result associated with the public field is determined as the condition matching result of the condition field that is the same as the public field; Iterate through the non-public fields except for the public fields, and select the corresponding field values ​​in the target event field for condition matching to obtain the condition matching result for each non-public field; If all the condition matching results associated with the pending rule are successful, then the pending rule is determined as the initial hit rule.

3. The event aggregation processing method according to claim 1, characterized in that, The step of performing batch event processing operations based on the original event information, the target event field, and each of the initial hit rules, and outputting the event processing results, includes: Based on the original event information, the target event field, and each of the initial hit rules, an aggregated event package is generated; Perform a batch status update operation on the aggregated event package to obtain the updated status corresponding to each of the initial hit rules; Perform a batch write operation on each of the update states, and output the event processing result based on the target update state that was successfully written and the corresponding target hit rule.

4. The event aggregation processing method according to claim 3, characterized in that, The step of generating an aggregated event package based on the original event information, the target event field, and each of the initial hit rules includes: Extract basic event information from the original event information; Obtain the judgment result of the target event field in each of the initial hit rules; An aggregated event package is generated using all the initial hit rules, the basic event information, the target event fields, and the judgment results.

5. The event aggregation processing method according to claim 3, characterized in that, The step of performing a batch status update operation on the aggregated event package to obtain the updated status corresponding to each of the initial hit rules includes: Iterate through each initial hit rule in the aggregated event package, and create a set of query status keys based on the statistical dimensions of each initial hit rule; the set of query status keys includes the query status keys corresponding to each initial hit rule. Perform a batch query operation on the set of status keys to be queried to determine the historical status corresponding to each initial hit rule; Based on each of the historical states and the target event field, the update state corresponding to each of the initial hit rules is calculated.

6. The event aggregation processing method according to claim 5, characterized in that, The status key to be queried also includes an activity period; the method further includes: If the initial hit rule has a periodic sub-rule associated with the activity period, the activity period boundary is determined based on the time information within the initial hit rule. If the event time in the target event field is within the activity cycle boundary, and the difference between the event time and the activity cycle boundary is less than or equal to the preset late tolerance time, then continue to execute the step of calculating the update state corresponding to each of the initial hit rules based on each of the historical states and the target event field. If the event time in the target event field is not within the activity cycle boundary, or the difference between the event time and the activity cycle boundary is greater than the preset late tolerance time, then the status update of the initial hit rule is skipped, and the late event information is recorded.

7. The event aggregation processing method according to claim 3, characterized in that, The step of performing a batch write operation on each of the updated states, and outputting the event processing result based on the successfully written target updated state and the corresponding target hit rule, includes: The update states are summarized into a set of states to be written; Perform batch write operations on the set of states to be written, and record the write results; Based on the target update status where the write result is successful, match the corresponding target hit rules and determine whether to trigger the subsequent process associated with the target hit rules; If so, the event handling result is determined to be successful, and the subsequent process is executed. If not, the event processing result is determined to be a failure, and the processing information is obtained and output based on the unique event identifier in the aggregated event package.

8. The event aggregation processing method according to any one of claims 1 to 7, characterized in that, The method further includes: Obtain the rule configuration information corresponding to multiple preset data processing tasks; After preprocessing the configuration information of each rule, multiple preprocessed rules are obtained; The event type is used as a rule index, and each of the preprocessing rules is associated to generate the rule set; If the rule configuration information fails to be obtained, the historical rule configuration information obtained at a historical time will be determined as the rule configuration information. After obtaining the current rule configuration information, calculate the configuration summary of the current rule configuration information; If the configuration summary is consistent with the historical configuration summary, then the preprocessing rule of the historical rule configuration information is used as the preprocessing rule corresponding to the current rule configuration information; If the configuration summary is inconsistent with the historical configuration summary, the current rule configuration information is preprocessed to obtain multiple preprocessed rules, and the process jumps to the step of using the event type as the rule index and associating each preprocessed rule to generate the rule set.

9. An event aggregation processing device, characterized in that, include: The rule set recall module is used to identify the event type of the original event information when the original event information is obtained, and recall the candidate rule set from the pre-configured rule set according to the event type. The candidate rule set includes at least one candidate rule; The target event field extraction module is used to extract the target event field corresponding to the union of the required fields from the original event information based on the union of the required fields of each candidate rule. The hit determination module is used to determine the initial hit rule by performing a hit determination on each of the candidate rules based on the target event field. The batch processing module is used to perform batch event processing operations and output event processing results based on the original event information, the target event field and each of the initial hit rules.

10. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the event aggregation processing method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the event aggregation processing method as described in any one of claims 1-8.