CN106325854B - A kind of rule engine system based on Groovy - Google Patents

A kind of rule engine system based on Groovy Download PDF

Info

Publication number
CN106325854B
CN106325854B CN201610654148.6A CN201610654148A CN106325854B CN 106325854 B CN106325854 B CN 106325854B CN 201610654148 A CN201610654148 A CN 201610654148A CN 106325854 B CN106325854 B CN 106325854B
Authority
CN
China
Prior art keywords
rule
regular
rules
pond
user
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
CN201610654148.6A
Other languages
Chinese (zh)
Other versions
CN106325854A (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 present invention relates to a kind of rule engine systems based on Groovy, the rule engine system is realized based on ApacheGroovy, it include: rule setting interface, for being interacted with user, the rule and corresponding configuration data of some scene are directed to for the user setting, and the rule and corresponding configuration data that will acquire are stored in Redis;Regular release module, the rule publication for obtaining the rule setting interface are online;Regular pond, for being stored with list of rules;Regular computing module, for interacting with user, the response when receiving the computation requests of the user is calculated according to the list of rules in the regular pond, to user feedback calculated result.Compared with prior art, the present invention has many advantages, such as flexible and efficient, reduction resource consumption.

Description

A kind of rule engine system based on Groovy
Technical field
The present invention relates to technical field of data processing, more particularly, to a kind of rule engine system based on Groovy.
Background technique
Apache Groovy is a kind of agile development language based on JVM, it combine Python, Ruby and Many powerful characteristics of Smalltalk provide modern most popular programming language characteristic for Java developer, and learn Cost is very low (almost nil), all already existing Java objects of Seamless integration- and class libraries, can direct compilation at Java byte Code can use Groovy in any place using Java in this way.
Current rule engine system is mainly based upon configurationization, Expression frame to realize, the process of configuration It can become more and more cumbersome, too fat to move with the complexity of business and the complexity of system, be not easy to safeguard, it also can not be very in performance Accomplish well to calculate in real time.
Summary of the invention
It is an object of the present invention to overcome the above-mentioned drawbacks of the prior art and provide a kind of flexible and efficient, reductions 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, the rule engine system are realized based on Apache Groovy, are wrapped It includes:
Rule setting interface is directed to the rule of some scene for the user setting and accordingly matches for interact with user Data are set, and the rule and corresponding configuration data that will acquire are stored in Redis;
Regular release module, the rule publication for obtaining the rule setting interface are online;
Regular pond, for being stored with list of rules;
Regular computing module, for being interacted with user, the response when receiving the computation requests of the user, according to the rule Then the list of rules in pond is calculated, to user feedback calculated result.
It is described rule computing module include:
Initialization of variable unit for all variable informations needed for loading current calculate, and the variable information is sealed Dress is a rules context object;
Computing unit, for obtaining the list of rules in regular pond, and according to the rules context object implementatio8 rule Variable transmission and data sharing between rule, complete the calculating of strictly all rules in the list of rules.
The computing unit completes the calculating of strictly all rules based on streaming computing.
Further include:
Regular pond update module, the response before regular computing module executes, for reading the configuration number in the Redis According to the regular pond of update.
The rule pond update module carries out the detailed process that regular pond updates are as follows:
It is compared, is judged whether there is new with existing list of rules in regular pond according to the configuration data for reading rule Rule whether there is Policy Updates, if so, carrying out real-time on-the-flier compiler to regular pond.
Compared with prior art, the invention has the following advantages that
1) present invention can be realized by rule setting interface and be interacted with user, programmable, compared to manual configuration The regulation engine of change, it is more flexible efficient.
2) present invention can carry out on-the-flier compiler to rule by regular pond update module, reduce the property for compiling calculating repeatedly It can be lost, reduce the consumption of resource.
3) the present invention is based on streaming computing, the high concurrent business demand calculated in real time is realized.
Detailed description of the invention
Fig. 1 is the structural diagram of the present invention;
Fig. 2 is regular schematic diagram of calculation flow of the invention.
Specific embodiment
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 implemented, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to Following embodiments.
As depicted in figs. 1 and 2, the present embodiment provides a kind of rule engine system based on Groovy, the regulation engine systems System is realized based on Apache Groovy, including rule setting interface 1, regular release module 2, regular pond 3 and regular computing module 4, wherein rule setting interface 1 is directed to the rule and corresponding configuration of some scene for the user setting for interacting with user Data, and the rule and corresponding configuration data that will acquire are stored in Redis;Regular release module 2 is used for the rule The rule publication that then set interface 1 obtains is online, and the rule write can directly be issued online;Regular pond 3 is for being stored with List of rules;Regular computing module 4 with user for interacting, the response when receiving the computation requests of the user, according to described List of rules in regular pond 3 is calculated, to user feedback calculated result.
Regular computing module 4 specifically includes initialization of variable unit 41 and computing unit 42.Initialization of variable unit 41 is used All variable informations needed for the current calculating of load, and the variable information is encapsulated as a rules context object;It calculates Unit 42 is used to obtain the list of rules in regular pond, and according to the change between the rules context object implementatio8 rule and rule Amount transmission and data sharing, complete the calculating of strictly all rules in the list of rules, and computing unit is based on streaming computing and completes institute Well-regulated calculating.
In order to make the above-mentioned rule engine system based on Groovy that on-the-flier compiler may be implemented, which may be used also Including regular pond update module 5, which executes preceding response in regular computing module 4, described for reading Configuration data in Redis updates regular pond 3, carries out the detailed process that regular pond updates are as follows:
It is compared, is judged whether there is new with existing list of rules in regular pond according to the configuration data for reading rule Rule whether there is Policy Updates, if so, carrying out real-time on-the-flier compiler to regular pond.

