A data alarm arrangement method and system based on a rule-driven process engine

By adopting a data alarm orchestration method based on a rule-driven process engine, the problem of scattered development of alarm logic in the data operation system of the vending machine industry is solved. It realizes the unified standardization and rapid expansion of alarm logic, reduces maintenance costs, avoids duplicate alarms, and improves the flexibility and maintainability of the system.

CN123180918APending Publication Date: 2026-11-27SHANGHAI QUZHI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611164997.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

The existing data alarm logic of the data operation system in the vending industry is developed in a decentralized manner, resulting in a large amount of code redundancy, high maintenance costs, difficulty in unifying the implementation standards of each module, high threshold for alarm type expansion, coupling of notification channels with business code, inability to be dynamically configured, frequent occurrence of repeated alarms, and insufficient system flexibility and reusability.

Method used

It adopts a data alarm orchestration method based on a rule-driven process engine. By receiving alarm trigger events, obtaining rule configurations, and dynamically constructing alarm processing process chains, it achieves global idempotent anti-duplicate, multi-channel notification, unified management logic, and supports rapid expansion and dynamic configuration of alarm types.

Benefits of technology

It achieves a unified standard for alarm logic, reduces system maintenance costs, shortens the development cycle for new alarms, avoids duplicate alarms, improves system flexibility and maintainability, and supports independent fault tolerance for multi-channel notifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180918A_ABST
    Figure CN123180918A_ABST
Patent Text Reader

Abstract

The application discloses a data alarm arrangement method and system based on a rule-driven process engine, solves the defects of existing alarm scattered coding, repeated development of general logic, high cost of newly added alarm, code coupling of notification channel, split of timing and real-time alarm link, and easy production of repeated alarm, and the like. The application relies on a LiteFlow engine, stores alarm rules in MongoDB in concentration, dynamically assembles a process chain and registers a temporary Chain according to configuration runtime by an ELBus; holiday interception and global idempotent anti-duplication are completed by a unified control node, alarm calculation components are pluggable and extended based on an ACityOperAlertCalc abstract base class; city operation permission data are dynamically loaded by a process node and injected into context, alarm attachments are uploaded to an OSS, and messages are independently fault-tolerant and pushed in multiple channels according to configuration after the OSS, and the temporary process is destroyed to release memory after the process ends. The scheme realizes alarm configuration extension, full-type alarm reuse of general nodes, and dynamic configuration and effectiveness of a notification channel, and effectively reduces development and operation and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data operation and maintenance alarm technology, specifically to a data alarm orchestration method and system based on a rule-driven process engine. Background Technology

[0002] This invention is primarily applied to monitoring abnormal operational data in the vending machine industry. Currently, data alarms in vending machine industry data operation systems generally adopt a distributed development architecture, with various alarm logics such as abnormal replenishment cycles, SKU shortages, sales fluctuations, and billing anomalies being independently coded and implemented in their respective Service layers.

[0003] In existing technologies, common cross-cutting logic such as skipping verification during holidays, repeatedly executing idempotent protection, loading permissions for city operations managers, generating alarm attachments, uploading OSS files, and distributing messages through multiple channels needs to be repeatedly written in the business code for each type of alarm. This results in significant code redundancy, difficulty in unifying implementation standards across modules, and high maintenance costs in the later stages. Furthermore, the calling logic for notification channels such as CMS tasks, emails, DingTalk robots, and DingTalk to-do lists is deeply coupled with the business code. Adding, removing, or switching notification channels requires modifying the source code and redeploying, making dynamic configuration impossible.

[0004] In traditional solutions, the alarm calculation component uses a runtime hard-coded binding method. Adding any new type of alarm requires building the entire chain of code from scratch, including rule loading, data querying, group statistics, and message assembly, which raises the barrier to alarm type expansion. Although the system is compatible with both scheduled alarms and RabbitMQ messages, the alarm processing flow for the two triggering modes is developed independently and cannot be reused, further exacerbating the problem of code duplication.

[0005] Furthermore, each alarm module independently implements its own rules for preventing duplicate alarms and blocking alarms during holidays, resulting in inconsistent control standards. This easily leads to duplicate alarms in scenarios involving task re-issuance and concurrent scheduling, severely disrupting the daily work of operations personnel. The existing architecture lacks flexibility and reusability, failing to adapt to the rapid iteration and frequent addition of alarm rules required by the vending machine industry. Summary of the Invention

[0006] To address these issues, this invention provides a data alarm orchestration method and system based on a rule-driven process engine, which solves the problems of existing alarm development being scattered, repetitive coding of general cross-cutting logic, high cost of building new alarm links, coupling of notification channels and code, fragmented alarm triggering processes for two types of alarms, and scattered management leading to duplicate alarms.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a data alarm orchestration method based on a rule-driven process engine, comprising:

[0008] S1. Receive alarm trigger events and obtain the unique identifier of the event type and query parameters;

[0009] S2. Retrieve the centrally stored alarm rule configuration based on the unique identifier of the event type;

[0010] S3. Based on the rule process engine, dynamically construct the process execution expression according to the calculation component identifier in the alarm rule configuration, generate an alarm processing process chain with a fixed general skeleton and pluggable business nodes, and configure a unique process identifier to register as a temporary process instance.

[0011] S4. Execute the global unified management logic, determine whether the alarm skipping condition is met, and implement global idempotent anti-duplicate based on the historical execution records of similar events; if the skipping condition is met, directly jump to the process termination step; otherwise, write to the pending execution record and calculate the time boundary of this alarm data query.

[0012] S5. Load the associated data of the alarm responsibility entity and the business jurisdiction, build a two-way mapping relationship and inject it into the global process context for all nodes in the chain to share and call;

[0013] S6. Load standardized alarm templates, start pluggable alarm calculation components in parallel, complete abnormal data retrieval and alarm content assembly by rewriting preset abstract methods, group and match corresponding responsible entities according to business jurisdiction to generate alarm notification objects in a unified format, and generate alarm detail attachments.

[0014] S7. Upload the alarm detail attachment to the distributed object storage and write back the access address to the alarm notification object, and at the same time persist the alarm master record and detail data in layers.

[0015] S8. Based on the notification policy configured in the alarm rules, perform independent fault-tolerant message distribution for the specified notification channels. If a single channel fails to send a message, it will not block the execution of other channels.

[0016] S9. Update the final state of the alarm execution record and destroy the temporarily generated process instance to release system memory resources.

[0017] As a preferred solution for data alarm orchestration based on a rule-driven process engine, in S1, the system receives alarm trigger events through timed scheduling tasks / RabbitMQ messages, and obtains the event type field (event) and query parameters; the message middleware includes RabbitMQ, Kafka, and RocketMQ.

[0018] As a preferred solution for data alarm orchestration based on a rule-driven process engine, in S2, DataAlertMonitorConfig is retrieved from MongoDB according to the event field.

[0019] The databases include MongoDB document-oriented database, MySQL / PostgreSQL relational database, and Redis / Nacos configuration center.

[0020] As a preferred solution for data alarm orchestration based on a rule-driven process engine, in S2, the alarm rule configuration DataAlertMonitorConfig includes the alarm level, the calculation component ID, the template URL, the notification method noticeMethod, and the specified recipient configuration receiveTarget.

[0021] As a preferred solution for data alarm orchestration based on rule-driven process engine, S3 relies on the ELBus component of the LiteFlow process engine to dynamically construct EL expressions based on the computational component ID in the configuration, generate alarm processing process chains with fixed structures, and register them as process chains with a unique workflowId.

[0022] The process engines include the rule-based process engine LiteFlow, the BPMN process engine Activiti, and the BPMN process engine Flowable / state machine SpringStateMachine;

