CN109299150B - Configurable multi-data-source adaptation rule engine solution method - Google Patents

Configurable multi-data-source adaptation rule engine solution method Download PDF

Info

Publication number
CN109299150B
CN109299150B CN201811243620.2A CN201811243620A CN109299150B CN 109299150 B CN109299150 B CN 109299150B CN 201811243620 A CN201811243620 A CN 201811243620A CN 109299150 B CN109299150 B CN 109299150B
Authority
CN
China
Prior art keywords
rule
data
rule engine
data source
data sources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811243620.2A
Other languages
Chinese (zh)
Other versions
CN109299150A (en
Inventor
蔡昊宇
叶振锋
梁桂金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanhui Investment Management Co ltd
Original Assignee
Wanhui Investment Management Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanhui Investment Management Co ltd filed Critical Wanhui Investment Management Co ltd
Priority to CN201811243620.2A priority Critical patent/CN109299150B/en
Publication of CN109299150A publication Critical patent/CN109299150A/en
Application granted granted Critical
Publication of CN109299150B publication Critical patent/CN109299150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a configurable multi-data source adaptation rule engine solution method, which comprises the following steps: configuring multiple data sources, configuring an active rule tree according to the configured multiple data sources, triggering the operation of the rule by an event MQ generated by user behavior after the rule is on line and effective, and judging the execution behavior according to the rule result, wherein the method has the beneficial effects that: the scheme of uniformly managing various data sources is used, so that the various data sources are easier to manage; a uniformly managed data source acquisition mode is used in the rule engine, so that codes are clear and easy to understand when data are acquired in the rule; the bottom layer implementation of the data source is packaged, so that the data acquisition is more convenient and simpler, the learning cost is reduced, and the reusability is enhanced; the function of online debugging rules is provided, so that the rule engine is easy to debug and is easier to find related problems.

Description

Configurable multi-data-source adaptation rule engine solution method
Technical Field
The invention belongs to the technical field of internet rule engines, and particularly relates to a configurable multi-data-source adaptation rule engine solution.
Background
The commonly used rule engine is widely used in application systems of various internet companies, such as a complex OA system, a wind control system, a flow system, a decision system and the like, the use of the rule engine can reduce the complexity of components for realizing complex business logic and reduce the maintenance and expandability costs of an application program, the logic can be quickly modified during development and after online to realize the change of the whole product scheme without changing the online of codes, and the rule engine is very suitable for the market rhythm with intense competition at present, but the rule engine used in the market at present has the following defects: 1. poor readability: various rule engines are logic expressions written through a visual page, wherein the expressions related to the data source aspect of the rule expressions are complex, the expression codes are not multiplexed, the whole page is full of unimportant rule information, and the modification difficulty of follow-up personnel is increased; 2. the learning cost is high: because the rule engine can obtain data from various channels in various ways, if a uniform data source management way is not available, the rule engine is extremely unfriendly to new rule engine users, and the probability of errors of operation data can be increased; 3. the reusability is poor: the rule engine does not have a universal region for managing various data sources, so that various redundant and similar code segments appear when the data sources are used, and the precipitation used by the data sources at the later stage is not facilitated; 4. difficult debugging: after the rules are configured by using the rule engine, data of each party are interacted, and the returned contents of the data are different due to different request parameters, so that the data are difficult to judge, a series of errors can be caused if the rule engine does not perform corresponding check sum processing on the data, and if the rule engine does not have a debugging function, a rediscovery problem can cause fatal errors when the data are distributed on line.
Disclosure of Invention
In light of the above description, the present invention aims to provide a solution for adapting a rule engine to configurable multiple data sources, so that when each business system uses the rule engine, each business system can uniformly manage various data sources and combine with the rule engine for the rule engine to call.
The technical scheme provided by the invention is as follows:
a configurable multi-data source adaptation rule engine solution method comprises the following steps:
q1, configuring multiple data sources, providing materials for rule judgment, serving an HTTP interface according to a service key request of a user platform, and defining basic attributes of the HTTP interface and parameter information required to be entered and returned;
q2, configuring an active rule tree according to the configured multiple data sources, calling a service data result of a value required by the rule engine to be calculated cumulatively according to the user platform service for multiple times, and using the service data result as a data material in the next rule judgment process;
q3, after the rule takes effect online, the operation of the rule is triggered by an event MQ generated by user behavior, a corresponding basic logic rule combination and rule tree configuration are established according to the service requirement of a user platform, the data sources defined and completed in Q1 and Q2 are introduced according to the requirement, and the corresponding data sources are used when the rule is written;
q4, judging the execution behavior according to the rule result, driving by a certain action defined by the user according to the service scene of the user platform, calling the corresponding rule, and executing according to the rule.
In the technical scheme, the data source provision comprises basic fixed configuration, the registration HTTP interface provision is based on, MQ events are introduced, multi-rule process operation accumulation is carried out, and the form of required data is expanded according to actual needs.
In the above technical solution, the basic logic rule combination includes greater than, less than, equal to, including, not including, yes, no, greater than or equal to, and less than or equal to.
In the above technical solution, in the process of the rule tree operation of Q3, lazy loading is performed on data provided by a data source.
The invention has the beneficial effects that: the scheme of uniformly managing various data sources is used, so that the various data sources are easier to manage; a uniformly managed data source acquisition mode is used in the rule engine, so that codes are clear and easy to understand when data are acquired in the rule; the bottom layer implementation of the data source is packaged, so that the data acquisition is more convenient and simpler, the learning cost is reduced, and the reusability is enhanced; the function of online debugging rules is provided, so that the rule engine is easy to debug and is easier to find related problems.
Detailed Description
The technical solutions of the present invention are described clearly and completely below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment 1 of the invention relates to a solution for a configurable multi-data source adaptive rule engine, wherein a rule engine execution system of the embodiment is used for providing complex service verification for each service system, and an open source rule engine Urule is used as an application core.
Firstly, all rule engine systems need to be called by a user through various modes, such as a request interface, a monitoring event, a timing task and the like, the rule engine systems are executed by using a message event driving rule engine customized by a monitoring user, before the rule engine systems are used, basic information of the message event corresponding to the driving rule engine, such as a message name, an exchanger name, a queue name, parameters corresponding to the event message and the like, needs to be stored through a page configuration mode, a database storage mode and the like, and therefore when the rule engine is used for writing rules, the parameters corresponding to the triggered event message can be used as one of data sources, and the execution of the whole rule process is driven by taking the message event parameters as a starting point. If basic parameters of the HTTP interface data source include basic information such as URI (Uniform resource identifier) addresses, request modes, request parameters, response parameters and the like, the response parameters can be used in rules to perform more complicated logic verification.
After the action (event) of the driving rule exists, the rule engine can be smoothly driven, but when the rule engine executes the rule, the logic judgment is carried out only through parameters transmitted by an event message, more business party data is required to carry out corresponding rule verification, business data irrelevant to the engine is provided in a form of calling a business party self-defined HTTP interface data source, corresponding interface data sources are called in the rule logic as required to obtain corresponding data for rule verification, and basic logic rule combinations comprise greater than, less than, equal to, including, not including, yes, no, greater than or equal to and less than or equal to.
The rule engine system provides and defines a data source which can acquire accumulated data generated by the last rule execution for further rule verification, namely, the data source is defined as an accumulator, when the accumulator is defined, if the rule is executed to acquire the data source of the accumulator node, the rule engine calls the database to acquire and accumulate the latest data, and the accumulated result is returned to the rule engine for the next calculation.
After the various data sources are defined, the message event, the HTTP interface (optional) and the accumulator data (optional) of the binding trigger rule are selected before the page is adapted to the rule of the creation rule engine, and the self-defined rule can be bound with the data sources through a one-to-many binding relationship. After the rules are bound and written, the system generates a corresponding form page according to the binding relationship and parameters required by the rules, so that a test/development worker can perform online rule debugging, and the problem is conveniently searched and repaired.
After the flow operation is finished, the corresponding rule engine rule and the corresponding data source component are initialized together, the rule is executed and called when a self-defined message event reaches the rule engine system, when the event message reaches the system, the associated rule is matched through the unique name of the event, a data source list required by the rule execution can be obtained through the binding relationship between the rule and various data sources, the data source parameters required by the rule are converted into a callback method, and finally all rule parameters are collected and input into the rule engine actuator. When the rule engine executor executes the rule to a certain logic node needing to acquire the data source, the corresponding callback method is acquired through the variable, the callback method is analyzed through a preset method analyzer, the corresponding data source data is requested to be acquired for the next rule verification, and finally the rule engine execution result is output. The data source data can be obtained only when the data source data is really used in a callback method, and the performance of the rule engine for obtaining the data source is guaranteed due to the lazy loading operation.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (2)

1. A configurable multi-data source adaptation rule engine solution method is characterized by comprising the following steps: a configurable multi-data source adaptation rule engine solution method comprises the following steps:
q1, configuring multiple data sources, providing materials for rule judgment, serving an HTTP interface according to a service key request of a user platform, and defining basic attributes of the HTTP interface and parameter information required to be entered and returned;
q2, configuring an active rule tree according to the configured multiple data sources, calling a service data result of a value required by the rule engine to be calculated cumulatively according to the user platform service for multiple times, and using the service data result as a data material in the next rule judgment process;
q3, after the rule takes effect online, the operation of the rule is triggered by an event MQ generated by user behavior, a corresponding basic logic rule combination and rule tree configuration are established according to the service requirement of a user platform, the data sources defined and completed in Q1 and Q2 are introduced according to the requirement, and the corresponding data sources are used when the rule is written;
q4, judging the execution behavior according to the rule result, driving by a certain action defined by the user according to the service scene of the user platform, calling the corresponding rule, and executing according to the rule;
the data source supply comprises basic fixed configuration, registration HTTP interface supply, MQ event introduction, multi-rule process operation accumulation and the form of required data expansion according to actual needs;
the basic logic rule combination comprises greater than, less than, equal to, containing, not containing, yes, no, greater than or equal to, and less than or equal to.
2. The configurable multiple data source adaptation rule engine solution of claim 1, wherein: and in the running process of the rule tree of the Q3, lazy loading is carried out on the data provided by the data source.
CN201811243620.2A 2018-10-24 2018-10-24 Configurable multi-data-source adaptation rule engine solution method Active CN109299150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811243620.2A CN109299150B (en) 2018-10-24 2018-10-24 Configurable multi-data-source adaptation rule engine solution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811243620.2A CN109299150B (en) 2018-10-24 2018-10-24 Configurable multi-data-source adaptation rule engine solution method

Publications (2)

Publication Number Publication Date
CN109299150A CN109299150A (en) 2019-02-01
CN109299150B true CN109299150B (en) 2022-01-28

Family

ID=65157683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811243620.2A Active CN109299150B (en) 2018-10-24 2018-10-24 Configurable multi-data-source adaptation rule engine solution method

Country Status (1)

Country Link
CN (1) CN109299150B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110738384B (en) * 2019-04-17 2022-09-23 北京航天飞行控制中心 Event sequence checking method and system
CN110209512B (en) * 2019-05-30 2020-06-30 口碑(上海)信息技术有限公司 Data checking method and device based on multiple data sources
CN110471646B (en) * 2019-08-08 2022-09-30 曹刚 Method for realizing complex program logic through manual configuration
CN110532041A (en) * 2019-08-29 2019-12-03 深圳前海环融联易信息科技服务有限公司 Regulation engine method for parameter configuration, device, computer equipment and storage medium
CN110737631A (en) * 2019-09-10 2020-01-31 苏宁云计算有限公司 data analysis method and device based on Flink engine
CN111932076B (en) * 2020-07-09 2023-12-12 车智互联(北京)科技有限公司 Rule configuration and release method and device and computing equipment
CN112148343B (en) * 2020-09-02 2022-05-27 广州市双照电子科技有限公司 Rule issuing method and device and terminal equipment
CN112181477B (en) * 2020-09-02 2024-05-10 广州市双照电子科技有限公司 Complex event processing method and device and terminal equipment
CN111984247A (en) * 2020-09-11 2020-11-24 得到(天津)文化传播有限公司 Service processing method and device and electronic equipment
CN112230887B (en) * 2020-09-11 2023-11-14 重庆誉存大数据科技有限公司 Script configuration system applied to index in decision engine
CN113065656B (en) * 2021-03-26 2022-09-30 龙马智芯(珠海横琴)科技有限公司 Rule engine configuration method and device, server and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999582A (en) * 2012-11-15 2013-03-27 南京邮电大学 Lightweight rule-based WoT (Web of Things) monitoring system
CN103279336A (en) * 2013-01-06 2013-09-04 北京慧正通软科技有限公司 Workflow engine multi-data source processing method
CN106874461A (en) * 2017-02-14 2017-06-20 北京慧正通软科技有限公司 A kind of workflow engine supports multi-data source configuration security access system and method
CN107368346A (en) * 2017-07-06 2017-11-21 万惠投资管理有限公司 A kind of code generating method and device based on metadata and script engine
KR20170130741A (en) * 2016-05-19 2017-11-29 삼성에스디에스 주식회사 System and method for managing rules
CN107450495A (en) * 2017-08-25 2017-12-08 艾普工华科技(武汉)有限公司 A kind of flexibility based on message rule engine is in artefact management business model system
CN107689982A (en) * 2017-06-25 2018-02-13 平安科技(深圳)有限公司 Multi-data source method of data synchronization, application server and computer-readable recording medium
CN107943963A (en) * 2017-11-27 2018-04-20 上海交通大学 Mass data distributed rule engine operation system based on cloud platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9483332B2 (en) * 2014-06-30 2016-11-01 Huawei Technologies Co., Ltd. Event processing method in stream processing system and stream processing system
US10089319B2 (en) * 2015-02-20 2018-10-02 International Business Machines Corporation Policy-based, multi-scheme data reduction for computer memory

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999582A (en) * 2012-11-15 2013-03-27 南京邮电大学 Lightweight rule-based WoT (Web of Things) monitoring system
CN103279336A (en) * 2013-01-06 2013-09-04 北京慧正通软科技有限公司 Workflow engine multi-data source processing method
KR20170130741A (en) * 2016-05-19 2017-11-29 삼성에스디에스 주식회사 System and method for managing rules
CN106874461A (en) * 2017-02-14 2017-06-20 北京慧正通软科技有限公司 A kind of workflow engine supports multi-data source configuration security access system and method
CN107689982A (en) * 2017-06-25 2018-02-13 平安科技(深圳)有限公司 Multi-data source method of data synchronization, application server and computer-readable recording medium
CN107368346A (en) * 2017-07-06 2017-11-21 万惠投资管理有限公司 A kind of code generating method and device based on metadata and script engine
CN107450495A (en) * 2017-08-25 2017-12-08 艾普工华科技(武汉)有限公司 A kind of flexibility based on message rule engine is in artefact management business model system
CN107943963A (en) * 2017-11-27 2018-04-20 上海交通大学 Mass data distributed rule engine operation system based on cloud platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
OCA - A Flexible Rule Engine for Data Organisation, Classification & Association;Zampieri, S. 等;《Astronomical Data Analysis Software and Systems XV》;20060630;196-199 *
智能化规则引擎技术研究;赵志伟;《软件》;20180815;65-69 *

Also Published As

Publication number Publication date
CN109299150A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN109299150B (en) Configurable multi-data-source adaptation rule engine solution method
CN107562513B (en) Intelligent contract life cycle management method based on JAVA
Casati et al. Workflow evolution
CN110908641B (en) Visualization-based stream computing platform, method, device and storage medium
CN111158674B (en) Component management method, system, device and storage medium
CN102542382A (en) Method and device for managing business rule
US20140156849A1 (en) Map-reduce workflow processing apparatus and method, and storage media storing the same
CN107908402A (en) The hot restorative procedure of Java server-sides and system
US20070220481A1 (en) Limited source code regeneration based on model modification
CN109032590B (en) Configuration method, device, terminal and storage medium of visual development environment
CN105718307B (en) Process management method and management of process device
CN109284331A (en) Accreditation information acquisition method, terminal device and medium based on business datum resource
CN114706734A (en) Monitoring method and monitoring system for business application
CN104298671B (en) data statistical analysis method and device
US8224933B2 (en) Method and apparatus for case-based service composition
JP2013513143A (en) Method, system, and computer program for automatic generation of query lineage
CN111984882A (en) Data processing method, system and equipment
US20140310069A1 (en) Coordinated business rules management and mixed integer programming
US11494183B1 (en) Executor microservices for automated application compliance processing
CN114493493A (en) Decision engine and decision engine implementation method
Tadano et al. Automatic synthesis of SRN models from system operation templates for availability analysis
KR20170130911A (en) Method for Performing Real-Time Changed Data Publish Service of DDS-DBMS Integration Tool
KR101113690B1 (en) Apparatus and method for anslyzing activity information
Bergenti et al. Outline of a Formalization of JADE Multi-Agent Systems.
Doganata et al. Authoring and deploying business policies dynamically for compliance monitoring

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant