The invention discloses a
rule engine, a calculating method, a
service system and a calling method. The
rule engine comprises a template setting module, a
data source configuration module, a rule body setting module and a calculating module. The template setting module is used for customizing an excel
cell format data sheet, logically abstracting a plurality of input items and output items from the calculating service in the
service system to be defined into the data sheet, and leading the data sheet into a data base. The
data source configuration module is used for analyzing the source of service data and abstracting an
SQL according to the service data and configuring the data base corresponding to the
SQL. The rule body setting module is used for writing a rule body. The calculating module is used for calling a
data source according to the rule body, querying service data to be calculated, and obtaining the output items according to the input items in the data sheet. The data source can be switched dynamically, calculating in the
service system is simplified, the calculating speed of the
rule engine is increased, and the maintaining cost of the service
system is lowered.