CN104932935A - Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine - Google Patents

Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine Download PDF

Info

Publication number
CN104932935A
CN104932935A CN201510284001.8A CN201510284001A CN104932935A CN 104932935 A CN104932935 A CN 104932935A CN 201510284001 A CN201510284001 A CN 201510284001A CN 104932935 A CN104932935 A CN 104932935A
Authority
CN
China
Prior art keywords
rule
global buffer
rule set
upgrade
api
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.)
Pending
Application number
CN201510284001.8A
Other languages
Chinese (zh)
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.)
Wuhan Jetsum Information Technology Co Ltd
Original Assignee
Wuhan Jetsum Information Technology 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 Wuhan Jetsum Information Technology Co Ltd filed Critical Wuhan Jetsum Information Technology Co Ltd
Priority to CN201510284001.8A priority Critical patent/CN104932935A/en
Publication of CN104932935A publication Critical patent/CN104932935A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a data stream processing method based on an extended Drools 5 rule engine. The method comprises the following steps of: 1, receiving a calling request sent by an external API (Application Program Interface) user, wherein the calling request is used for requesting the creation of a new session; 2, performing refreshing by a called object through a self algorithm for refreshing a rule set in a global cache; 3, calling a builder to inquire whether the rule set in the global cache needs to be updated or not; and 4, when the rule set in the global cache does not need to be updated, returning rules in the global cache to an API sending the calling request, and calling the API to execute the action bound with the next rule; and when the rule set in the global cache needs to be updated, firstly clearing the rule set in the global cache, obtaining total data in a rule base, updating the total data to the global cache, performing intelligent re-matching, and returning the result to the rule executed by the API.

Description