[0023] The EL expression is:

[0024] startComp→ifOpt(conditionControlComp,finishComp,then(daMonitorComp,dataTemplateComp,when(calculateComps),storageComp,daNoticeComp,finishComp)).

[0025] As a preferred solution for data alarm orchestration based on a rule-driven process engine, in S4, conditionControlComp reads the holiday configuration table from MongoDB to determine whether to skip the holiday marker for the current day. Simultaneously, it queries the historical execution records corresponding to the same event field for the current day to achieve idempotent anti-duplicate behavior. If the execution marker has already been skipped, it jumps to finishComp; otherwise, it writes to the pending execution record and calculates the starting boundary of the current alarm data query based on the last execution time. The formula for calculating the starting boundary of the alarm data query is:

[0026]

[0027] In the formula, This is the start date for querying the alarm data. The date of completion of the last alarm execution for the same event type. The date on which this alarm was triggered is the calendar date.

[0028] As a preferred solution for data alarm orchestration based on a rule-driven process engine, in S5, daMonitorComp reads the city manager configuration from H3 Tritium Cloud MongoDB, associates it with the internal operations personnel permission table to build a two-way mapping relationship between the city and operations personnel, and injects it into DaWorkflowContext. The test environment is switched to the test personnel configuration. The city manager configuration is read from H3 Tritium Cloud MongoDB / accessed through the internal RBAC permission system / statically specifies the recipient in the alarm rule configuration DataAlertMonitorConfig.

[0029] The two-way mapping and matching formula between the city and the operators is as follows:

[0030]

[0031] In the formula, This is the set of cities to which the alarm data belongs. For operators The collection of cities under their responsibility This is a complete list of operations personnel who need to receive push notifications for the current alarm.

[0032] As a preferred solution for data alarm orchestration based on a rule-driven process engine, in S6, dataTemplateComp loads an Excel template, and calculateComps starts in parallel a calculation node based on LiteflowComponent that inherits ACityOperAlertCalc. By rewriting sreachAlertDatas and fillAlertContext, abnormal alarm data is retrieved, alarm text is assembled, and AlertNoticeBO is generated by matching the corresponding operators in city groups. Local temporary attachments are generated using EasyExcel; the local temporary attachments are generated using EasyExcel / CSV / PDF.

[0033] The mathematical formula for determining the abnormal alarm threshold is:

[0034]

[0035] In the formula, For raw data of a single business transaction, The data corresponds to the actual values ​​of the business metrics. , The upper and lower limits of the metrics configured for MongoDB. This is the dataset of alarms that meet the abnormal conditions after filtering.

[0036] As a preferred solution for data alarm orchestration based on rule-driven process engine, in S7, storageComp uploads the local temporary attachment to OSS storage and writes back the OSS address to the AlertNoticeBO, while storing the alarm master record and alarm details in MongoDB.

[0037] In S8, daNoticeComp independently and faultily distributes CMS tasks, RabbitMQ asynchronous emails, DingTalk robot messages, and DingTalk to-do task channel notifications based on the notificationMethod and sendType configurations. The channel notifications also include WeChat Work, Lark, and SMS channels enumerated by SendTypeEnum. The sendType configuration distributes the notifications, and each notification channel is configured with independent exception handling logic. If a single channel fails to send, it will not block the delivery of other channels.

[0038] In S9, finishComp updates the alarm execution record status, changing the status from pending execution to executed, and destroys the current dynamic chain through FlowBus.removeChain to release memory.

[0039] This invention also provides a data alarm orchestration system based on a rule-driven process engine, employing the aforementioned data alarm orchestration method based on a rule-driven process engine, comprising:

[0040] The alarm trigger event receiving unit is used by the system to receive alarm trigger events through scheduled tasks / RabbitMQ messages, and to obtain the event type field (event) and query parameters.

[0041] Load Alert Rule Configuration Unit: Used to retrieve DataAlertMonitorConfig from MongoDB based on the event field;

[0042] Dynamically orchestrated LiteFlow process chain unit: Used to dynamically construct EL expressions based on the computation component ID in the configuration of the LiteFlow process engine component ELBus, generate alarm processing process chains with fixed structure, and register them as process chains with a unique workflowId;

[0043] The execution control node judgment unit is used by conditionControlComp to read the holiday configuration table from the MongoDB to determine whether to skip the holiday flag on the current day. At the same time, it queries the historical execution record corresponding to the same event field on the current day to achieve idempotent anti-duplicate. If the execution flag has been skipped, it jumps to finishComp. Otherwise, it writes to the pending execution record and calculates the starting boundary of the current alarm data query based on the last execution time.

[0044] Load the city operations manager relationship unit: This is used by daMonitorComp to read the city manager configuration from H3 Tritium Cloud MongoDB, associate it with the internal operations personnel permission table to build a two-way mapping relationship between the city and operations personnel, and inject it into DaWorkflowContext. The test environment is then switched to the test personnel configuration.

[0045] Alarm data calculation unit: used by dataTemplateComp to load Excel templates, and calculateComps to start calculation nodes based on LiteflowComponent in parallel, inheriting ACityOperAlertCalc. By overriding sreachAlertDatas and fillAlertContext, abnormal alarm data is retrieved, alarm text is assembled, and AlertNoticeBO is generated by matching the corresponding operators by city group. Local temporary attachments are generated with the help of EasyExcel.

[0046] Storage alarm result unit: used by storageComp to upload the local temporary attachment to OSS storage and write back the OSS address to the AlertNoticeBO, and at the same time store the alarm master record and alarm details to MongoDB;

[0047] Multi-channel distribution notification unit: Used by daNoticeComp to independently and fault-tolerantly distribute CMS tasks, RabbitMQ asynchronous emails, DingTalk robot messages and DingTalk to-do task channel notifications based on the notificationMethod and sendType configurations.

[0048] Process End and Resource Release Unit: Used by finishComp to update the alarm execution record status, change the alarm execution record status from pending to executed to executed, and destroy the current dynamic chain through FlowBus.removeChain to release memory.

[0049] The present invention has the following advantages:

[0050] First, this invention unifies and reuses cross-cutting logic, solidifying common logic such as holiday verification, idempotent control, loading of operator configuration, attachment generation and OSS upload, and multi-channel message distribution into independent process nodes. All types of alarms share a single set of code, eliminating code redundancy, unifying logic specifications, and significantly reducing system maintenance costs.

[0051] Secondly, the alarm types of this invention can be configurable and rapidly expanded. Based on the abstract base class, components can be hot-swapped. Adding a new alarm only requires implementing two abstract methods and supplementing the database configuration to be integrated into the entire process. There is no need to refactor the call chain, which effectively reduces the development cycle and workload of adding new alarms.

[0052] Third, this invention provides unified execution and control for all types of alarms. Through centralized control nodes, it achieves automatic skipping of holidays and global idempotent anti-duplicate measures. The same alarm event is executed only once a day, avoiding the problem of duplicate alarms caused by task re-issuance and concurrent scheduling.

[0053] Fourth, the present invention enables dynamic configuration of notification channels. Channel startup, shutdown, and changes only require modification of configuration fields, without requiring changes to the business code. Each notification channel independently captures exceptions, and failure of a single channel does not interfere with the delivery of notifications to other channels, making it flexible and easy to maintain.

[0054] Fifth, the present invention uses the same complete process framework for timed triggering and real-time MQ triggering, reuses all components across the entire chain, unifies the operation logic of the two types of alarms, and facilitates unified system iteration and operation and maintenance management. Attached Figure Description

[0055] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0056] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0057] Figure 1 This is a schematic diagram of a data alarm orchestration method based on a rule-driven process engine provided in Embodiment 1 of the present invention;