Claims (3)

1. a kind of rule engine system based on Groovy, which is characterized in that the rule engine system is based on Apache Groovy It realizes, comprising:
Rule setting interface is directed to the rule and corresponding configuration number of some scene for the user setting for interacting with user According to, and the rule and corresponding configuration data that will acquire are stored in Redis;
Regular release module, the rule publication for obtaining the rule setting interface are online;
Regular pond, for being stored with list of rules;
Regular computing module, for being interacted with user, the response when receiving the computation requests of the user, according to the regular pond Interior list of rules is calculated, to user feedback calculated result;
It is described rule computing module include:
Initialization of variable unit for all variable informations needed for loading current calculate, and the variable information is encapsulated as One rules context object;
Computing unit is based on streaming computing, for obtaining the list of rules in regular pond, and according to the rules context object Variable transmission and data sharing between implementation rule and rule, complete the calculating of strictly all rules in the list of rules.
2. the rule engine system according to claim 1 based on Groovy, which is characterized in that further include:
Regular pond update module, the response before regular computing module executes, for reading the configuration data in the Redis, more New rule pond.
3. the rule engine system according to claim 2 based on Groovy, which is characterized in that the rule pond updates mould Block carries out the detailed process that regular pond updates are as follows:
It is compared according to the configuration data for reading rule with existing list of rules in regular pond, judges whether there is new rule Or whether there is Policy Updates, if so, carrying out real-time on-the-flier compiler to regular pond.
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 CN106325854A (en) 2017-01-11
CN106325854B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376064B (en) * 2016-11-24 2021-07-23 阿里巴巴集团控股有限公司 Rule engine system and related method of rule engine
CN107330604A (en) * 2017-06-26 2017-11-07 携程旅游网络技术(上海)有限公司 The management method and system of air ticket air control rule
CN107632842B (en) * 2017-09-26 2020-06-30 携程旅游信息技术(上海)有限公司 Rule configuration and release method, system, equipment and storage medium
CN109039751B (en) * 2018-08-14 2022-07-22 深圳壹账通智能科技有限公司 Method, device, computer equipment and storage medium for configuring route
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

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

Also Published As

Publication number Publication date
CN106325854A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN106325854B (en) A kind of rule engine system based on Groovy
US20180260621A1 (en) Picture recognition method and apparatus, computer device and computer- readable medium
US11804851B2 (en) Methods, systems, articles of manufacture, and apparatus to decode zero-value-compression data vectors
CN110650347B (en) Multimedia data processing method and device
US20220004858A1 (en) Method for processing artificial neural network, and electronic device therefor
CN111506520B (en) Address generation method, related device and storage medium
CN114327399B (en) Distributed training method, device, computer equipment, storage medium and product
Boutellier et al. PRUNE: Dynamic and decidable dataflow for signal processing on heterogeneous platforms
US11216281B2 (en) Facilitating data processing using SIMD reduction operations across SIMD lanes
CN113204373A (en) Operation method, device and related product
CN110334436A (en) A kind of data processing method and equipment
CN114565102A (en) Method, electronic device and computer program product for deploying machine learning model
CN111695686B (en) Address allocation method and device
CN110968404B (en) Equipment data processing method and device
CN108549935B (en) Device and method for realizing neural network model
US9600254B1 (en) Loop branch reduction
Haaß et al. Automatic custom instruction identification in memory streaming algorithms
CN116579380A (en) Data processing method and related equipment
CN115098262A (en) Multi-neural-network task processing method and device
CN110033406B (en) Method and apparatus for processing image
CN116710891A (en) Compiling and executing method of subgraph and related equipment
US20110167417A1 (en) Programming system in multi-core, and method and program of the same
CN110877332B (en) Robot dance file generation method and device, terminal device and storage medium
Ho et al. Towards FPGA-assisted spark: An SVM training acceleration case study
CN112465116A (en) Operation method, operation device, electronic device and storage medium

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