CN106325854A - Groovy-based rule engine system - Google Patents

Groovy-based rule engine system Download PDF

Info

Publication number
CN106325854A
CN106325854A CN201610654148.6A CN201610654148A CN106325854A CN 106325854 A CN106325854 A CN 106325854A CN 201610654148 A CN201610654148 A CN 201610654148A CN 106325854 A CN106325854 A CN 106325854A
Authority
CN
China
Prior art keywords
rule
groovy
pond
engine system
rules
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.)
Granted
Application number
CN201610654148.6A
Other languages
Chinese (zh)
Other versions
CN106325854B (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.)
Shanghai Pudong Development Bank Co Ltd Credit Card Center
Original Assignee
Shanghai Pudong Development Bank Co Ltd Credit Card Center
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 Shanghai Pudong Development Bank Co Ltd Credit Card Center filed Critical Shanghai Pudong Development Bank Co Ltd Credit Card Center
Priority to CN201610654148.6A priority Critical patent/CN106325854B/en
Publication of CN106325854A publication Critical patent/CN106325854A/en
Application granted granted Critical
Publication of CN106325854B publication Critical patent/CN106325854B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention relates to a Groovy-based rule engine system. The rule engine system is implemented based on Apache Groovy, and comprises a rule setting interface which interacts with a user and is used for enabling a user to set a rule aiming at a certain scene and corresponding configuration data, and storing the acquired rule and the corresponding configuration data into Redis, a rule publish module which is used for publishing the rule acquired by the rule setting interface on line, a rule pool which is used for storing a rule list, and a rule calculation module which interacts with the user, and is used for making a response when receiving a calculation request of the user, carrying out calculation according to the rule list in the rule pool and feeding back a calculation result to the user. Compared with the prior art, the Groovy-based rule engine system disclosed by the invention has the advantages of flexibility, efficiency, reduction of resource consumption and the like.

Description

A kind of rule engine system based on Groovy
Technical field
The present invention relates to technical field of data processing, especially relate to a kind of rule engine system based on Groovy.
Background technology
Apache Groovy is a kind of agile development language based on JVM, it combine Python, Ruby and The characteristic that the many of Smalltalk is powerful, provides modern most popular programming language characteristic for Java developer, and learns Cost the lowest (almost nil), all Java object existed of Seamless integration-and class libraries, Java byte can be become by direct compilation Code, so can use Groovy the local of any use Java.
Current rule engine system, is mainly based upon configurationization, Expression framework realizes, the process of configuration Can become more and more loaded down with trivial details, too fat to move along with the complexity of business and the complexity of system, be not easy to safeguard, also cannot be very in performance Accomplish well to calculate in real time.
Summary of the invention
Defect that the purpose of the present invention is contemplated to overcome above-mentioned prior art to exist and provide a kind of flexible and efficient, reduce The rule engine system based on Groovy of resource consumption.
The purpose of the present invention can be achieved through the following technical solutions:
A kind of rule engine system based on Groovy, this rule engine system realizes based on Apache Groovy, bag Include:
Rule arranges interface, for mutual with user, and joins accordingly for the rule of certain scene for described user setup Put data, and the described rule obtained and corresponding configuration data are stored in Redis;
Rule release module, the rule obtained for described rule arranges interface is issued and is reached the standard grade;
Rule pond, is used for storing regular list;
Rule computing module, for mutual with user, responds when receiving the computation requests of described user, according to described rule Then the list of rules in pond calculates, to user feedback result of calculation.
Described rule computing module includes:
Initialization of variable unit, for loading all variable informations needed for current calculating, and seals described variable information Dress is a rules context object;
Computing unit, for obtaining the list of rules in rule pond, and according to described rules context object implementatio8 rule And the variable transmission between rule and data sharing, complete the calculating of strictly all rules in described list of rules.
Described computing unit has calculated the calculating of strictly all rules based on streaming.
Also include:
Rule pond more new module, responds, for reading the configuration number in described Redis before rule computing module performs According to, more new regulation pond.
Described rule pond more new module carries out the detailed process of rule pond renewal:
Configuration data according to reading rule compare with existing list of rules in rule pond, it may be judged whether have new Rule or whether there are Policy Updates, the most then to rule pond carry out Real-time and Dynamic compiling.
Compared with prior art, the invention have the advantages that
1) present invention can arrange interface by rule and realize the interaction with user, programmable, compares manual configuration The regulation engine changed, more flexible and efficient.
2) present invention can carry out on-the-flier compiler by rule pond more new module to rule, reduces the property repeatedly compiling calculating Can be lost, decrease the consumption of resource.
3) present invention calculates based on streaming, it is achieved that the high voice and packet data concurrent service demand calculated in real time.
Accompanying drawing explanation
Fig. 1 is the structural representation of the present invention;
Fig. 2 is the regular calculation process schematic diagram of the present invention.
Detailed description of the invention
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.The present embodiment is with technical solution of the present invention Premised on implement, give detailed embodiment and concrete operating process, but protection scope of the present invention be not limited to Following embodiment.
As depicted in figs. 1 and 2, the present embodiment provides a kind of rule engine system based on Groovy, this regulation engine system Unite and realize based on Apache Groovy, interface 1, rule release module 2, rule pond 3 and rule computing module are set including rule 4, wherein, rule arranges interface 1 for mutual with user, for described user setup for the rule of certain scene and corresponding configuration Data, and the described rule obtained and corresponding configuration data are stored in Redis;Rule release module 2 is for by described rule The rule issue then arranging interface 1 acquisition is reached the standard grade, and the rule write can directly be issued and reach the standard grade;Rule pond 3 has for storage List of rules;Rule computing module 4, for mutual with user, responds when receiving the computation requests of described user, according to described List of rules in rule pond 3 calculates, to user feedback result of calculation.
Rule computing module 4 specifically includes initialization of variable unit 41 and computing unit 42.Initialization of variable unit 41 is used In loading all variable informations needed for current calculating, and described variable information is encapsulated as a rules context object;Calculate Unit 42 is used for obtaining the list of rules in rule pond, and according to the change between described rules context object implementatio8 rule and rule Amount transmits and data sharing, completes the calculating of strictly all rules in described list of rules, and computing unit has calculated institute based on streaming Well-regulated calculating.
In order to make above-mentioned rule engine system based on Groovy can realize on-the-flier compiler, this rule engine system also may be used Including rule pond more new module 5, this rule pond more new module 5 performs front response at rule computing module 4, be used for reading described in Configuration data in Redis, more new regulation pond 3, the detailed process carrying out the renewal of rule pond is:
Configuration data according to reading rule compare with existing list of rules in rule pond, it may be judged whether have new Rule or whether there are Policy Updates, the most then to rule pond carry out Real-time and Dynamic compiling.