[0058] Figure 2This is a technical roadmap for a data alarm orchestration method based on a rule-driven process engine, as provided in Embodiment 1 of the present invention.

[0059] Figure 3 This is a schematic diagram of the dynamic chain orchestration structure of a data alarm orchestration method based on a rule-driven process engine provided in Embodiment 1 of the present invention;

[0060] Figure 4 Here is a class inheritance diagram for ACityOperAlertCalc, a data alarm orchestration method based on a rule-driven process engine, provided in Embodiment 1 of this invention.

[0061] Figure 5 This is a data alarm orchestration method based on a rule-driven process engine, DaWorkflowContext+WorkflowContext context data flow graph, provided in Embodiment 1 of the present invention.

[0062] Figure 6 This is a diagram illustrating the field structure of the alarm rule configuration DataAlertMonitorConfig, which is a data alarm orchestration method based on a rule-driven process engine provided in Embodiment 1 of the present invention.

[0063] Figure 7 This is a sequence diagram of multi-channel notification distribution for a data alarm orchestration method based on a rule-driven process engine provided in Embodiment 1 of the present invention.

[0064] Figure 8 This is a schematic diagram of a data alarm orchestration system based on a rule-driven process engine provided in Embodiment 1 of the present invention. Detailed Implementation

[0065] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] Example 1

[0067] See Figure 1 and Figure 2 This invention provides a data alarm orchestration method based on a rule-driven process engine, comprising:

[0068] S1. Receive alarm trigger events and obtain the unique identifier of the event type and query parameters;

[0069] Specifically, the system receives alarm trigger events through scheduled tasks / RabbitMQ messages, obtains the event type (event) field and query parameters. Scheduled tasks, based on Quartz / XXL-Job, implement periodic batch alarms, such as daily midnight execution of statistics on previous day's replenishment cycle anomalies and sales fluctuation anomalies, suitable for non-real-time, full-data scan alarms. RabbitMQ messages, based on a publish / subscribe model, implement event-driven real-time alarms, such as proactively pushing triggers when the billing system generates abnormal bills, suitable for sudden, single-data-item anomaly alarms. The event field is parsed as a unique identifier for the alarm type, used for subsequent matching of corresponding rule configurations; additional query parameters support dynamically specifying the alarm range, such as specific cities or specific device groups, improving alarm flexibility.

[0070] S2. Retrieve the centrally stored alarm rule configuration based on the unique identifier of the event type;

[0071] Specifically, DataAlertMonitorConfig is retrieved from MongoDB based on the event field; MongoDB is used to store alarm rule configurations, leveraging its document-oriented database unstructured nature to support flexible expansion of configuration fields, allowing the addition of alarm attributes without modifying the table structure; the event field is used as the unique index key for the MongoDB document, ensuring that each alarm type corresponds to a unique configuration record, thus decoupling configuration from business logic; centralized configuration management replaces traditional hard coding, supports dynamic configuration updates at runtime, and takes effect without restarting the service.

[0072] S3. Based on the rule process engine, dynamically construct the process execution expression according to the calculation component identifier in the alarm rule configuration, generate an alarm processing process chain with a fixed general skeleton and pluggable business nodes, and configure a unique process identifier to register as a temporary process instance.

[0073] Specifically, relying on the LiteFlow component ELBus, EL expressions are dynamically constructed based on the computation component ID in the configuration, generating a fixed-structure alarm processing workflow chain and registering it as a workflow chain with a unique workflowId. LiteFlow is a lightweight rule-driven workflow engine with the advantage of supporting dynamic workflow orchestration at runtime without the need for predefined workflow XML / JSON files. ELBus is a dynamic EL expression construction API provided by LiteFlow, which can dynamically insert business computation nodes based on the calculateComp (computation component ID) in the configuration, realizing a "general workflow skeleton and pluggable business nodes" architecture. The fixed workflow structure ensures that all alarm types reuse the same cross-cutting logic nodes, with only the business computation nodes being differentiated. A unique workflowId (usually event, timestamp, or random number) is generated to register a temporary chain, avoiding conflicts in the workflow definitions of different alarm tasks.

[0074] S4. Execute the global unified management logic, determine whether the alarm skipping condition is met, and implement global idempotent anti-duplicate based on the historical execution records of similar events; if the skipping condition is met, directly jump to the process termination step; otherwise, write to the pending execution record and calculate the time boundary of this alarm data query.

[0075] Specifically, conditionControlComp reads the holiday configuration table from MongoDB to determine whether to skip the holiday flag for the current day. Simultaneously, it queries historical execution records corresponding to the same event field for the same day to achieve idempotent anti-duplicate measures. If the execution flag has already been skipped, it jumps to finishComp; otherwise, it writes to the pending execution record and calculates the starting boundary of the current alarm data query based on the last execution time. MongoDB pre-stores statutory holidays and enterprise-defined time off tables, automatically skipping alarms on non-working days to avoid disturbing operations staff's rest. Idempotent anti-duplicate measures use event and execution date as unique primary keys to query execution records, preventing duplicate alarms caused by task re-issuance and concurrent scheduling. Data boundary calculation is based on the last alarm completion time to calculate the starting point of the current query, ensuring continuous, complete, and non-duplicate alarm data statistics.

[0076] S5. Load the associated data of the alarm responsibility entity and the business jurisdiction, build a two-way mapping relationship and inject it into the global process context for all nodes in the chain to share and call;

[0077] Specifically, daMonitorComp reads the city manager configuration from H3 Tritium Cloud MongoDB, associates it with the internal operations personnel permission table to build a two-way mapping relationship between the city and the operations personnel, and injects it into DaWorkflowContext. The test environment is then switched to the test personnel configuration.

[0078] H3 Tritium Cloud is a commonly used low-code platform for enterprises, used to uniformly maintain organizational structure and city operation manager permissions, avoiding the duplication of personnel data maintenance in the alarm system; it builds a two-way mapping between cities and operation personnel, supporting matching the corresponding person in charge by the city to which the alarm belongs, and also supporting querying all alarms in the cities under the jurisdiction of the person in charge; it adopts the LiteFlow context mechanism DaWorkflowContext to inject mapping data, realizing data sharing between nodes without passing through method parameters; it automatically identifies the production / test environment through the system environment variable active, and automatically replaces the recipient with the preset test personnel in the test environment, preventing test messages from being mistakenly sent to production and operation personnel.

[0079] S6. Load standardized alarm templates, start pluggable alarm calculation components in parallel, complete abnormal data retrieval and alarm content assembly by rewriting preset abstract methods, group and match corresponding responsible entities according to business jurisdiction to generate alarm notification objects in a unified format, and generate alarm detail attachments.

[0080] Specifically, dataTemplateComp loads the Excel template, and calculateComps starts in parallel the calculation nodes based on LiteflowComponent that inherit ACityOperAlertCalc. By overriding sreachAlertDatas and fillAlertContext, abnormal alarm data is retrieved, alarm text is assembled, and AlertNoticeBO is generated by matching the corresponding operators by city. Local temporary attachments are generated with the help of EasyExcel. Template and data are separated: the Excel template is pre-stored in OSS, and dataTemplateComp loads it according to the templateUrl in the configuration to unify the style of alarm attachments. The pluggable computing component defines an abstract base class ACityOperAlertCalc, which encapsulates common logic such as city grouping, personnel matching, and attachment generation. Adding new alarm types only requires implementing two abstract methods: sreachAlertDatas (business data query) and fillAlertContext (alarm text assembly). The when(calculateComps) method enables parallel execution of multiple computing components, improving the processing efficiency of multi-dimensional alarms. AlertNoticeBO is a unified alarm notification data transmission object that standardizes the output format of various alarm types. EasyExcel adopts a row-by-row read / write mode to avoid memory overflow issues when generating large files, making it suitable for generating attachments for massive device alarm data in the vending machine industry.