Based on data flow processing method and the system of expansion Drools5 regulation engine
Technical field
The technical field of data processing of enterprises information system of the present invention, particularly a kind of data flow processing method based on expansion Drools5 regulation engine and system.
Background technology
The exploitation of company manager to enterprise-level IT system has following requirement: for raising the efficiency, even if modern commerce rule complex, and the necessary robotization of management process; Market demands business rule often changes, and IT system must be carried out fast according to the change of business rule, the renewal of low cost; In order to renewal that is quick, low cost, business personnel should be able to rule directly in managing I T system, does not need application developer to participate in.
Project development personnel have then encountered following problem: (1) program=algorithm+data structure, and the business rules of some complexity is difficult to derive algorithm and take out data model; (2) soft project requires to design-> coding from demand->, but business rule usually may be also not clear and definite in demand stage, also in change after design and coding, business rule is often embedded in system code; (3) concerning programmer, system is safeguarded, upgrade difficulty, and the more impossible business personnel of allowing manages.
Regulation engine is attempted to solve the exploitation of application program service logic and problems intrinsic in safeguarding.Drools is the open source code regulation engine write with Java language, uses Rete algorithm to write regular evaluation.Drools allows to use statement mode to express service logic.The native language redaction rule of non-XML can be used, thus be convenient to study and understand.Further, Java code can also be directly embedded in rule file.
But the triggering of service logic Sum fanction is not separated by the existing enterprises information system based on Drools regulation engine, cannot the workflow of enterprises information system, examination & approval stream and Business Stream be classified and effectively be processed.
Summary of the invention
In view of this, the invention provides a kind of service logic that can realize to be separated with the triggering of rule, and can in the data flow processing method based on expansion Drools5 regulation engine and the system of carrying out classification process according to the different pairs of the rule type be loaded in context according to stream.
Based on a data flow processing method for expansion Drools5 regulation engine, it comprises the steps:
The call request that S1, reception external application interface API user send, described call request creates new session for asking;
S2, invoked object are refreshed by the algorithm of himself, refresh the rule set in global buffer;
S3, inquire rule set the need of upgrading in global buffer by calling constructor builder;
S4, when not needing to upgrade the rule set in global buffer, the rule in global buffer being returned to the API sending call request, calling the action that API performs next rule binding; When needing to upgrade the rule set in global buffer, first emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching and return to the rule that API performs.
Based on a data flow processing system for expansion Drools5 regulation engine, it comprises as lower unit:
Session creating unit, for receiving the call request that external application interface API user sends, described call request creates new session for asking;
Regular refresh unit, refreshes for the algorithm of invoked object by himself, refreshes the rule set in global buffer;
Judging unit, for inquiring the need of the rule set in renewal global buffer by calling constructor builder;
Rule performance element, for when not needing to upgrade the rule set in global buffer, returns to the API sending call request by the rule in global buffer, call the action that API performs next rule binding; When needing to upgrade the rule set in global buffer, emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching and return to the rule that API performs.
Advantageous Effects: the present invention inquires the need of the rule set in renewal global buffer by calling constructor builder, and when update rule collection and not update rule adopt the action of different scheme executing rule binding, service logic can be realized be separated with the triggering of rule, and classification process can be carried out at dissimilar workflow, examination & approval stream and the Business Stream carried out enterprises information system according to the rule be loaded in context.
Accompanying drawing explanation
Fig. 1 is the data flow processing method process flow diagram based on expansion Drools5 regulation engine that embodiment of the present invention provides;
Fig. 2 is the data flow processing system structured flowchart based on expansion Drools5 regulation engine that embodiment of the present invention provides.
Embodiment
As shown in Figure 1, a kind of data flow processing method based on expansion Drools5 regulation engine, it comprises the steps:
The call request that S1, reception external application interface API user send, described call request creates new session for asking.
S2, invoked object are refreshed by the algorithm of himself, refresh the rule set in global buffer.
S3, inquire rule set the need of upgrading in global buffer by calling constructor builder.
Alternatively, described step S3 comprises:
Call constructor builder to inquire the need of the rule set in renewal global buffer.
Whether consistent with the version of rule set in rule base by the version of rule set in contrast global buffer.
If version is consistent, then do not need to upgrade the rule set in global buffer; If version is inconsistent, then need to upgrade the rule set in global buffer.
S4, when not needing to upgrade the rule set in global buffer, the rule in global buffer being returned to the API sending call request, calling the action that API performs next rule binding; When needing to upgrade the rule set in global buffer, first emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching and return to the rule that API performs.
Alternatively, in described step S4 when needing to upgrade the rule set in global buffer, first emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching binding rule and comprise:
When needing to upgrade the rule set in global buffer, calling and emptying function clear and empty rule set in global buffer.
Call the full dose data with version number's rule set obtained in function get acquisition rule base.
Call renewal function update by obtain be updated to global buffer with version number's rule set.
Call link function reffleshLink again and carry out again the rule that Intelligent Matching returns to API execution.
As shown in Figure 2, the embodiment of the present invention also provides a kind of data flow processing system based on expansion Drools5 regulation engine, and it comprises as lower unit:
Session creating unit 10, for receiving the call request that external application interface API user sends, described call request creates new session for asking.
Regular refresh unit 20, refreshes for the algorithm of invoked object by himself, refreshes the rule set in global buffer.
Judging unit 30, for inquiring the need of the rule set in renewal global buffer by calling constructor builder.
Alternatively, described judging unit 30 comprises:
Call constructor builder to inquire the need of the rule set in renewal global buffer.
Whether consistent with the version of rule set in rule base by the version of rule set in contrast global buffer.
When version is consistent, determine not need to upgrade the rule set in global buffer; When version is inconsistent, determine to need to upgrade the rule set in global buffer.
Rule performance element 40, for when not needing to upgrade the rule set in global buffer, returns to the API sending call request by the rule in global buffer, call the action that API performs next rule binding; When needing to upgrade the rule set in global buffer, emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching and return to the rule that API performs.
Alternatively, in described regular performance element 40 when needing to upgrade the rule set in global buffer, empty the rule set in global buffer, obtain full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching binding rule and comprise:
When needing to upgrade the rule set in global buffer, calling and emptying function clear and empty rule set in global buffer.
Call the full dose data with version number's rule set obtained in function get acquisition rule base.
Call renewal function update by obtain be updated to global buffer with version number's rule set.
Call link function reffleshLink again and carry out again the rule that Intelligent Matching returns to API execution.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, in the above description according to the functional composition and the step that generally describe each example.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not exceed scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in any other forms of storage medium known in random access memory, internal memory, ROM (read-only memory), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Be understandable that, for the person of ordinary skill of the art, other various corresponding change and distortion can be made by technical conceive according to the present invention, and all these change the protection domain that all should belong to the claims in the present invention with distortion.

