All Projects → CrankZ → devs

CrankZ / devs

Licence: other
Devs是一款轻量级的规则引擎

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to devs

RulerZBundle
Symfony Bundle for RulerZ
Stars: ✭ 38 (+153.33%)
Mutual labels:  rule-engine
TabInOut
Framework for information extraction from tables
Stars: ✭ 37 (+146.67%)
Mutual labels:  rule-engine
claire
Continuously Learning Artificial Intelligence Rules Engine (Claire) for Smart Homes
Stars: ✭ 18 (+20%)
Mutual labels:  rule-engine
SFDCRules
Simple yet powerful Rule Engine for Salesforce - SFDCRules
Stars: ✭ 38 (+153.33%)
Mutual labels:  rule-engine
sklearn-oblique-tree
a python interface to OC1 and other oblique decision tree implementations
Stars: ✭ 33 (+120%)
Mutual labels:  decision-tree
arete
Fast, Clojure-based rule engine
Stars: ✭ 25 (+66.67%)
Mutual labels:  rule-engine
rools
A small rule engine for Node.
Stars: ✭ 118 (+686.67%)
Mutual labels:  rule-engine
kdd99-scikit
Solutions to kdd99 dataset with Decision tree and Neural network by scikit-learn
Stars: ✭ 50 (+233.33%)
Mutual labels:  decision-tree
rule-engine
基于流程,事件驱动,可拓展,响应式,轻量级的规则引擎。
Stars: ✭ 165 (+1000%)
Mutual labels:  rule-engine
Machine Learning From Scratch
Machine Learning models from scratch with a better visualisation
Stars: ✭ 15 (+0%)
Mutual labels:  decision-tree
Rulette
A pragmatic business rule management system
Stars: ✭ 91 (+506.67%)
Mutual labels:  rule-engine
jupyter-notebooks
Jupyter Notebooks and miscellaneous
Stars: ✭ 51 (+240%)
Mutual labels:  decision-tree
SimpleRules
Yet another rules engine, but simpler to use!!
Stars: ✭ 44 (+193.33%)
Mutual labels:  rule-engine
Data-Mining-and-Warehousing
Data Mining algorithms for IDMW632C course at IIIT Allahabad, 6th semester
Stars: ✭ 19 (+26.67%)
Mutual labels:  decision-tree
naive-rete
Python RETE algorithm
Stars: ✭ 51 (+240%)
Mutual labels:  rule-engine
scoruby
Ruby Scoring API for PMML
Stars: ✭ 69 (+360%)
Mutual labels:  decision-tree
bonsai-dt
Programmable Decision Tree Framework
Stars: ✭ 34 (+126.67%)
Mutual labels:  decision-tree
EngineX
Engine X - 实时AI智能决策引擎、规则引擎、风控引擎、数据流引擎。 通过可视化界面进行规则配置,无需繁琐开发,节约人力,提升效率,实时监控,减少错误率,随时调整; 支持规则集、评分卡、决策树,名单库管理、机器学习模型、三方数据接入、定制化开发等;
Stars: ✭ 369 (+2360%)
Mutual labels:  rule-engine
DecisionTrees
A python implementation of the CART algorithm for decision trees
Stars: ✭ 38 (+153.33%)
Mutual labels:  decision-tree
SentimentAnalysis
(BOW, TF-IDF, Word2Vec, BERT) Word Embeddings + (SVM, Naive Bayes, Decision Tree, Random Forest) Base Classifiers + Pre-trained BERT on Tensorflow Hub + 1-D CNN and Bi-Directional LSTM on IMDB Movie Reviews Dataset
Stars: ✭ 40 (+166.67%)
Mutual labels:  decision-tree

Devs

Devs是一款轻量级的规则引擎。

基础概念

此规则引擎的基础概念有字段、条件、规则等。

其中字段组成条件,条件组成规则,并且支持多个条件通过与或组成一个规则。下面用常见的代码说明各个概念

代码举例

image-20211124163720495

规则分类

多个规则可组成一个模板,调用接口执行的时候是以模板为维度执行的。

模板

模板名称
模板1

规则模板映射表

模板id 规则id
1 1
1 2
1 3

规则相关

字段

字段名称 字段编码 字段类型 取数类型 取数路径
name 姓名 STRING REFLECT engineServiceImpl#testReflect
age 年龄 NUMBER REFLECT engineServiceImpl#testReflect

条件

条件名称 条件编码 字段编码 逻辑比较符 期望值
姓名是否等于张三 C_NAME_IS_ZS name StringMethod.equals($EXPECT,$FACT) 张三
年龄是否大于18岁 C_AGE_GT18 age NumberMethod.gt($EXPECT,$FACT) 18

规则

规则名称 条件组
姓名是否等于张三 C_STRING_EQUALS1
年龄是否大于18岁 C_NUMBER_GE1
用户是否符合条件 C_STRING_EQUALS1 && C_NUMBER_GE1

规则结果

调用接口执行时,结果会直接通过接口返回。

TODO: 保存规则执行结果

TODO: 添加规则触发器

ER图

模板-规则关系

image-20211127153727176

规则相关

image-20211127154540104

规则执行结果

image-20211127153808029

执行接口

URL:/engine/execute

METHOD:POST

入参

字段名 字段类型 是否必填 解释
templateId Long TRUE 模板ID
params Map<String,Object> FALSE 参数

例子

{
  "templateId": 1,
  "params": {
    "userId": 123
  }
}

出参

验收结果只有是、否、NULL。

执行结果为NULL,则只输出内容,需要手动判断

规则名称 执行结果 条件组 实际取值
姓名是否等于张三 TRUE 姓名是否等于张三 "姓名": "张三"
年龄是否大于18岁 FALSE 年龄是否大于18岁 "年龄": 10
用户是否符合条件 FALSE 姓名是否等于张三 && 年龄是否大于18岁 "姓名": "张三", "年龄": 10

例子

{
  "code": "0000",
  "msg": "success",
  "requestId": "",
  "timestamp": 1637996239325,
  "data": {
    "templateId": 1,
    "params": {},
    "ruleResult": [
      {
        "ruleName": "姓名是否等于张三",
        "trigger": true,
        "conditions": "姓名是否等于张三",
        "facts": {
          "姓名": "张三"
        }
      },
      {
        "ruleName": "年龄是否大于18岁",
        "trigger": false,
        "conditions": "年龄是否大于18岁",
        "facts": {
          "年龄": 10
        }
      },
      {
        "ruleName": "用户是否符合条件",
        "trigger": false,
        "conditions": "姓名是否等于张三 && 年龄是否大于18岁",
        "facts": {
          "姓名": "张三",
          "年龄": 10
        }
      }
    ]
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].