[0081] S7. Upload the alarm detail attachment to the distributed object storage and write back the access address to the alarm notification object, and at the same time persist the alarm master record and detail data in layers.

[0082] Specifically, storageComp uploads the local temporary attachment to OSS storage and writes back the OSS address to the AlertNoticeBO, while storing the alarm master record and alarm details in MongoDB. OSS object storage is suitable for storing large Excel attachments, providing highly available and scalable file storage services, avoiding the occupation of application server disk space. The OSS access address is written back to AlertNoticeBO for subsequent notification channels to reference, without needing to transmit the attachment itself in the notification message. Alarm data is stored in layers: the alarm master record stores overview information such as alarm ID, event type, trigger time, whether an alarm was triggered, and alarm summary for quick querying; the alarm detail record stores each specific abnormal data, such as abnormal device ID, abnormal value, and abnormal time, for subsequent problem investigation; MongoDB is suitable for storing unstructured alarm detail data, supporting flexible query conditions and horizontal scaling.

[0083] S8. Based on the notification policy configured in the alarm rules, perform independent fault-tolerant message distribution for the specified notification channels. If a single channel fails to send a message, it will not block the execution of other channels.

[0084] Specifically, daNoticeComp independently and fault-tolerantly distributes CMS tasks, RabbitMQ asynchronous emails, DingTalk robot messages, and DingTalk to-do task notifications based on the notificationMethod and sendType configurations. It dynamically enables / disables notification channels according to the sendType list configured in MongoDB's notificationMethod, without modifying business code. Each notification channel adds independent try-catch exception handling logic; single-channel sending failures only log, without blocking other channels, ensuring the reliability of alarm notifications. CMS tasks generate to-do tasks for internal operations systems, supporting task flow and processing status tracking. Asynchronous emails are delivered asynchronously via RabbitMQ, avoiding synchronous sending blocking the alarm process. DingTalk robot messages push alarm summaries in real time, supporting @mentioning specific personnel. DingTalk to-do tasks allow setting task deadlines and executors, and enforce alarm logic handling.

[0085] S9. Update the final state of the alarm execution record and destroy the temporarily generated process instance to release system memory resources.

[0086] Specifically, finishComp updates the alarm execution record status, changing it from pending execution to executed, and destroys the current dynamic chain using FlowBus.removeChain to release memory. The execution record status is updated from "pending execution" to "executed" for subsequent idempotency judgment and execution auditing. At the same time, the alarm master record status is updated to "completed / skipped / failed" for easy statistics on alarm execution. Since the chain for each alarm task is generated temporarily at runtime, it is actively destroyed by FlowBus.removeChain after execution to avoid memory leaks caused by the accumulation of process definitions. This is the standard resource release method in LiteFlow dynamic orchestration scenarios.

[0087] In one possible embodiment, in S1, the message middleware includes RabbitMQ, Kafka, and RocketMQ.

[0088] Specifically, the message middleware's role is to achieve asynchronous decoupling of alarm triggering. Different middleware are suitable for different business scenarios: RabbitMQ is suitable for low-latency, high-reliability message delivery, supports dead-letter queues and message retries, and is the default choice in this invention; Kafka is suitable for high-throughput, massive data scenarios, and is applicable to automated vending clusters with extremely large amounts of reported data from devices; RocketMQ supports transactional messages and timed messages, and is suitable for alarm scenarios that require strict guarantees of message order and transaction consistency. Replacing the message middleware only requires modifying the message listening and sending configurations, without affecting the main alarm orchestration process.

[0089] In one possible embodiment, in S2, the database includes a MongoDB document-oriented database, a MySQL / PostgreSQL relational database, and a Redis / Nacos configuration center.

[0090] Specifically, different storage media are suited to different configuration management needs. MySQL / PostgreSQL is suitable for structured configuration storage, supports transactions and complex queries, and is suitable for scenarios with low configuration change frequency. Redis is suitable for high-frequency read configuration caching, and commonly used alarm rules can be cached in Redis to improve configuration loading speed. Nacos professional configuration center supports configuration hot updates, canary releases, and configuration version management, and is suitable for unified configuration management of large-scale distributed systems. Replacing the storage media only requires adjusting the rule loading logic; the main process orchestration logic remains unchanged.

[0091] In one possible embodiment, in S2, the alarm rule configuration DataAlertMonitorConfig includes the alarm level, the computing component ID, the template URL, the notification method noticeMethod, and the specified recipient configuration receiveTarget.

[0092] Specifically, the alarm level is used to distinguish alarm priorities. Higher priority alarms can be configured with more notification channels and shorter processing deadlines; the calculation component ID specifies the business calculation node corresponding to the alarm type and is the main field for dynamic orchestration; the template URL specifies the storage address of the Excel template for the alarm attachment; the notification method (noticeMethod) configures the enabled notification channels and channel parameters, such as the CMS task template ID and the DingTalk robot Webhook address; the recipient configuration (receiveTarget) configures the list of alarm recipients, supporting configuration by role, city, and specified personnel.

[0093] In one possible embodiment, in S3, the process engine includes the rule-based process engine LiteFlow, the BPMN process engine Activiti, and the BPMN process engine Flowable / state machine SpringStateMachine.

[0094] The EL expression is:

[0095] startComp→ifOpt(conditionControlComp,finishComp,then(daMonitorComp,dataTemplateComp,when(calculateComps),storageComp,daNoticeComp,finishComp)).

[0096] Specifically, different workflow engines have different applicable scenarios. Activiti / Flowable, based on the BPMN 2.0 standard, is suitable for complex, long workflows and manually-assisted approval processes; it is powerful but relatively heavy. SpringStateMachine is suitable for simple state transition scenarios; it is lightweight but has limited orchestration capabilities. LiteFlow, a lightweight rule-driven engine, is specifically optimized for short workflow orchestration in microservice architectures, supporting runtime dynamic EL expression construction, and is the optimal choice for this invention. The EL expression structure is as follows: startComp is the workflow startup node, initializing the context; ifOpt(conditionControlComp, finishComp, then(...)) is the conditional branch node; if the skip condition is met, finishComp is executed to terminate the workflow; otherwise, subsequent business nodes are executed; when(calculateComps) is the parallel node, executing multiple computational components simultaneously; finishComp is the workflow end node, responsible for resource release and state updates.

[0097] In one possible embodiment, in S4, the formula for calculating the starting boundary of the alarm data query is:

[0098]

[0099] In the formula, This is the start date for querying the alarm data. The date of completion of the last alarm execution for the same event type. The date on which this alarm was triggered is the calendar date.

[0100] Specifically, this formula ensures the continuity and uniqueness of alarm data statistics. The starting point for this query is the day after the last alarm completion date, avoiding duplicate statistics of already alarmed data; the ending point is the trigger date, ensuring statistics are up to the latest data. If this is the first time this alarm type has been executed... The default value is the day before the alarm rule was created.

[0101] In one possible embodiment, in S5, the city manager is configured to read from H3 Tritium Cloud MongoDB / access the internal RBAC permission system / statically specify the recipient in the alarm rule configuration DataAlertMonitorConfig;

[0102] The two-way mapping and matching formula between the city and the operators is as follows:

[0103]

[0104] In the formula, This is the set of cities to which the alarm data belongs. For operators The collection of cities under their responsibility This is a complete list of operations personnel who need to receive push notifications for the current alarm.