Claims (5)

1. a rule engine system based on Groovy, it is characterised in that this rule engine system is based on Apache Groovy Realize, including:
Rule arranges interface, for mutual with user, for described user setup for the rule of certain scene and corresponding configuration number According to, and the described rule obtained and corresponding configuration data are stored in Redis;
Rule release module, the rule obtained for described rule arranges interface is issued and is reached the standard grade;
Rule pond, is used for storing regular list;
Rule computing module, for mutual with user, responds when receiving the computation requests of described user, according to described rule pond Interior list of rules calculates, to user feedback result of calculation.
Rule engine system based on Groovy the most according to claim 1, it is characterised in that described rule computing module Including:
Initialization of variable unit, for loading all variable informations needed for current calculating, and is encapsulated as described variable information One rules context object;
Computing unit, for obtaining the list of rules in rule pond, and according to described rules context object implementatio8 rule and rule Variable transmission between then and data sharing, complete the calculating of strictly all rules in described list of rules.
Rule engine system based on Groovy the most according to claim 2, it is characterised in that described computing unit based on Streaming has calculated the calculating of strictly all rules.
Rule engine system based on Groovy the most according to claim 1, it is characterised in that also include:
Rule pond more new module, responds, for reading the configuration data in described Redis, more before rule computing module performs New regulation pond.
Rule engine system based on Groovy the most according to claim 4, it is characterised in that described rule pond updates mould Block carries out the detailed process of rule pond renewal:
Configuration data according to reading rule compare with existing list of rules in rule pond, it may be judged whether have new rule Or whether there are Policy Updates, the most then rule pond is carried out Real-time and Dynamic compiling.
CN201610654148.6A 2016-08-11 2016-08-11 A kind of rule engine system based on Groovy Active CN106325854B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610654148.6A CN106325854B (en) 2016-08-11 2016-08-11 A kind of rule engine system based on Groovy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610654148.6A CN106325854B (en) 2016-08-11 2016-08-11 A kind of rule engine system based on Groovy

Publications (2)

Publication Number Publication Date
CN106325854A true CN106325854A (en) 2017-01-11
CN106325854B CN106325854B (en) 2019-12-03

Family

ID=57740099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610654148.6A Active CN106325854B (en) 2016-08-11 2016-08-11 A kind of rule engine system based on Groovy

Country Status (1)

