Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
As shown in Figure 1, the attribute of the rule in the intelligent rules model of the application includes static attribute and dynamic attribute,
Static attribute is the attribute set by static fixation, including such as service priority, estimate time-consuming static attribute, it is above-mentioned quiet
State attribute belongs to fixed attribute, cannot change.And dynamic attribute is executive condition with rule model and the dynamic that changes
Attribute, including for example regular daily calling amount, operation result properties of distributions, dynamic thresholding attribute, operation time-consuming, average operation
The dynamic attributes such as time-consuming.And regular Dynamic attribute values are by ratio-dependent corresponding between each Dynamic attribute values, when each dynamic category
Property value when changing, regular Dynamic attribute values follow variation according to corresponding.Correspondingly, the attribute value of rule is also by static attribute value
Ratio-dependent between Dynamic attribute values, when the Dynamic attribute values of rule change, regular attribute value also changes therewith.It is logical
Aforesaid way is crossed, the attribute value of each rule in rule model can be changed with the variation of corresponding Dynamic attribute values.?
In the application, intelligent rules model is the priority being performed according to each rule and logical operation relationship and constructs, each rule
The priority and logical operation relationship being performed are determined according to the attribute value of rule.It is fabricated in each intelligent rules model
When, for rule each in rule model, the priority and logical operation relationship that each rule is performed can be also dynamically adjusted,
This dynamic adjustment is carried out according to the variation of the attribute value of each rule.
As shown in Fig. 2, two of a kind of embodiment (the A and D) or (C and D) for the intelligent rules model of the application
Pitch the expression formula of tree construction comprising positioned at the logical operator or and two logical operator and of the branch node of tree,
And regular A, rule B, rule C, the rule D, above-mentioned rule model (A and D) or (C and of the leaf node positioned at tree
D in), because of the priority level highest of bracket, therefore, the logical operation of the and between the preferential regular A and rule B executed in bracket
The logical operation relationship of and between regular C in relationship and bracket and rule D, then above-mentioned two implementing result is executed or's
Logical operation relationship.Regular A, rule B, rule C, rule D can be performed separately, before not being with the execution of other rules
It mentions.
The intelligent rules model of the application is configured to dual-thread or the mode of multithreading executes, as shown in figure 3, being this Shen
The embodiment of the dual-thread of intelligent rules model please, in executing rule model (A and B) or (C and D), it is assumed that rule
The sequence of the priority that then A, rule B, rule C, rule D are performed from high to low is successively are as follows: regular A, rule D, rule B, rule
Then C judges according to the logical relation between above-mentioned each rule, which can be built into two queues, that is, 1 He of queue
Queue 2 is executed.According to the priority sequence from high to low of above-mentioned rule, this 4 rules are added to queue 1 by repeating query
In queue 2, that is, include rule A and rule B in queue 1, include rule D and rule C in queue 2, then by thread 1 and thread 2
According to the priority sequence from high to low for the rule for including in respective queue, it is performed simultaneously in queue 1 and queue 2 respectively and includes
Rule, that is, thread 1 successively executes the regular A that includes in queue 1 and rule B, and thread 2 successively executes the rule for including in queue 2
Then D and rule C.As shown in figure 3, if the tail portion of the two queues connected, can be obtained under the scene of above-mentioned deque
" dique " that one both ends priority is high, middle priority is low, two threads can respectively from the both ends of the dique to
Intermediate successively executing rule.
It, can the complete rule model of quick execution (A and B) or (C under the executive mode of above-mentioned deque and dual-thread
And D) in all rules, the execution efficiency of intelligent rules model can be improved.Executing other complicated rule models
In, rule model can also be split into more than two queues, by the priority level for being performed order of individual queue at two
Or corresponding rule is executed in more than two threads.
The implementation procedure and implementing result of the rule of the intelligent rules model of the application export in the form of statements, Ke Yizhi
The display respective rule of sight corresponding such as left and right fiducial value, implementing result, triggering reason, distribution of results, calling in commission
The situation of amount etc..When encounter need analysis rule run and triggering reason when, can quickly through report present and also meta-rule
The case where when execution, at the same also can analyze out rule dynamic attribute and discovery rule there are the problem of etc..
The intelligent rules model of the application when being executed, is able to achieve the function of the short circuit when executing, and the rule is short-circuited
I.e. rule is not performed when meeting certain condition, such as: assuming that the first rule makees logic "and" operation with Second Rule, if the
One regular implementing result is false, then Second Rule meets the condition not executed, and Second Rule does not execute;For another example: assuming that first
Rule makees logical "or" operation with Second Rule, if the first regular implementing result is ture, Second Rule satisfaction is not executed
Condition, Second Rule do not execute.As shown in figure 4, when such as executing rule model (A and B) or (C and D), the rule
Model is built into queue 1 and queue 2 is executed., it is located at regular A and the rule of the execution starting point of queue 1 and queue 2
Then D is executed at first simultaneously in thread 1 and thread 2, the rule positioned at the position of the execution starting point of queue 1 and queue 2
Priority level highest in respective queue.As the implementing result false of regular A, regular B can be short-circuited, and regular B is not held
Row, the implementing result false of regular A are directly copied to regular B, and the implementing result of rule combination (A and B) is false, and
Subsequent arithmetic is carried out with this implementing result.And simultaneously, when the operation result of regular D be true when, regular C is not short-circuit, regular C after
Continuous to be performed, finally the implementing result by rule combination (C and D) i.e. queue 2 combines (A and B) i.e. team with aforementioned rule
After the implementing result false of column 1 executes the logical operation of Or, finally holding for rule model (A and B) or (C and D) is obtained
Row result.The rule short circuit of unnecessary execution can be shortened rule model by the mode short-circuit when executing through the above way
Execution time-consuming and execute burden, effectively improve execution efficiency.
As seen in figs. 5-6, the method for building and the execution of the intelligent rules model provided for embodiments herein, specifically
Include the following steps:
S101: processing equipment receives the trigger request of building rule model.
In embodiments herein, the processing equipment can make terminal, can be server, wherein the terminal
Including but not limited to: personal computer (Personal Computer, PC), mobile phone, tablet computer etc..Processing equipment receives touching
Hair request prepares building rule model.
S102: processing equipment constructs rule model configuration platform.
The processing equipment transfers corresponding rule from rule model container.It is used for configuring corresponding rule model.
S103: processing equipment constructs rule model platform.
The attribute value for each rule that the processing equipment analysis is transferred, including its static attribute value and dynamic attribute
Value, processing equipment determines the attribute value of each rule according to the static attribute value and Dynamic attribute values of each rule, further according to each rule
Attribute value determine priority and logical operation relationship that it is performed, the corresponding rule model of dynamic construction.
S104: processing equipment is called and executing rule model.
Processing equipment executes above-mentioned configured rule model, is built into the queue of at least more than one, and with individual queue
The priority level for being performed order height, sequentially or simultaneously executed in dual-thread or multithreading, execute constitute in
It is carried out in a manner of the short circuit when executing.After obtaining implementing result, processing equipment carries out subsequent arithmetic.
S105: the implementation procedure and implementing result of processing equipment analysis rule model.
Processing equipment resets each rule according to the variation of the dynamic attribute of each rule in the implementing result of rule model
The attribute value of Dynamic attribute values and corresponding rule then.The implementation procedure and implementing result of the rule of rule model are with report
Form output shows respective rule such as left and right fiducial value in commission, implementing result, triggering reason, distribution of results, tune
The situation of dosage etc..
By the above process, processing equipment according to rule attribute value variation the case where, dynamically adjust it is each rule between
Execution priority and logical operation relationship, and the corresponding rule model of dynamic construction, to improve the execution efficiency of rule model.
A kind of embodiment of intelligent rules model system of the application introduced below
Receiving unit 201, for receiving triggering command;
Unit 201 is transferred, for transferring corresponding rule from rule container;
Analytical unit 202, for analyzing the attribute of the rule transferred, with each rule of determination be performed priority and
Logical operation relationship;
Configuration unit 203, for according to above-mentioned analytical unit as a result, the corresponding rule model of dynamic configuration;
Execution unit 204 for executing above-mentioned configured rule model, and obtains implementing result;
Output unit 205, for exporting the implementation procedure of above-mentioned rule and implementing result with report form.
A kind of specific application scenarios are introduced with reference to embodiments.
For example, payment platform needs to check account when user executes the progress delivery operation of its on-line payment account by mobile phone
The operator at family carries out authentication, the risk being stolen with control account.In verification process, the processing equipment of payment platform
Certification is executed to the identity of operator by one intelligent rules model of building, such as to the cipher authentication of account, account's operation
The certification in place, international mobile device international identity code (the International Mobile of the mobile phone of operational account
Equipment Identity, IMEI) certification, the certification of short message certification code.And the cipher authentication of account is set as rule
A, the certification of account's operation place are rule B, the international mobile device international identity code of the mobile phone of operational account
The certification of (International Mobile Equipment Identity, IMEI) is rule C, the certification of short message certification code
For regular D.As shown in fig. 7, processing equipment is transferred above-mentioned when receiving request to account's progress delivery operation from rule container
Rule, regular A can be placed into the first end first position 11 of the expression formula of rule model, and regular D is placed into rule model
The second end first position 21 of expression formula, regular B are placed into the first end second position 12, and regular C is placed into second end second
22 are set, new intelligent rules model (A and B) or (C and D) is built into this, processing equipment executes the rule mould
Type (A and B) or (C and D) carries out authentication to the operator of account.Meet in the password and operation place of account
It is required that or operational account mobile phone IMEI and short message certification code when meeting the requirements, the identity of processing equipment authentication operation person is closed
Method.
It please refers to shown in Fig. 4, processing equipment is first when executing above-mentioned intelligent rules model (A and B) or (C and D)
It is first built into queue 1 and queue 2, the regular A and rule D for being located at the position of the execution starting point of queue 1 and queue 2 are online
It is executed at first simultaneously in journey 1 and thread 2, i.e., cipher authentication and short message certification are performed in processing simultaneously.As regular A
Implementing result false when, i.e., when cipher authentication reports an error, regular B is short-circuited without executing, and the implementing result of regular A is directly multiple
It makes to regular B, i.e. the operation place of account does not authenticate, directly with false as a result, the implementing result of (A and B) is
False, this stage, the authentication failure of the operator of account.Meanwhile when the operation result of regular D is true, i.e. short message
It authenticates successfully, regular C is not short-circuit, and regular C continues to be performed, that is, continues the IMEI for authenticating mobile phone, such as the implementing result of rule C
Also for true namely mobile phone IMEI certification success, then the implementing result of (C and D) is true, finally with aforementioned (A
And B) implementing result false execute Or logical operation after, obtain rule model (A and B) or (C and D) most
Whole implementing result is true, and operator's identity that processing equipment authenticates account is legal, executes delivery operation.Conversely, in (A and
B when implementing result) is false, if the implementing result of (C and D) is also false, processing equipment authenticates the operation of account
Person's identity be it is illegal, followed in the implementation procedure of (A and B) and (C and D) while execute while short circuit mode.
After payment platform executes a period of time, the dynamic category of regular A, rule B, rule C and rule D in rule container
Property change, such as the operation time-consuming of rule B is shorter, be suitble to it is preferential execute, change and reach in the dynamic attribute of above-mentioned rule B
The attribute of the value centainly triggered, regular B changes therewith.Processing equipment receive request construct corresponding rule model when, by pair
The execution order of each rule is redefined after the analysis of the attribute of each rule, regular B can be placed into the expression formula of rule model
First end first position 11, regular D are placed into the second end first position 21 of the expression formula of rule model, and regular A is placed into
One end second position 12, regular C are placed into the second end second position 22, are built into a new intelligent rules model (B and
A)or(C and D).When account is operated, rule model also can be first built into queue 1 and queue 2, at this point, rule B and
Regular D is located at the position of the execution starting point of queue 1 and queue 2, on queue is built after, processing equipment can be in 1 He of thread
Preferential executing rule B and rule D simultaneously in thread 2, for example, when the implementing result of regular B is false, i.e. the operation of account
Place mistake, regular A are short-circuited, i.e. the not password of reauthentication account, but directly using the implementing result false of regular A as
Implementing result, then the implementing result of (B and A) is false.In this way, processing equipment is at execution (B and A), it is spent
Time is the time spent by executing rule B, because the execution time of regular B is shorter, executes the time spent by (B and A) just
It is shorter by.Above-described embodiment illustrates the intelligent rules model of the application according to the attribute of each rule, and processing equipment dynamic adjusts
The priority of execution order between each rule, to improve the execution efficiency of rule model.In other embodiments, the application
The logical operation relationship between each rule in intelligent rules model can also be dynamically adjusted, such as above-mentioned intelligent rules model
After the dynamic attribute of each rule changes, processing equipment can also be adjusted dynamically between rule model (A and B) or (C and D)
Other intelligence such as the logical operation relationship, such as (A or D) or (B and C), or (A and D) and (C or D) of each rule
Can rule model, the purpose of adjustment is while to ensure the execution of rule model premised on the execution efficiency for improving rule model
As a result meet demand.
By the above-mentioned means, the regular execution sequence energy equipment processed of the intelligent rules model of the application is according to each rule
Attribute variation and dynamic adjusts, and with dual-thread, the mode of the side Bian Zhihang short circuit executes the expression of intelligent rules model
Formula effectively improves the execution efficiency of the intelligent rules model of the application.It, can especially when multiple users are performed simultaneously operation
Effectively to mitigate the burden of processing equipment, the treatment effeciency of processing equipment is promoted.The implementing result of rule
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.