[0105] Specifically, the three personnel configuration methods are adapted to different enterprise architectures. H3 Tritium Cloud Synchronization is suitable for enterprises whose organizational structure is uniformly maintained on a low-code platform; the internal RBAC permission system is suitable for enterprises with existing mature permission management systems, directly reusing existing personnel permission data; static specification is suitable for small teams or temporary alarm scenarios, directly specifying the recipient in the rule configuration. The mapping formula enables precise alarm push, sending alarm notifications only to the operations personnel responsible for the corresponding city, avoiding irrelevant personnel receiving redundant alarms.

[0106] In one possible embodiment, in S6, the local temporary attachment is generated using EasyExcel / CSV / PDF;

[0107] The mathematical formula for determining the abnormal alarm threshold is:

[0108]

[0109] In the formula, For raw data of a single business transaction, The data corresponds to the actual values ​​of the business metrics. , The upper and lower limits of the metrics configured for MongoDB. This is the dataset of alarms that meet the abnormal conditions after filtering.

[0110] Specifically, different attachment formats have their applicable scenarios: CSV, a lightweight text format, can be opened without relying on Excel and is suitable for alarms with small data volumes; PDF, a non-editable format, is suitable for formal alarm reports that need to be archived; and Excel files generated by EasyExcel support complex styles, formulas, and charts, making it the mainstream format for alarm attachments in the vending machine industry. The threshold determination formula unifies the abnormal data filtering logic: all alarm types use the criterion of "whether the indicator value exceeds the configured threshold range," ensuring consistency in the abnormal judgment logic; the threshold can be dynamically configured in MongoDB without modifying the code.

[0111] In one possible embodiment, in S8, the channel notification further includes enumerating and extending the enterprise WeChat, Lark, and SMS channels by SendTypeEnum, where sendType is configured to distribute notifications, and each notification channel is configured with independent exception handling logic, so that failure to send a notification to a single channel does not block the delivery to other channels.

[0112] Specifically, the open / closed principle of notification channels is implemented using an enumeration extension pattern. When adding a new channel, only an enumeration value needs to be added to SendTypeEnum, and the message construction and sending methods for the corresponding channel need to be added to daNoticeComp. There is no need to modify the original distribution logic. An independent exception capture mechanism ensures the high availability of alarm notifications. Even if a channel, such as DingTalk service, is temporarily unable to send, other channels, such as SMS and email, can still push normally, ensuring that operations personnel receive alarms in a timely manner.

[0113] See Figure 3 This diagram illustrates the main mechanism of runtime dynamic process orchestration based on LiteFlow in this invention. The overall process starts with alarm triggering, initially supporting two triggering modes: timed scheduling and MQ messages, covering two business scenarios: periodic batch alarms and event-driven real-time alarms. After triggering, the system's first step is to load the alarm rule configuration stored in MongoDB's DataAlertMonitorConfig, where the calculateComp field is the main basis for dynamic orchestration, used to determine the specific business calculation nodes inserted in subsequent processes.

[0114] The ELBus dynamic orchestration area is marked as runtime-built, unlike the traditional predefined process mode. The system does not pre-define a fixed process structure; the process chain is dynamically assembled only when each alarm task is executed. The process starts from the startComp node, which completes the process context initialization and basic parameter verification. Then, it enters the conditionControlComp execution control node, and the process is routed through ifOpt conditional branches: if it is determined that the day is a holiday or the alarm type has already been executed on the same day, it directly jumps to the finishComp node to terminate the process; otherwise, it continues to execute subsequent business nodes.

[0115] After execution control, the process sequentially executes the daMonitorComp city manager node and the dataTemplateComp template initialization node. The former loads city operation permission data from H3 Tritium Cloud and constructs a two-way mapping to inject into the process context, while the latter loads a preset Excel alarm attachment template. Then, it enters the when(calculateComps) parallel computing node, which dynamically inserts the corresponding business alarm calculation components according to the configured calculateComp field, supports the parallel execution of multi-dimensional alarm tasks, and is the main carrier of the pluggable expansion mechanism of this invention.

[0116] After the calculation is completed, the process enters the storageComp node, which uploads the generated alarm detail attachments to OSS object storage, and persists the alarm master record and detail data to MongoDB. Then, the daNoticeComp multi-channel notification node independently and fault-tolerantly distributes CMS tasks, emails, DingTalk robot messages, DingTalk to-dos and other notifications according to the configured sendType list. Finally, the finishComp node marks the end of the process and updates the alarm execution status.

[0117] After the process is completed, the system calls the FlowBus.removeChain(workflowId) interface to destroy the dynamically generated temporary chain. The note at the bottom of the figure clearly states that each alarm registers a temporary process with a unique workflowId and destroys it immediately after execution. This fundamentally avoids the memory leak problem caused by the accumulation of dynamic process definitions and ensures the long-term stability of the system.

[0118] See Figure 4 The diagram illustrates the main inheritance hierarchy of the pluggable alarm calculation component of this invention. The top layer inherits from the native NodeComponent base class of the LiteFlow workflow engine, ensuring that all alarm calculation nodes can be directly registered as LiteFlow standard components and seamlessly integrated into dynamically orchestrated workflow chains. The middle layer is the generic abstract base class ACityOperAlertCalc. <t>It is the unified parent class for all business alarm calculation classes. This base class defines only two abstract methods that must be implemented by subclasses: sreachAlertDatas is used to retrieve abnormal business data that meets the threshold conditions, and fillAlertContext is used to assemble the text content of alarm notifications. These two methods constitute the minimal extension interface for adding new alarm types, realizing the decoupling of business logic and general processes.

[0119] Five specific business alarm implementation classes are derived from the base class, each corresponding to a typical alarm scenario in the vending machine industry: AlertCycleReplenishCalc for abnormal replenishment cycle alarms, NotSoldOutAlertCalc for alarms on slow-moving goods, AlertLackingCapacityCalc for alarms on out-of-stock equipment capacity alarms, AlertMnoSaleCalc for alarms on abnormal sales at vending locations, and AlertBillRepeatCalc for alarms on duplicate bills. This demonstrates the reusability of the abstract base class in different business alarm scenarios.

[0120] The yellow area at the bottom of the diagram highlights the pre-encapsulated common process logic in the ACityOperAlertCalc base class. This includes grouping abnormal data by city, mapping and matching responsible parties based on the city and operations personnel within the process context, populating alarm details into an Excel template to generate attachments, assembling a standardized AlertNoticeBO alarm notification object, and writing the final alarm data into the DaWorkflowContext business context for reuse by subsequent nodes. This design decentralizes all common logic shared by all alarm types to the base class. When adding new alarm types, there's no need to redevelop these processes; simply implementing two abstract methods and registering the component ID in MongoDB is sufficient to access the complete alarm chain, significantly reducing the expansion cost of alarm services.

[0121] See Figure 5 The figure illustrates the main mechanism of data pass-through between two-layer context nodes based on LiteFlow in this invention. It is divided into a context data structure definition area on the left and a process node data flow area on the right, presenting the data read / write logic and sharing method of each node in the entire process. The left side is divided into two independent context containers. The WorkflowContext serves as the request data layer, storing common basic parameters at the process engine level, including the workflowId and workflowType that uniquely identify the process instance, the active environment identifier that distinguishes between production and testing environments, the lastQueryDate data query start point calculated by the conditionControlComp node, the skipOrNot flag that indicates whether the process has been skipped, and the original request data of alertDataRealtimeDTO in real-time alarm scenarios. The DaWorkflowContext serves as the business context layer, storing the main data related to alarm business, including the monitorConfig alarm rule configuration loaded from MongoDB, the monitorRecord execution record that records the process execution status, the cityOperators city-to-operators mapping and the two-way mapping of operators to cities generated by the daMonitorComp node, the alertNotices alarm notification list generated by the calculateComps node, and business fields such as alarm notes and DingTalk to-do deadlines.

