Unlock instant, AI-driven research and patent intelligence for your innovation.

Real-time rule engine control method and system based on Flink and medium

A control method and rule technology, applied in the field of big data-real-time computing, can solve problems such as poor stability and affecting the performance of frequent query of business data, and achieve the effect of improving stability, timeliness and accuracy

Pending Publication Date: 2022-03-25
SICHUAN XW BANK CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem to be solved by the present invention is that most of the existing rule engines use external storage, have many interactions with the outside, and have frequent input and output (IO) operations, which seriously affect the performance of frequent query of business data, poor stability, and business data cannot Implement real-time self-adaptive new rules

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Real-time rule engine control method and system based on Flink and medium
  • Real-time rule engine control method and system based on Flink and medium
  • Real-time rule engine control method and system based on Flink and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] Such as figure 1 , figure 2 As shown, the present invention is based on Flink's real-time rule engine control method, such as figure 1 As shown, the method includes:

[0044] S1, receiving an event source in real time and configuring a real-time rule for the event source;

[0045] S2. After configuring the real-time rules, use the Flink streaming real-time computing engine to store the event source internally, and store the event stream and rule stream data in the form of key-value;

[0046] S3 uses the Flink streaming real-time computing engine to connect event streams and rule streams for dynamic grouping; for each event stream: according to the received rule stream and the fields that need to be grouped in the rule stream, use the Java reflection mechanism to obtain a specific value , to form a new event and send it to the downstream operator for processing; the downstream receives the new event, and performs dynamic keyBy grouping according to this value. After ...

example 1

[0064]

[0065] Table 1 is converted into rule flow input: 1,Active,Name,Amount,Sum,>,5000,20, translated into Chinese means: group by name, accumulate by amount field, and send an alert if the amount exceeds 5,000 yuan within 20 minutes.

[0066] (5) The other supported input format of rule flow is Json format: {"rule ID":"1","rule status":"Active","grouping field":"Name","calculation field":"Amount" ,"symbol":">","threshold":"5000","window size":"20"}

[0067] Specifically, when the rules are read, the fields that need to be grouped are parsed out, and each rule flow will be applied to each event flow data. At the same time, the time span that needs to be aggregated is defined in the rule flow, such as salary requirements within 20 minutes and. Because the rule flow may be added in real time, the whole process achieves real-time aggregation calculation.

[0068] For example: 2021-11-30 10:00:00 received event data, {"id":"1","amount":"200"}

[0069] 2021-11-30 10:01:00...

Embodiment 2

[0075] Such as figure 1 , figure 2 As shown, the difference between this embodiment and Embodiment 1 is that the method further includes: S5, taking a snapshot of the event flow and rule flow data status in real time, and automatically recovering from the specified snapshot if the task is abnormal.

[0076] Specifically, after the above-mentioned steps S1 to S4 are established, start the program automatic save point, and take a snapshot of the data status at regular intervals to prevent data loss when the task is abnormal. After taking a snapshot, if the task is abnormal, it can automatically restore from the specified snapshot.

[0077] The system of the present invention has an automatic save point function, and the snapshot technology supports restoring data from a specified snapshot. If the system is abnormal, it can recover from the last failed location, and no business data that should be alarmed is missed.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a real-time rule engine control method and system based on Flink and a medium. The method comprises the steps that an event source is received in real time, and a real-time rule is configured for the event source; performing internal storage on the event source by adopting an Flink stream type real-time calculation engine, and storing event stream and rule stream data in a key-value form; connecting event streams and rule streams by adopting an Flink stream type real-time calculation engine, for each event stream, obtaining a specific value by utilizing a Java reflection mechanism according to the received rule stream and fields needing to be grouped in the rule stream, forming a new event, and sending the new event to a downstream operator for processing; the downstream receives a new event, dynamic keyBy grouping is carried out according to the value, after grouping succeeds, the operator is called again to be connected with the rule flow, and rule calculation and storage are carried out on a specific rule; and according to each group of rules after grouping, if the event flow triggers a certain rule, alarm output is carried out.

Description

technical field [0001] The invention relates to the technical field of big data-real-time computing, in particular to a Flink-based real-time rule engine control method, system and medium. Background technique [0002] In the financial business scenario, for the user's transaction behavior, one scenario is to adjust our rules in real time to limit / calculate the user's behavior data, and then in the field of risk control to detect risks in a timely manner and prevent abnormal users from causing a series of property Loss, or to detect the operation of the application system according to the rules. [0003] Most of the existing rule engines use external storage, interact with the outside more, and have frequent input and output operations, which seriously affects the performance of frequent query of business data, poor stability, and business data cannot realize real-time self-adaptive new rules. Contents of the invention [0004] The technical problem to be solved by the pr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/2455G06F16/2457G06Q10/06G06Q40/04
CPCG06F16/24564G06F16/2457G06Q10/0635G06Q40/04
Inventor 田浩兵陈思成张奎
Owner SICHUAN XW BANK CO LTD