Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and device for business processing of rule-based engine, pass through by
Object entity example is input to regulation engine, to match the rule file of the execution function including business processing proxy class, adjusts
Business processing object is obtained with the execution function of rule file, and then business logic processing is carried out to business input object.This reality
The execution function for applying a retained business processing proxy class in rule file in example, by partial service processing logic from rule file
It decouples in business processing object, reduce rule file writes quantity, increases the readability of rule file, can safeguard
Property.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of industry of rule-based engine is provided
Business processing method.
A kind of method for processing business of rule-based engine of the embodiment of the present invention, including:To have business input object,
The object entity example of business output object and business processing agent object is sent to the regulation engine;It is real according to the object
Body example matches corresponding rule file from the rule file of regulation engine concentration;Wherein, it is wrapped in the rule file
Include the execution function of business processing proxy class;The execution function of the rule file is called to obtain business processing object, to pass through
The business processing object carries out corresponding business logic processing to the business input object, and business logic processing result is sealed
It is attached in the business output object.
Optionally, the method also includes:Define the business processing proxy class, business processing encapsulation class and business processing
Class;Wherein, first parameter of the execution function of the business processing proxy class is the class name of the business processing class, remaining ginseng
Number includes that the business input object and the business export object;The parameter of the execution function of business processing encapsulation class with
The second parameter of the business processing proxy class is aligned;The business processing class is realization of the business processing encapsulation class
Class.
Optionally, the execution function for calling the rule file obtains business processing object, including:Call the rule
The then execution function of the business processing proxy class of file, to obtain the parameter for executing function, wherein first parameter
For the class name of the business processing class;According to the class name of the business processing class, the business processing is obtained by reflection mechanism
The business processing object of class.
Optionally, described that the business input object is carried out at corresponding service logic by the business processing object
Reason, including:The business input object is input to the execution function of the business processing object, to business input pair
As carrying out corresponding business logic processing.
Optionally, the method also includes:The update that the rule file concentrates rule file is monitored by polling mechanism,
To manage the rule file in caching.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of industry of rule-based engine is provided
Business processing unit.
A kind of business processing device of rule-based engine of the embodiment of the present invention, including:Sending module, for that will have
The object entity example of business input object, business output object and business processing agent object is sent to the regulation engine;
Matching module, for matching corresponding rule from the rule file of regulation engine concentration according to the object entity example
Then file;It wherein, include the execution function of business processing proxy class in the rule file;Processing module, it is described for calling
The execution function of rule file obtains business processing object, with by the business processing object to the business input object into
Business logic processing result is encapsulated into the business output object by the corresponding business logic processing of row.
Optionally, described device further includes:Definition module, for defining the business processing proxy class, business processing envelope
Fill class and business processing class;Wherein, first parameter of the execution function of the business processing proxy class is the business processing
The class name of class, remaining parameter include the business input object and business output object;The business processing encapsulation class
The parameter for executing function is aligned with the second parameter of the business processing proxy class;The business processing class is at the business
The realization subclass of reason encapsulation class.
Optionally, the processing module, is also used to:Call the execution of the business processing proxy class of the rule file
Function, to obtain the parameter for executing function, wherein first parameter is the class name of the business processing class;And according to
The class name of the business processing class obtains the business processing object of the business processing class by reflection mechanism.
Optionally, the processing module, is also used to:The business input object is input to the business processing object
Function is executed, to carry out corresponding business logic processing to the business input object.
Optionally, described device further includes:Module is monitored, concentrates rule for monitoring the rule file by polling mechanism
The then update of file, to manage the rule file in caching.
To achieve the above object, according to an embodiment of the present invention in another aspect, providing a kind of electronic equipment.
The a kind of electronic equipment of the embodiment of the present invention, including:One or more processors;Storage device, for storing one
A or multiple programs, when one or more of programs are executed by one or more of processors, so that one or more
A processor realizes a kind of method for processing business of rule-based engine of the embodiment of the present invention.
To achieve the above object, according to an embodiment of the present invention in another aspect, providing a kind of computer-readable medium.
A kind of computer-readable medium of the embodiment of the present invention, is stored thereon with computer program, and described program is processed
A kind of method for processing business of rule-based engine of the embodiment of the present invention is realized when device executes.
One embodiment in foregoing invention has the following advantages that or beneficial effect:By stating business in rule file
Partial service is handled logic and executed from being transferred in business processing object in rule file by the execution function for handling proxy class,
Rule file light weight is simple, and reduce rule file writes quantity, increases readability, the maintainability of rule file;It is logical
Cross the business execution that primary development language (programming language used when developing whole system) realizes the definition of class, executes function
Logic, developer can quickly go up hand;Service logic is executed by the execution function of business processing object, can be extracted general
Property, reduce repeated work;The update of monitoring rule file, it is convenient that rule file is managed.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment
With explanation.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention
Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize
It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together
Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the schematic diagram of the key step of the method for processing business of rule-based engine according to an embodiment of the present invention.
As shown in Figure 1, the method for processing business of the rule-based engine of the embodiment of the present invention, mainly includes the following steps:
Step S101:By the object entity with business input object, business output object and business processing agent object
Example is sent to the regulation engine.Different types of service, such as data cleansing, data screening etc., business input object
Data structure is also different, and in order to reach certain versatility, institute can be stored in the form of Map key-value pair (Key-Value)
State business input object and business output object.Business input object described in the step is original service data, described
Business exports the empty object of object, and the business processing agent object need to be pre-defined according to type of service.By business input pair
As, business output object and business processing agent object are as object entity example, and it is sent to regulation engine.
Step S102:According to the object entity example, matched from the rule file of regulation engine concentration corresponding
Rule file, wherein in the rule file include business processing proxy class execution function.Rule file concentrates rule text
The writing principle of part is:The execution function that business processing proxy class is filled in rule file, can need to by executing function
The parameter to be passed to is write in rule file, it is not necessary to pipe others service logic.The execution function of the business processing proxy class
Object is exported including business input object and business, later use rule file calls the execution letter of the business processing proxy class
Number, with the incoming parameter that quantity is indefinite, data structure is indefinite, since first incoming parameter is the class name of business processing class,
Specific service logic is defined in business processing class, and then can be specific by the business processing object implementatio8 of business processing class
Business logic processing.When realizing the matching of object entity example and rule file, can using such as it is following any one
Mode:Using matching algorithms such as Rete, Tread, the rule matching method write using oneself is directly accessed Drools, Easy-
The regulation engines such as rules.
Step S103:The execution function of the rule file is called to obtain business processing object, at through the business
It manages object and corresponding business logic processing is carried out to the business input object, business logic processing result is encapsulated into the industry
In business output object.The step obtains the class of business processing class according to the business processing proxy class in the rule file
Name;Later according to the class name of the business processing class, the business processing object of the business processing class is obtained by reflection mechanism;
The business input object is input to the execution function of the business processing object, to carry out phase to the business input object
The business logic processing answered;Obtained business logic processing result is encapsulated into business output object and is exported.
Fig. 2 is the main flow schematic diagram of the method for processing business of rule-based engine according to an embodiment of the present invention.Such as
Shown in Fig. 2, the method for processing business of the rule-based engine of the embodiment of the present invention mainly includes the following steps:
Step S201:Define business processing proxy class, business processing encapsulation class and business processing class, wherein the business
Processing class is the realization subclass of the business processing encapsulation class.The definition of three classes uses primary language in the step, such as
Java language is write, supreme hand difficulty.Wherein, the parameter of the execution function of the business processing proxy class includes input object reality
Example and output object instance, are filled in for carrying out statement in rule file.The business processing encapsulation class is defined including defeated
Enter object instance and export the execution function of object instance, business processing encapsulates parameter and the business processing generation of the execution function of class
The second parameter alignment of class is managed, transparent transmission whole business enters ginseng.The business processing class is for entering ginseng and rule file to business
In the ginseng that enters handled, complete specific business processing logic.
The execution function of business processing proxy class is:execute(Object…objects).The execution function is one
The elongated function of parameter, can be by for the calling of the execution function of the business processing proxy class, being passed to quantity in rule file
Parameter indefinite, data structure is indefinite.First of the parameter list of the execution function is the class name of the business processing class
Reserved bit.
Business processing encapsulation class execution function be:execute(Object…objects).The parameter of the execution function
It is aligned with the second parameter of business processing proxy class, i.e., if business processing proxy class has n parameter, is passed to business processing
The parameter for encapsulating class is rear n-1, and first parameter is not passed to.
Business processing class is the subclass of business processing encapsulation class, according to service logic difference, realizes that logic is different, at business
The quantity of reason class is also not fixed, and cutting granularity (i.e. a service logic is divided into several steps and completes) is also not fixed, but executes function
(execute) enter ginseng and go out ginseng has provided that developer is directed to specific type of service, and the exploitation of finishing service processing class is
It can.
It in a preferred embodiment, can be between business processing proxy class, business processing encapsulation class and business processing class
Better versatility is realized by modes such as general caching design, tool functions.Wherein, general caching design is in design module
Singleton pattern.
Fig. 3 is the pass between the business processing proxy class of the embodiment of the present invention, business processing encapsulation class and business processing class
It is schematic diagram.As shown in figure 3, the class name using the business processing class indicated in rule file calls business processing proxy class, lead to
Cross the business processing object that Java reflection mechanism obtains the business processing class;Then first will be removed in business processing proxy class
Parameter outside a parameter is passed to the execution function of business processing object.
It usually requires more effectively obtain information to original service data progress data prediction in data mining, and
Data prediction includes multiple business again.By taking data cleansing business as an example, which includes OneHot expansion, data normalization etc.
Type of service, wherein OneHot is a kind of coding mode.By taking data normalization as an example, the execution letter of the business processing object
The realization code of number (execute) can be:
Step S202:Construct the rule file collection with the execution function of the business processing proxy class.Rule file collection
The writing principle of middle rule file is:The execution function that business processing proxy class is filled in rule file, by executing function
Incoming parameter can will be needed to write in rule file, it is not necessary to pipe others service logic.The file format of rule file can
To be DSL file, XML file, YML file etc..Wherein, YML file is with YAML (YAML Ain't Markup
Language) the file format that language is write, YAML are the foreign language abbreviations of " YAML is not a kind of markup language ".
Still by taking data cleansing business as an example, rule file can be according to following written in code:
In upper example, the file format of rule file is YML file, and preceding 5 row is respectively rule name, rule description, excellent
First grade information, conditional information and regular execution information.The priority height that the rule file is defined in precedence information, when this
When going out multiple rule files in step for object entity example match, it can be executed in order according to the height of priority.Condition letter
The NameSpace that input data is defined in breath is rnn.Business processing proxy class in rule file is
rulesExecutorUser.The execution function of business processing proxy class includes 5 parameters, is successively:"
com.jd.finace.vector.astroboy.rule.executor.matrix.inloop.executor.Normallize
Executor ", " tempCurrentHostCount ", 10,50 and " normalizeCurrentHostCount ", first
A parameter is the class name of business processing class.It is to the end the execution part of rule file since actions, is meant that:It uses
The execution function of business processing object (i.e. the corresponding object of first parameter of rule file) is to field
" tempCurrentHostCount " carries out the data normalization processing for being limited to [10,50] up and down.Wherein, data normalization be by
Data bi-directional scaling is allowed to fall into a small specific sections.In embodiment, it can be realized by minimum-maximum specificationization
Data normalization, specific formula are as follows:
Y=((x-MinValue)/(MaxValue-MinValue)) (new_MaxValue-new_MinValue)+new_
minValue
Formula 1
In formula, y is after data cleansing as a result, x is original service data, and MinValue is the minimum of original service data
Value, MaxValue are the maximum value of original service data, and new_MaxValue is the upper limit of data cleansing, and new_MinValue is
The lower limit of data cleansing.
Step S203:Object entity example is sent to regulation engine, wherein the object entity example includes that business is defeated
Enter object, business output object and business processing agent object.Regulation engine in embodiment is Easy-rules regulation engine.
In order to reach certain versatility, in embodiment in the form of Key-Value storage service input object, wherein Key is parameter
Name (corresponding in rule file code " tempCurrentHostCount "), data type such as String character
String, Json (JavaScript Object Notation is a kind of data interchange format of lightweight) character string, Value are
Parameter value, data type are the common parent Object class of Java object.Equally for versatility the considerations of, also with Key-
The form storage service of Value exports object, business export object Key (corresponding in rule file code "
NormalizeCurrentHostCount ") parameter definition in the rule file, Value derives from subsequent business
Logical process result.The empty object of the business output object, that is, the business output object for being sent to regulation engine is sky.
Still by taking data cleansing business as an example, business input object be original service data, such as Json format or
The original service data of String format.The business output object of final output is the field after data cleansing.
Step S204:According to the object entity example, matched from the rule file of regulation engine concentration corresponding
Rule file.In embodiment, object entity example and rule file are realized by being directly accessed Easy-rules regulation engine
Matching.Of course, matching algorithm can be used, the rule matching method oneself write realizes object entity example and rule text
The matching of part.
It is below a kind of realization code of rule matching method:
Step S205:The execution function of the rule file is called to obtain business processing object, at through the business
It manages object and corresponding business logic processing is carried out to the business input object, business logic processing result is encapsulated into the industry
In business output object.Using rule file, the execution function of the business processing proxy class is called, to obtain the execution function
Parameter;It obtains first parameter and obtains the class name of business processing class, business processing object is obtained by reflection mechanism later.Still
It is old by taking data cleansing business as an example, according to class name obtain business processing object, with by the business processing object to the industry
The realization code that business input object carries out corresponding business logic processing can be:
In above-mentioned code, by the business processing proxy class in rule file (corresponding to rule file code
First parameter of execution function (execute) rulesExecutorUser), the i.e. class name of business processing class, utilize Java
Reflection mechanism gets the business processing object (corresponding to the ruleExecutor in this step code) of the business processing class,
The execution function (execute) of the business processing object is called to realize service logic.Specific service logic need to pass through industry
The execution function (execute) dealt with objects be engaged in realize, i.e., the data cleansing business of the present embodiment, which need to pass through, executes function
(execute) it realizes.
In a preferred embodiment, rule file rule file concentrated is stored into rule cache, passes through one
The update of rule file in long connection monitoring rule caching, is managed rule file with facilitating.Rule file is stored
The biggish data of data scale or stream data can be preferably received into rule cache.In an additional preferred embodiment,
Storage service process object, the update of monitoring service process object, to facilitate carry out dynamically load.
Fig. 4 is the realization principle schematic diagram of the method for processing business of the rule-based engine of the embodiment of the present invention.Such as Fig. 4 institute
Show, the realization principle of the method for processing business of the rule-based engine of the embodiment of the present invention is:Service logic is carried out abstract
To object entity example and at least one rule file;By the object entity example and at least one described rule file input
Pattern match is carried out to regulation engine;It is obtained using the execution function for the rule file calling business processing proxy class being matched to
Business processing object, to carry out corresponding business logic processing by the execution function of business processing object, at service logic
Reason result is encapsulated into the business output object and exports.Wherein, object entity example, rule file, business processing proxy class,
It executes function and business processing object is defined as described above.
The method for processing business of rule-based engine through the embodiment of the present invention can be seen that by rule file
Partial service processing logic is transferred to business processing object by the execution function for stating business processing proxy class from rule file
Middle execution, rule file light weight is simple, and reduce rule file writes quantity, increases the readability of rule file, can tie up
Shield property;By primary development language realize class definition, execute function business execute logic, developer can quickly on
Hand;Service logic is executed by the execution function of business processing object, versatility can be extracted, reduce repeated work;Monitor rule
The then update of file, it is convenient that rule file is managed.
Fig. 5 is the schematic diagram of the main modular of the business processing device of rule-based engine according to an embodiment of the present invention.
As shown in figure 5, the business processing device 400 of the rule-based engine of the embodiment of the present invention, mainly includes:
Sending module 501, for that will have pair of business input object, business output object and business processing agent object
As entity instance is sent to the regulation engine.The types of service such as different types of service, such as data cleansing, data screening,
The data structure of business input object is also different, in order to reach certain versatility, can use Map key-value pair (Key-
Value form) stores the business input object and the business exports object.Business input object described in the module is
Original service data, the empty object of the business output object, the business processing agent object need to be abstract according to type of service
It obtains.Using business input object, business output object and business processing agent object as object entity example, and it is sent to rule
Then engine.
Matching module 502, for concentrating and matching from the rule file of the regulation engine according to the object entity example
Corresponding rule file out;It wherein, include the execution function of business processing proxy class in the rule file.Rule file is concentrated
The writing principle of rule file is:The execution function that business processing proxy class is filled in rule file, by execute function be
Incoming parameter can will be needed to write in rule file, it is not necessary to pipe others service logic.The business processing proxy class is held
Line function includes business input object and business output object, and later use rule file calls holding for the business processing proxy class
Line function, with the incoming parameter that quantity is indefinite, data structure is indefinite, due to the class that first incoming parameter is business processing class
, specific service logic is defined in business processing class, and then the business processing object implementatio8 of business processing class can be passed through
Specific business logic processing.It, can be using such as following any when realizing the matching of object entity example and rule file
A kind of mode:Using matching algorithms such as Rete, Tread, the rule matching method write using oneself, be directly accessed Drools,
The regulation engines such as Easy-rules.
Processing module 503, for calling the execution function of the rule file to obtain business processing object, by described
Business processing object carries out corresponding business logic processing to the business input object, and business logic processing result is encapsulated into
In the business output object.The module obtains business processing class according to the business processing proxy class in the rule file
Class name;Later according to the class name of the business processing class, the business processing of the business processing class is obtained by reflection mechanism
Object;The business input object is input to the execution function of the business processing object, to the business input object
Carry out corresponding business logic processing;Obtained business logic processing result is encapsulated into business output object and is exported.
In addition, the business processing device 500 of the rule-based engine of the embodiment of the present invention can also include:Definition module and
It monitors module (being not shown in Fig. 5), wherein the definition module, for defining the business processing agency according to type of service
Class, business processing encapsulation class and business processing class;Wherein, first parameter of the execution function of the business processing proxy class is
The class name of the business processing class;The parameter and the business processing proxy class of the execution function of the business processing encapsulation class
Second parameter alignment;The business processing class is the realization subclass of the business processing encapsulation class.The monitoring module, is used for
The update that the rule file concentrates rule file is monitored by polling mechanism, to manage the rule file in caching.
Fig. 6 is the structural schematic diagram of the business processing device of rule-based engine according to an embodiment of the present invention.Such as Fig. 6 institute
Show, in the business processing device of the rule-based engine of the embodiment of the present invention, Service Processing Module include business processing proxy class,
Business processing encapsulates class and business processing class.The definition of business processing proxy class, business processing encapsulation class and business processing class is such as
Preceding described, which is that the service logic for decoupling out from engine rule can extract business with the accumulation of exploration project
The versatility of processing module reduces repeated work.
Object entity example includes the business processing generation of business input object, business output object and business processing proxy class
Manage object.Business input object and business output object are incoming collectively as the parameter of Service Processing Module, rather than in business
Generated in processing module, be in order to make the Service Processing Module of different business can handle identical data example, avoid repeatedly into
Row introduces/takes out operation.
Regulation engine includes regulation engine example and regulation engine agency;Regulation engine example implementation rule example and object
The matching of entity instance;Regulation engine agency directly interacts with data user, needs rule example and object entity example
On the one hand two memory instances, regulation engine agency will encapsulate because bottom is changed using regulation engine example bring difference
Come, provides external unified call interface in this layer;The life cycle of another aspect management rule engine instance, avoids being repeated as many times
Establish regulation engine example.Regulation engine need to only carry out processing to three objects in object entity example can be realized business and patrols
Volume, it is no longer necessary to additional rule definition is carried out, reduces the complexity of rule file, increases the readability of rule file,
Ease for maintenance.
Rule example includes rule file and rule cache;Rule file itself can be put into the storaging mediums such as database,
Convenient for being managed to business processing device;Rule cache is used for storage rule file, larger preferably to receive data scale
Data or stream data.
Caching management module includes that rule cache is monitored, rule cache management and Service Processing Module cache;Rule cache
It monitors and realizes a long connection, when the rule file in database updates, rule cache monitoring is notified that rule cache
Management allows rule cache management to carry out respective operations;Service Processing Module caching is used for the data of storage service processing module, prison
The update of the module is listened, to support the demand of dynamically load data.
From the above, it can be seen that the execution function by stating business processing proxy class in rule file, by portion
Separate service handles logic and executes from being transferred in business processing object in rule file, and rule file light weight is simple, reduces rule
Then file writes quantity, increases readability, the maintainability of rule file;Determining for class is realized by primary development language
Justice, the business for executing function execute logic, and developer can quickly go up hand;It is executed by the execution function of business processing object
Service logic can extract versatility, reduce repeated work;The update of monitoring rule file, it is convenient that pipe is carried out to rule file
Reason.
Fig. 7 show can using the rule-based engine of the embodiment of the present invention method for processing business or rule-based draw
The exemplary system architecture 700 for the business processing device held up.
As shown in fig. 7, system architecture 700 may include terminal device 701,702,703, network 704 and server 705.
Network 704 between terminal device 701,702,703 and server 705 to provide the medium of communication link.Network 704 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 701,702,703 and be interacted by network 704 with server 705, to receive or send out
Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 701,702,703
The application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 701,702,703 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 705 can be to provide the server of various services, for example, to administrator using terminal device 701,702,
The back-stage management server that the 703 original service data obtained are handled.Back-stage management server can be to the original received
Beginning business datum carries out the processing such as data cleansing, and processing result (such as data cleansing result) is fed back to terminal device.
It should be noted that the method for processing business of rule-based engine is generally by servicing provided by the embodiment of the present application
Device 705 executes, and correspondingly, the business processing device of rule-based engine is generally positioned in server 705.
It should be understood that the number of terminal device, network and server in Fig. 7 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
According to an embodiment of the invention, the present invention also provides a kind of electronic equipment and a kind of computer-readable medium.
Electronic equipment of the invention includes:One or more processors;Storage device, for storing one or more journeys
Sequence, when one or more of programs are executed by one or more of processors, so that one or more of processors are real
A kind of method for processing business of rule-based engine of the existing embodiment of the present invention.
Computer-readable medium of the invention is stored thereon with computer program, real when described program is executed by processor
A kind of method for processing business of rule-based engine of the existing embodiment of the present invention.
Below with reference to Fig. 8, it illustrates the computer systems 800 being suitable for realize the electronic equipment of the embodiment of the present invention
Structural schematic diagram.Electronic equipment shown in Fig. 8 is only an example, function to the embodiment of the present invention and should not use model
Shroud carrys out any restrictions.
As shown in figure 8, computer system 800 includes central processing unit (CPU) 801, it can be read-only according to being stored in
Program in memory (ROM) 802 or be loaded into the program in random access storage device (RAM) 803 from storage section 808 and
Execute various movements appropriate and processing.In RAM 803, also it is stored with computer system 800 and operates required various programs
And data.CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805
It is connected to bus 804.
I/O interface 805 is connected to lower component:Importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.;
And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because
The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon
Computer program be mounted into storage section 808 as needed.
Particularly, disclosed embodiment, the process of key step figure description above may be implemented as counting according to the present invention
Calculation machine software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable
Computer program on medium, the computer program include the program code for executing method shown in key step figure.?
In such embodiment, which can be downloaded and installed from network by communications portion 809, and/or from can
Medium 811 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 801, system of the invention is executed
The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more conducting wires, just
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.Described module also can be set in the processor, for example, can be described as:A kind of processor packet
Include sending module, matching module and processing module.Wherein, the title of these modules is not constituted under certain conditions to the module
The restriction of itself, for example, sending module is also described as " having business input object, business output object and business
The object entity example of processing agent object is sent to the module of the regulation engine ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be
Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes
Obtaining the equipment includes:By the object entity example with business input object, business output object and business processing agent object
It is sent to the regulation engine;According to the object entity example, phase is matched from the rule file of regulation engine concentration
The rule file answered;It wherein, include the execution function of business processing proxy class in the rule file;Call the rule file
Execution function obtain business processing object, it is corresponding to be carried out by the business processing object to the business input object
Business logic processing result is encapsulated into the business output object by business logic processing.
From the above, it can be seen that the execution function by stating business processing proxy class in rule file, by portion
Separate service handles logic and executes from being transferred in business processing object in rule file, and rule file light weight is simple, reduces rule
Then file writes quantity, increases readability, the maintainability of rule file;Determining for class is realized by primary development language
Justice, the business for executing function execute logic, and developer can quickly go up hand;It is executed by the execution function of business processing object
Service logic can extract versatility, reduce repeated work;The update of monitoring rule file, it is convenient that pipe is carried out to rule file
Reason.
Method provided by the embodiment of the present invention can be performed in the said goods, has the corresponding functional module of execution method and has
Beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present invention.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright
It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any
Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention
Within.