[0122] The right-hand flow nodes, from top to bottom, sequentially illustrate the data flow between nodes. The `startComp` node initializes two contexts, writing the basic parameters from the trigger request into the `WorkflowContext`. The `conditionControlComp` node reads the context's basic parameters, performs holiday validation and idempotency checks, and writes `lastQueryDate`, `skipOrNot`, and `monitorRecord` into the corresponding contexts. The `daMonitorComp` node loads city managers, reads configuration information, generates a bidirectional personnel mapping relationship, and writes it into the `DaWorkflowContext` for reuse by all subsequent business nodes. The `dataTemplateComp` node loads the template initialization process. After the Excel template is configured, the process enters the calculateComps parallel alarm calculation node. Multiple calculation components simultaneously write the generated alarm notification objects and alarm notes into the alertNotices list of DaWorkflowContext. The storageComp result storage node reads the alertNotices data, uploads the generated Excel attachments to OSS, and writes the ossUrl back to the corresponding object of alertNotices. The daNoticeComp multi-channel notification node directly reads the alertNotices and noticeMethod configuration in the context to complete multi-channel message distribution. Finally, the finishComp process termination node updates the execution record status to complete the entire process.

[0123] The bottom note of the diagram explains that the two Contexts are shared globally among all nodes through LiteFlow's native context mechanism. Nodes do not need to pass any data through method parameters, decoupling the dependencies between process nodes. Each node only needs to focus on its own context reading and writing logic. Adding a new node does not require modifying the parameter passing code of the existing node. At the same time, it supports multiple computing components writing context data in parallel, which greatly improves the scalability and parallel processing efficiency of the process.

[0124] See Figure 6 The figure shows the complete field structure of the configuration entity DataAlertMonitorConfig of this invention. This configuration is stored in MongoDB in the form of a document and is the main carrier for implementing alarm configuration-driven extensions. The main configuration table on the left contains nine main fields. `title` is a string representing the alarm rule title, used by the operations and maintenance interface to identify different alarms. `level` is an integer representing the alarm level, divided into four levels from P0 to P3, used to distinguish alarm priorities. `event` is a string representing a unique identifier for the event type, serving as the primary key to match the corresponding configuration when the alarm is triggered, and corresponding one-to-one with the `event` field carried by the triggering event. `eventObj` is a string representing the alarm object description, used to supplement the description of the business object monitored by the alarm. `calculateComp` is a string representing the compute node component ID, a key field for runtime dynamic process orchestration, used to specify the business compute component corresponding to this alarm type. `templateUrl` is the OSS storage address of the Excel alarm template, and `templateSheet` is the sheet name corresponding to the template, both used to generate standardized alarm attachments. `alertContext` is a string representing the general alarm description text. `noticeMethod` and `receiveTarget` are nested object types, storing the notification method and recipient configuration, respectively.

[0125] The top right side shows the NoticeMethodField sub-object structure, containing two fields: taskCode and otherPlatform. taskCode is the CMS task template ID, used to generate to-do tasks for the internal operations system. otherPlatform is an enumerated list of sending channels, identified by numbers corresponding to different notification channels: 1 for CMS tasks, 2 for emails, 3 for DingTalk to-dos, and 4 for DingTalk messages. Multiple channels can be enabled simultaneously. The bottom right side shows the ReceiveTarget sub-object structure, differentiating between production and testing environment configurations. The production environment includes mailAccounts (production email list), dingUnionIds (DingTalk group unionId list), and dingAlertIds (DingTalk robot @person ID list). The testing environment corresponds to testMailAccounts (test email list), testDingUnionIds (test DingTalk group list), and testDomainIds (test operations personnel ID list). The system will switch the corresponding recipient based on the environment identifier to avoid test messages being mistakenly sent to production operations personnel.

[0126] The yellow area at the bottom of the diagram clearly marks the two main fields of the runtime process orchestration: calculateComp determines the business calculation node inserted in the process, and noticeMethod determines the enabled notification channel. Both fields support real-time updates in MongoDB, allowing alarm behavior to be switched immediately without restarting the service, demonstrating the configuration-driven and dynamic flexibility advantages of this invention.

[0127] See Figure 7 This diagram illustrates the complete timeline of the unified multi-channel notification distribution of this invention. Participants include the main distribution node daNoticeComp, the CMS task platform, the RabbitMQ email queue, the DingTalk robot, and the DingTalk to-do system. It presents the calling order, triggering conditions, and fault tolerance mechanisms for each channel. The process begins with daNoticeComp reading the alertNotices list and noticeMethod configuration from the DaWorkflowContext business context. It then iterates through the sendType channel list in the configuration, processing each enabled notification channel in sequence.

[0128] First, the CMS task channel is processed. The trigger condition is that the taskCode in the configuration is not empty. daNoticeComp calls the buildCMS method to construct an internal to-do task containing the OSS attachment path and sends it to the CMS task platform via the sendCMS interface. The platform returns a response indicating successful task creation. Next, the email channel is processed. The trigger condition is that the MAIL channel is enabled. daNoticeComp calls buildMail to assemble the email content and attachment information and writes the email to the RabbitMQ mailOutputChannel asynchronous queue via sendMail. The queue returns a response indicating successful delivery. This asynchronous delivery method avoids email sending delays that could block the overall alarm process. Finally, the DingTalk robot message channel is processed. The trigger condition is that the DING_MSG channel is enabled. daNoticeComp calls buildDingMsg to construct the alarm message body and sends it to the specified DingTalk robot via the DingDingFeign interface using sendRobotMsg. The system returns a result indicating successful message delivery or exception capture. Finally, the DingTalk to-do task channel is processed. The trigger condition is that the DING_TODO channel is enabled. daNoticeComp calls buildDingTodo to set the task executor and deadline, creates the to-do task through the sendDingTodo interface, and returns the result of task creation success or exception capture.

[0129] The right side of the diagram indicates the activation conditions for each channel, while the yellow area at the bottom emphasizes the main fault-tolerance design of this invention: each notification channel is configured with independent try-catch exception handling logic. When a single channel throws an exception, only an error log is recorded, and the sending process of the next channel continues without interrupting the overall notification distribution. The daNoticeComp node only returns after all channels have finished processing. This independent fault-tolerance mechanism ensures the high availability of alarm notifications. Even if one channel experiences a temporary failure, other channels can still push alarms normally, ensuring that operations personnel receive abnormal information in a timely manner.

[0130] The application scenarios of this invention are as follows:

[0131] This system provides alarm scenarios for out-of-stock and replenishment cycle anomalies across all SKUs in automated vending machines. It is applicable to retail operations and maintenance processes such as headquarters operations management platforms, regional location maintenance systems, and supply chain warehousing management systems. It adapts to multi-source business data, including vending machine inventory reporting MQ data streams, daily scheduled inventory count data tables, and warehouse replenishment order databases. Business triggers are categorized into scheduled daily inventory counts and real-time MQ push notifications for equipment inventory changes. The system relies on MongoDB to centrally configure alarm thresholds and notification rules for various SKUs. It dynamically orchestrates alarm processes through LiteFlow, centrally managing holiday skipping and duplicate execution to prevent duplicate behavior. Based on abstract computing components, it filters out-of-stock and replenishment timeout data, automatically matching corresponding operations personnel by city to generate alarm messages with Excel attachments. It leverages dynamic start / stop of CMS, DingTalk, and email notifications to meet the vending industry's needs for rapidly adding new category alarm rules, unified management of out-of-stock alerts across all locations, avoiding repeated harassment of operations personnel, and flexible adjustment of notification recipients and push channels.