Country Link
CN (1) CN106325854B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107330604A (en) * 2017-06-26 2017-11-07 携程旅游网络技术(上海)有限公司 The management method and system of air ticket air control rule
CN107632842A (en) * 2017-09-26 2018-01-26 携程旅游信息技术(上海)有限公司 Rule configuration and dissemination method, system, equipment and storage medium
CN108376064A (en) * 2016-11-24 2018-08-07 阿里巴巴集团控股有限公司 The correlation technique of rule engine system and regulation engine
CN109039751A (en) * 2018-08-14 2018-12-18 深圳壹账通智能科技有限公司 Configure method, apparatus, computer equipment and the storage medium of routing
CN111221550A (en) * 2019-10-24 2020-06-02 支付宝(杭州)信息技术有限公司 Rule updating method and device for streaming computing and streaming computing system
CN112910702A (en) * 2021-02-01 2021-06-04 浪潮云信息技术股份公司 Polymorphic gateway fusion method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103269347A (en) * 2013-06-03 2013-08-28 北京奇虎科技有限公司 Server-side-based resource optimization method, server, client side and system
CN103942228A (en) * 2013-01-23 2014-07-23 纽海信息技术(上海)有限公司 Rule engine, calculating method, service system and calling method
CN105446799A (en) * 2014-08-22 2016-03-30 阿里巴巴集团控股有限公司 Method and system for performing rule management in computer system
CN105701242A (en) * 2016-02-26 2016-06-22 浪潮通信信息***有限公司 Extensible intelligent mobile terminal dynamic rule detection engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942228A (en) * 2013-01-23 2014-07-23 纽海信息技术(上海)有限公司 Rule engine, calculating method, service system and calling method
CN103269347A (en) * 2013-06-03 2013-08-28 北京奇虎科技有限公司 Server-side-based resource optimization method, server, client side and system
CN105446799A (en) * 2014-08-22 2016-03-30 阿里巴巴集团控股有限公司 Method and system for performing rule management in computer system
CN105701242A (en) * 2016-02-26 2016-06-22 浪潮通信信息***有限公司 Extensible intelligent mobile terminal dynamic rule detection engine

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376064A (en) * 2016-11-24 2018-08-07 阿里巴巴集团控股有限公司 The correlation technique of rule engine system and regulation engine
CN107330604A (en) * 2017-06-26 2017-11-07 携程旅游网络技术(上海)有限公司 The management method and system of air ticket air control rule
CN107632842A (en) * 2017-09-26 2018-01-26 携程旅游信息技术(上海)有限公司 Rule configuration and dissemination method, system, equipment and storage medium
CN107632842B (en) * 2017-09-26 2020-06-30 携程旅游信息技术(上海)有限公司 Rule configuration and release method, system, equipment and storage medium
CN109039751A (en) * 2018-08-14 2018-12-18 深圳壹账通智能科技有限公司 Configure method, apparatus, computer equipment and the storage medium of routing
CN111221550A (en) * 2019-10-24 2020-06-02 支付宝(杭州)信息技术有限公司 Rule updating method and device for streaming computing and streaming computing system
CN111221550B (en) * 2019-10-24 2022-09-06 支付宝(杭州)信息技术有限公司 Rule updating method and device for streaming computing and streaming computing system
CN112910702A (en) * 2021-02-01 2021-06-04 浪潮云信息技术股份公司 Polymorphic gateway fusion method

Also Published As

Publication number Publication date
CN106325854B (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN106325854A (en) Groovy-based rule engine system
CN110650347B (en) Multimedia data processing method and device
CN110058883A (en) A kind of CNN accelerated method and system based on OPU
US11869140B2 (en) Combined world-space pipeline shader stages
US11804851B2 (en) Methods, systems, articles of manufacture, and apparatus to decode zero-value-compression data vectors
CN110889439B (en) Image feature extraction method and device, electronic equipment and storage medium
US20150199787A1 (en) Distribute workload of an application to a graphics processing unit
CN106133696A (en) Dynamic marks target capacity during scaling cloud resource
WO2020242686A1 (en) Compiling code for a machine learning model for execution on a specialized processor
JP6489760B2 (en) Flexible distribution method of I / O channels of hardware components
WO2015137641A3 (en) Business rule management system having hierarchical rule structure and representation method thereof
Danelutto et al. Introducing parallelism by using REPARA C++ 11 attributes
CN117495989B (en) Data processing method, device, equipment and readable storage medium
TW201337749A (en) Real time instruction tracing compression of RET instructions
US11526791B2 (en) Methods and systems for diverse instance generation in artificial intelligence planning
JP2016506001A5 (en)
US20110238945A1 (en) Apparatus and method for generating code overlay
CN105074667B (en) For stating the method for type and the method for instance object figure
Coplien et al. The data, context and interaction paradigm
US8694975B2 (en) Programming system in multi-core environment, and method and program of the same
Ho et al. Towards FPGA-assisted spark: An SVM training acceleration case study
Sulzbachner et al. An optimized silicon retina stereo matching algorithm using time-space correlation
Chavarrías et al. A multicore DSP HEVC decoder using an actor-based dataflow model
CN114327399B (en) Distributed training method, device, computer equipment, storage medium and product
Ciccozzi Automatic Synthesis of Heterogeneous CPU-GPU Embedded Applications from a UML Profile.

Legal Events

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