Claims (6)

1., based on a data flow processing method for expansion Drools5 regulation engine, it is characterized in that, it comprises the steps:
The call request that S1, reception external application interface API user send, described call request creates new session for asking;
S2, invoked object are refreshed by the algorithm of himself, refresh the rule set in global buffer;
S3, inquire rule set the need of upgrading in global buffer by calling constructor builder;
S4, when not needing to upgrade the rule set in global buffer, the rule in global buffer being returned to the API sending call request, calling the action that API performs next rule binding; When needing to upgrade the rule set in global buffer, first emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching and return to the rule that API performs.
2., as claimed in claim 1 based on the data flow processing method of expansion Drools5 regulation engine, it is characterized in that, described step S3 comprises:
Calling constructor builder inquires the need of the rule set in renewal global buffer;
Whether consistent with the version of rule set in rule base by the version of rule set in contrast global buffer;
If version is consistent, then do not need to upgrade the rule set in global buffer; If version is inconsistent, then need to upgrade the rule set in global buffer.
3. as claimed in claim 1 based on the data flow processing method of expansion Drools5 regulation engine, it is characterized in that, in described step S4 when needing to upgrade the rule set in global buffer, first the rule set in global buffer is emptied, obtain full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching binding rule and comprise:
When needing to upgrade the rule set in global buffer, calling and emptying function clear and empty rule set in global buffer;
Call the full dose data with version number's rule set obtained in function get acquisition rule base;
Call renewal function update by obtain be updated to global buffer with version number's rule set;
Call link function reffleshLink again and carry out again the rule that Intelligent Matching returns to API execution.
4., based on a data flow processing system for expansion Drools5 regulation engine, it is characterized in that, it comprises as lower unit:
Session creating unit, for receiving the call request that external application interface API user sends, described call request creates new session for asking;
Regular refresh unit, refreshes for the algorithm of invoked object by himself, refreshes the rule set in global buffer;
Judging unit, for inquiring the need of the rule set in renewal global buffer by calling constructor builder;
Rule performance element, for when not needing to upgrade the rule set in global buffer, returns to the API sending call request by the rule in global buffer, call the action that API performs next rule binding; When needing to upgrade the rule set in global buffer, emptying the rule set in global buffer, obtaining full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching and return to the rule that API performs.
5., as claimed in claim 4 based on the data flow processing system of expansion Drools5 regulation engine, it is characterized in that, described judging unit comprises:
Calling constructor builder inquires the need of the rule set in renewal global buffer;
Whether consistent with the version of rule set in rule base by the version of rule set in contrast global buffer;
When version is consistent, determine not need to upgrade the rule set in global buffer; When version is inconsistent, determine to need to upgrade the rule set in global buffer.
6. as claimed in claim 4 based on the data flow processing system of expansion Drools5 regulation engine, it is characterized in that, in described regular performance element when needing to upgrade the rule set in global buffer, empty the rule set in global buffer, obtain full dose data in rule base and by full dose Data Update to global buffer, and carry out again Intelligent Matching binding rule and comprise:
When needing to upgrade the rule set in global buffer, calling and emptying function clear and empty rule set in global buffer;
Call the full dose data with version number's rule set obtained in function get acquisition rule base;
Call renewal function update by obtain be updated to global buffer with version number's rule set;
Call link function reffleshLink again and carry out again the rule that Intelligent Matching returns to API execution.
CN201510284001.8A 2015-05-27 2015-05-27 Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine Pending CN104932935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510284001.8A CN104932935A (en) 2015-05-27 2015-05-27 Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510284001.8A CN104932935A (en) 2015-05-27 2015-05-27 Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine

Publications (1)

Publication Number Publication Date
CN104932935A true CN104932935A (en) 2015-09-23

Family

ID=54120110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510284001.8A Pending CN104932935A (en) 2015-05-27 2015-05-27 Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine

Country Status (1)

Country Link
CN (1) CN104932935A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287708A (en) * 2017-12-22 2018-07-17 深圳市云智融科技有限公司 A kind of data processing method, device, server and computer readable storage medium
CN111951010A (en) * 2020-07-26 2020-11-17 中国建设银行股份有限公司 Business decision method and device based on rule engine, electronic equipment and readable storage medium
CN112667413A (en) * 2020-12-19 2021-04-16 前海飞算科技(深圳)有限公司 Access control method and system of business rule engine and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533545A (en) * 2001-04-16 2004-09-29 Bea系统公司 System and method for web-based marketing and campajn management
CN102520965A (en) * 2011-12-28 2012-06-27 山东中创软件工程股份有限公司 Method and system for message processing
CN103186579A (en) * 2011-12-29 2013-07-03 北京亿阳信通科技有限公司 Database function-based rule implementation and application method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533545A (en) * 2001-04-16 2004-09-29 Bea系统公司 System and method for web-based marketing and campajn management
CN102520965A (en) * 2011-12-28 2012-06-27 山东中创软件工程股份有限公司 Method and system for message processing
CN103186579A (en) * 2011-12-29 2013-07-03 北京亿阳信通科技有限公司 Database function-based rule implementation and application method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
且看且珍惜: "在智能交通系统中基于 Drools BRMS 实现业务规则动态管理", 《互联网资源》 *
王文平: "基于规则引擎的EPC费控平台的研究与设计", 《中国优秀硕士学位论文全文数据库》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287708A (en) * 2017-12-22 2018-07-17 深圳市云智融科技有限公司 A kind of data processing method, device, server and computer readable storage medium
CN111951010A (en) * 2020-07-26 2020-11-17 中国建设银行股份有限公司 Business decision method and device based on rule engine, electronic equipment and readable storage medium
CN112667413A (en) * 2020-12-19 2021-04-16 前海飞算科技(深圳)有限公司 Access control method and system of business rule engine and readable storage medium

Similar Documents

Publication Publication Date Title
US7509655B2 (en) Integration of workflow and rules
CN102934114B (en) For the checkpoint of file system
US20190266610A1 (en) Transaction management using machine learning and similarity analysis
CN102542382B (en) The method of operating of business rule and device
US7496573B2 (en) Systems and methods for modeling processing procedures
US20110145787A1 (en) Business object change management using release status codes
US20120158795A1 (en) Entity triggers for materialized view maintenance
WO2022007638A1 (en) Data processing method, apparatus, device and system
US8200715B1 (en) Using status models with adaptable process steps in a computer system
TW201941086A (en) Data caching method, device and system
JP2009532760A (en) Asynchronous fault handling in process-centric programs
US20110029822A1 (en) Tracking of java objects during request processing
US20120324421A1 (en) Application creation tool toolkit
AU2019204297A1 (en) Management of extract transform load (etl) jobs via a model that is based on a bayesian network
CN110175163A (en) More library separation methods, system and medium based on business function intelligently parsing
US10379850B2 (en) Software project estimation
US20150081744A1 (en) Metadata model repository
US8234223B1 (en) Method and system for calculating cost of an asset using a data model
CN104423982A (en) Request processing method and device
CN114925084A (en) Distributed transaction processing method, system, device and readable storage medium
CN104932935A (en) Data stream processing method based on extended Drools 5 rule engine and data stream processing system based on extended Drools 5 rule engine
US8428989B2 (en) Cross functional area service identification
US20180275980A1 (en) Optimizing feature deployment based on usage pattern
US20100161676A1 (en) Lifecycle management and consistency checking of object models using application platform tools
US9754319B2 (en) Source document framework for accounting systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150923

RJ01 Rejection of invention patent application after publication