[0132] Real-time alarm scenario for revenue reconciliation anomalies in vending terminals: Applicable to financial operations and maintenance processes such as self-service vending financial reconciliation systems, fund settlement management platforms, and store revenue monitoring systems. It is compatible with real-time bill MQ messages from payment gateways, daily settlement timed revenue data tables, and third-party reconciliation receipt data. When a bill anomaly occurs, the payment system pushes an MQ message to trigger an alarm. Operations and maintenance personnel configure the bill difference threshold, recipient, and push channel in MongoDB. The engine dynamically assembles a dedicated alarm process during runtime. The unified execution node automatically intercepts reconciliation verification on holidays and non-working days. The calculation component differentiates to realize the retrieval of anomalies such as overage / underage payments, missing orders, and duplicate payments. Attachments automatically summarize the details of abnormal bills and upload them to OSS. Alarm messages are sent independently and with fault tolerance from multiple channels, meeting the needs of the financial end for quickly adding reconciliation anomaly types, unified anti-duplicate bill alarms, flexible channel configuration, and reduced financial reconciliation investigation time.

[0133] Real-time monitoring and alarm scenarios for offline faults in self-service vending machines: Applicable to equipment operation and maintenance processes such as IoT device operation and maintenance platforms, vending machine hardware monitoring systems, and location operation and maintenance dispatch management systems. It is compatible with offline MQ heartbeat data reporting, scheduled online device status inspection datasets, and hardware fault error messages. The IoT platform pushes MQ to trigger real-time alarms the moment a device disconnects, and also supports daily scheduled full inspection triggers. It dynamically generates process links based on rule configuration, and uses unified idempotent control to avoid repeated alarms due to instantaneous disconnections. The calculation component filters offline devices and binds them to operation and maintenance personnel according to their cities. The attachment summarizes the fault location list. According to the configuration, alarms can be sent through channels such as DingTalk to-do list, internal CMS dispatch, and SMS. It meets the needs of equipment operation and maintenance to quickly expand new fault alarm types, uniformly manage repeated fault reminders, switch notification methods as needed, and realize rapid logical dispatch of faults.

[0134] Regional store sales data fluctuation anomaly operation and maintenance alarm scenario: Applicable to operation and management links such as vending machine operation analysis platform, regional operation management system, and sales data analysis system. It is compatible with daily scheduled full sales statistics table, real-time sales MQ data stream of promotional activities, and business details data by city dimension; it supports daily scheduled batch statistics at midnight and dual-trigger mode of real-time change of promotional orders MQ. Adding a new sales fluctuation alarm only requires the implementation of two abstract business methods and entry of MongoDB rules. The process uniformly reuses common nodes such as holiday filtering, personnel mapping, and attachment generation. It automatically filters abnormal data of sudden increase or decrease in sales and pushes it to the corresponding regional operation. It can flexibly configure notification channels such as DingTalk robot / internal task platform to meet the needs of the operation side to quickly launch multi-dimensional sales warnings, unify the alarm criteria of the whole region, change alarm push channels as needed, and reduce the workload of repetitive development.

[0135] Marketing campaign ROI anomaly data analysis and alerting scenarios: Applicable to marketing operations and maintenance processes such as retail marketing management platforms, campaign performance review systems, and market expense control systems. Adapted to real-time MQ data streams for campaign orders, daily marketing cost statistics tables, and coupon redemption detail databases; real-time MQ triggering of campaign order redemption changes, and daily ROI calculation at midnight; relying on the configurable rules of this invention to manage alarm parameters for different campaign types, dynamic process orchestration without modifying the underlying framework, centralized execution nodes to prevent repeated alarms for the same campaign in a short period of time, and the calculation component automatically calculates the ROI ratio and filters abnormal campaign data, generating detailed attachments and distributing them to market managers through multiple channels, meeting the marketing end's needs for quickly adding different campaign warning rules, low-cost iteration of alarm logic, dynamic adjustment of notification recipients and push channels, and precise control of marketing loss-making projects.

[0136] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and these multiple devices will interact with each other to complete the data alarm orchestration method based on a rule-driven process engine.

[0137] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0138] Example 2

[0139] See Figure 8 Embodiment 2 of the present invention also provides a data alarm orchestration system based on a rule-driven process engine, which employs the above-described data alarm orchestration method based on a rule-driven process engine, including:

[0140] Alarm trigger event receiving unit 100: used to receive alarm trigger events, obtain the unique identifier of the event type and query parameters;

[0141] Alarm rule configuration loading unit 200: used to retrieve centrally stored alarm rule configurations based on the unique identifier of the event type;

[0142] The dynamic orchestration LiteFlow process chain unit 300 is used to dynamically construct process execution expressions based on the calculation component identifier in the alarm rule configuration, relying on the rule process engine, to generate an alarm processing process chain with a fixed general skeleton and pluggable business nodes, and to register a unique process identifier as a temporary process instance.

[0143] Execution control node judgment unit 400: It is used to execute the global unified management and control logic, determine whether the alarm skipping condition is met, and realize global idempotent anti-duplicate based on the historical execution record of the same type of event; if the skipping condition is met, it directly jumps to the process termination step; otherwise, it writes to the pending execution record and calculates the time boundary of this alarm data query.

[0144] Load City Operations Manager Relationship Unit 500: Used to load the association data between the alarm responsibility entity and the business jurisdiction, build a two-way mapping relationship and inject it into the global process context for all nodes in the chain to share and call;

[0145] Alarm data calculation unit 600: used to load standardized alarm templates, start pluggable alarm calculation components in parallel, complete abnormal data retrieval and alarm content assembly by rewriting preset abstract methods, group and match the corresponding responsible entities according to business jurisdiction to generate alarm notification objects in a unified format, and generate alarm detail attachments.

[0146] Alarm result storage unit 700: used to upload the alarm detail attachments to the distributed object storage and write back the access address to the alarm notification object, and at the same time persist the alarm master record and detail data in layers;

[0147] Multi-channel distribution notification unit 800: Used to perform independent fault-tolerant message distribution to designated notification channels according to the notification policy configured in the alarm rules. The failure of a single channel to send the message will not block the execution of other channels.

[0148] Process End and Resource Release Unit 900: Used to update the final state of the alarm execution record and destroy the dynamically generated temporary process instance to release system memory resources.

[0149] It should be noted that the information interaction and execution process between the modules of the above-mentioned device are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.

[0150] Example 3

[0151] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code for a data alarm orchestration method based on a rule-driven process engine. The program code includes instructions for executing the data alarm orchestration method based on a rule-driven process engine according to Embodiment 1 or any possible implementation thereof.

[0152] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0153] Example 4

[0154] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0155] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can execute a data alarm orchestration method based on a rule-driven process engine according to Embodiment 1 or any possible implementation thereof.

[0156] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0157] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0158] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0159] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.< / t>

Claims

1. A data alarm orchestration method based on a rule-driven process engine, characterized in that, include: S1. Receive alarm trigger events and obtain the unique identifier of the event type and query parameters; S2. Retrieve the centrally stored alarm rule configuration based on the unique identifier of the event type; S3. Based on the rule process engine, dynamically construct the process execution expression according to the calculation component identifier in the alarm rule configuration, generate an alarm processing process chain with a fixed general skeleton and pluggable business nodes, and configure a unique process identifier to register as a temporary process instance. S4. Execute the global unified management logic, determine whether the alarm skipping condition is met, and implement global idempotent anti-duplicate based on the historical execution records of similar events; if the skipping condition is met, directly jump to the process termination step; otherwise, write to the pending execution record and calculate the time boundary of this alarm data query. S5. Load the associated data of the alarm responsible entity and the business jurisdiction, build a two-way mapping relationship and inject it into the global process context for all nodes in the chain to share and call; S6. Load standardized alarm templates, start pluggable alarm calculation components in parallel, complete abnormal data retrieval and alarm content assembly by rewriting preset abstract methods, group and match corresponding responsible entities according to business jurisdiction to generate alarm notification objects in a unified format, and generate alarm detail attachments. S7. Upload the alarm detail attachment to the distributed object storage and write back the access address to the alarm notification object, and at the same time persist the alarm master record and detail data in layers. S8. Based on the notification policy configured in the alarm rules, perform independent fault-tolerant message distribution for the specified notification channels. If a single channel fails to send a message, it will not block the execution of other channels. S9. Update the final state of the alarm execution record and destroy the temporarily generated process instance to release system memory resources.

2. The data alarm orchestration method based on a rule-driven process engine according to claim 1, characterized in that, In S1, the system receives alarm trigger events through timed scheduling tasks / RabbitMQ messages, and obtains the event type field (event) and query parameters; the message middleware includes RabbitMQ, Kafka, and RocketMQ.

3. The data alarm orchestration method based on a rule-driven process engine according to claim 2, characterized in that, In S2, DataAlertMonitorConfig is retrieved from MongoDB based on the event field. The databases include MongoDB document-oriented database, MySQL / PostgreSQL relational database, and Redis / Nacos configuration center.

4. The data alarm orchestration method based on a rule-driven process engine according to claim 3, characterized in that, In S2, the alarm rule configuration DataAlertMonitorConfig includes the alarm level, the calculation component ID, the template URL, the notification method noticeMethod, and the specified recipient configuration receiveTarget.

5. The data alarm orchestration method based on a rule-driven process engine according to claim 4, characterized in that, In S3, relying on the component ELBus of the LiteFlow workflow engine, EL expressions are dynamically constructed based on the computation component ID in the configuration, generating a fixed-structure alarm processing workflow chain and configuring a unique workflowId to register as a workflow chain; The process engines include the rule-based process engine LiteFlow, the BPMN process engine Activiti, and the BPMN process engine Flowable / state machine SpringStateMachine; The EL expression is: startComp→ifOpt(conditionControlComp,finishComp,then(daMonitorComp,dataTemplateComp,when(calculateComps),storageComp,daNoticeComp,finishComp)).

6. The data alarm orchestration method based on a rule-driven process engine according to claim 5, characterized in that, In S4, conditionControlComp reads the holiday configuration table from MongoDB to determine whether to skip the holiday flag for the current day. Simultaneously, it queries the historical execution records corresponding to the same event field for the current day to achieve idempotent anti-duplicate behavior. If the execution flag has already been skipped, it jumps to finishComp; otherwise, it writes to the pending execution record and calculates the starting boundary for this alarm data query based on the last execution time. The formula for calculating the starting boundary for the alarm data query is: In the formula, This is the start date for querying the alarm data. The date of completion of the last alarm execution for the same event type. The date on which this alarm was triggered is the calendar date.

7. The data alarm orchestration method based on a rule-driven process engine according to claim 6, characterized in that, In S5, daMonitorComp reads the city manager configuration from H3 Tritium Cloud MongoDB, associates it with the internal operations personnel permission table to build a two-way mapping relationship between the city and the operations personnel, and injects it into DaWorkflowContext. The test environment is switched to the test personnel configuration. The city manager configuration is read from H3 Tritium Cloud MongoDB / accessed through the internal RBAC permission system / statically specifies the recipient in the alarm rule configuration DataAlertMonitorConfig. The two-way mapping and matching formula between the city and the operators is as follows: In the formula, This is the set of cities to which the alarm data belongs. For operators The collection of cities under their responsibility This is a complete list of operations personnel who need to receive push notifications for the current alarm.

8. The data alarm orchestration method based on a rule-driven process engine according to claim 7, characterized in that, In S6, dataTemplateComp loads the Excel template, and calculateComps starts in parallel the calculation nodes based on LiteflowComponent that inherit ACityOperAlertCalc. By overriding sreachAlertDatas and fillAlertContext, abnormal alarm data is retrieved and alarm text is assembled. AlertNoticeBO is generated by matching the corresponding operators by city group, and local temporary attachments are generated with the help of EasyExcel. The local temporary attachments are generated using EasyExcel / CSV / PDF. The mathematical formula for determining the abnormal alarm threshold is: In the formula, For raw data of a single business transaction, The data corresponds to the actual values ​​of the business metrics. , The upper and lower limits of the metrics configured for MongoDB. This is the dataset of alarms that meet the abnormal conditions after filtering.

9. The data alarm orchestration method based on a rule-driven process engine according to claim 1, characterized in that, In S7, storageComp uploads the local temporary attachment to OSS storage and writes back the OSS address to the AlertNoticeBO, while storing the alarm master record and alarm details in MongoDB; In S8, daNoticeComp independently and faultily distributes CMS tasks, RabbitMQ asynchronous emails, DingTalk robot messages, and DingTalk to-do task channel notifications based on the notificationMethod and sendType configurations. The channel notifications also include WeChat Work, Lark, and SMS channels enumerated by SendTypeEnum. The sendType configuration distributes the notifications, and each notification channel is configured with independent exception handling logic. If a single channel fails to send, it will not block the delivery of other channels. In S9, finishComp updates the alarm execution record status, changing the status from pending execution to executed, and destroys the current dynamic chain through FlowBus.removeChain to release memory.

10. A data alarm orchestration system based on a rule-driven process engine, employing the data alarm orchestration method based on a rule-driven process engine as described in any one of claims 1-9, characterized in that, include: Alarm Trigger Event Receiver: Used to receive alarm trigger events and obtain the unique identifier of the event type and query parameters; Alarm rule configuration loading unit: used to retrieve centrally stored alarm rule configurations based on the unique identifier of the event type; Dynamically orchestrated LiteFlow process chain unit: Based on the rule process engine, it dynamically constructs process execution expressions according to the calculation component identifier in the alarm rule configuration, generates alarm processing process chain with a fixed general skeleton and pluggable business nodes, and configures a unique process identifier to register as a temporary process instance. Execution control node judgment unit: used to execute the global unified management and control logic, determine whether the alarm skipping condition is met, and realize global idempotent anti-duplicate based on the historical execution record of the same type of event; if the skipping condition is met, it directly jumps to the process termination step; otherwise, it writes to the pending execution record and calculates the time boundary of this alarm data query. Load City Operations Manager Relationship Unit: Used to load the associated data between the alarm responsible entity and the business jurisdiction, build a two-way mapping relationship and inject it into the global process context for all nodes in the chain to share and call; Alarm data calculation unit: used to load standardized alarm templates, start pluggable alarm calculation components in parallel, complete abnormal data retrieval and alarm content assembly by rewriting preset abstract methods, group and match the corresponding responsible entities according to business jurisdiction to generate alarm notification objects in a unified format, and generate alarm detail attachments. Alarm Result Storage Unit: Used to upload the alarm detail attachments to the distributed object storage and write back the access address to the alarm notification object, while also persistently storing the alarm master record and detail data in layers; Multi-channel distribution notification unit: Used to perform independent fault-tolerant message distribution to specified notification channels according to the notification policy configured in the alarm rules. The failure of sending a message to a single channel will not block the execution of other channels. Process End and Resource Release Unit: Used to update the final state of the alarm execution record and destroy the dynamically generated temporary process instance to release system memory resources.