CN104679790B - The method of distributed rule automotive engine system, building method and executing rule processing - Google Patents

The method of distributed rule automotive engine system, building method and executing rule processing Download PDF

Info

Publication number
CN104679790B
CN104679790B CN201310641753.6A CN201310641753A CN104679790B CN 104679790 B CN104679790 B CN 104679790B CN 201310641753 A CN201310641753 A CN 201310641753A CN 104679790 B CN104679790 B CN 104679790B
Authority
CN
China
Prior art keywords
rule
regulation engine
engine
distributed
binary string
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.)
Expired - Fee Related
Application number
CN201310641753.6A
Other languages
Chinese (zh)
Other versions
CN104679790A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201310641753.6A priority Critical patent/CN104679790B/en
Publication of CN104679790A publication Critical patent/CN104679790A/en
Application granted granted Critical
Publication of CN104679790B publication Critical patent/CN104679790B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of method that distributed rule automotive engine system, distributed rule engine building method and executing rule processing are provided.The distributed rule automotive engine system includes at least one such regulation engine:Rete network is deployed with the regulation engine, the Rete network is associated with one or more rule sets.Wherein, the pattern being included in included by the regular conditional side of same rule concentration is similar each other.The system, which realizes, farthest shares part matching result inside single regulation engine, so as to improve execution efficiency.

Description

The method of distributed rule automotive engine system, building method and executing rule processing
Technical field
Present disclose relates generally to distributed rule engine, more particularly to one kind can in single regulation engine maximum journey Share distributed rule automotive engine system, its building method and use distributed rule engine system of part matching result in degree ground The method of system executing rule processing.
Background technology
Currently, production or service logic are represented by the form of rule in fields such as productions.By using computer skill Art, pattern match is carried out to true and condition using regulation engine by wheel, to find out the rule of the condition of satisfaction, and solved Selection meets the rule in the rule of condition to perform after conflict.Currently, Rete is most important mould in regulation engine One of formula matching algorithm.
With the development of business, the scale of rule will inevitably increase.At this moment, single regulation engine is due to resource (Such as internal memory, CPU disposal abilities etc.)Limitation will be unable to handle these large-scale rules.Traditional distributed rule engine Rule is distributed into progress parallel processing on multiple regulation engines can solve this problem.
However, traditional distributed rule engine, such as ViDRE(Vienna distributed rule engines)Only by SOA (Service-Oriented Architecture Based, Service-Oriented Architecture) and RuleML(Rule markup language, Rule Markup Language)Solve the Interoperability between regulation engine, and do not consider how inside each regulation engine most Pass through alpha or beta nodes sharings part matching result to big degree.Therefore, traditional distributed rule automotive engine system and its Construction and application method can not be based on Rete algorithms and improve execution efficiency.
The content of the invention
In view of the presence of the problem of, the purpose of the disclosure is to provide a kind of new and improved, can make each regulation engine Inside farthest passes through distributed rule automotive engine system, the distribution of alpha or beta nodes sharing pattern match results Regulation engine building method and rules process method.
According to an aspect of this disclosure, there is provided a kind of distributed rule automotive engine system.The system include it is at least one this The regulation engine of sample:Rete network is deployed with the regulation engine, Rete network is associated with one or more rule sets;Its In, the pattern being included in included by the regular conditional side of same rule concentration is similar each other.
At least one of condition in the rule that each regulation engine in the distributed rule automotive engine system is allocated The pattern that side is included can have higher similarity.In other words, in the disclosure so that in same regulation engine extremely The pattern of the condition part of few part rule is as identical as possible.Using Rete algorithms, these identical patterns will be used for structure The shared node of part, to share part matching result when rule performs.Accordingly, it is capable to effectively improve distributed rule engine Execution efficiency.
In in accordance with an embodiment of the present disclosure, distributed rule automotive engine system can include:First order alpha networks, its Construction is outside single regulation engine, for the fact to be arranged into appropriate regulation engine;And second level alpha networks, It is constructed within single regulation engine, for the fact to be arranged into appropriate alpha nodes.
The foundation of double-deck alpha networks not only guarantees the fact being arranged into correct alpha nodes, and makes it possible to It is enough that the fact is arranged into correct regulation engine.
In in accordance with an embodiment of the present disclosure, the first order and/or second level alpha networks can carry out cloth using hash method Put the fact.
In in accordance with an embodiment of the present disclosure, the first order and/or second level alpha networks can be according to the attribute-names of the fact Claim to arrange the fact.
In in accordance with an embodiment of the present disclosure, the first order and/or second level alpha networks can be according to the attributes of the fact Value arranges the fact.
In in accordance with an embodiment of the present disclosure, distributed rule automotive engine system can also include:First order agenda, its structure Make within single regulation engine, for solving the conflict in each regulation engine;And second level agenda, it is constructed Outside single regulation engine, for solving the conflict between each regulation engine.
Double-deck agenda foundation so that be not only able to solve rushing in matching result inside each regulation engine It is prominent, and can solve the problem that the conflict in the matching result between each regulation engine.
In in accordance with an embodiment of the present disclosure, double-deck agenda or therein any layers can be sorted using merger to solve Conflict.
According to another aspect of the present disclosure, there is provided a kind of distributed rule engine building method.This method includes:By condition Pattern included by side each other similar regular partition to identical rule set;Each rule set obtained by dividing is closed It is linked to one of regulation engine of system;And the rule for concentrating the strictly all rules associated with same rule engine is compiled into Rete Network is simultaneously disposed in regulation engine.
It can include in accordance with an embodiment of the present disclosure, the step of division:Each pattern is extracted from the conditional side of rule;With And the binary string according to corresponding to the pattern of extraction obtains rule, and divided according to binary string;Wherein, binary string Each corresponding pattern, 1 expression corresponding modes are present in rule, and 0 expression corresponding modes are not present in rule;And And wherein, the length of binary string is equal to the quantity of all patterns included in strictly all rules to be divided.
It is N in the quantity of rule, the quantity of regulation engine is K, and wherein N is more than K's in accordance with an embodiment of the present disclosure In the case of, division can also include:A is operated:Step-by-step exclusive-OR operation is carried out two-by-two to binary string corresponding to strictly all rules, looked for Go out and cause in exclusive-OR operation result containing the set that rule corresponding to 1 the largest number of two binary strings is initial as two Center;B is operated:According to all cluster centers for not being binary string corresponding to the rule of cluster center and having obtained Corresponding binary string carries out the result of step-by-step exclusive-OR operation, and it is most to find out the number for contain in exclusive-OR operation result 1 Binary string corresponding to non-cluster center rule as new cluster center;C is operated:B operations are repeated, until cluster center Number be equal to K;D is operated:To each rule not in arbitrary collection, by its corresponding binary string and each cluster center Corresponding binary string carries out step-by-step with operation, finds out the largest number of cluster centers for causing to contain 1 in operation result, The rule is added in the set, then, step-by-step is carried out to binary string corresponding to the strictly all rules that is included in the set OR operation, using the binary string that OR operation the obtains corresponding binary string new as the cluster center;And e operations: D operations are repeated, until strictly all rules is all in set.
In in accordance with an embodiment of the present disclosure, in b operations, the result of calculation of the preserved a operations of inquiry can be passed through To obtain the result of exclusive-OR operation.
According to another aspect of the present disclosure, there is provided a kind of side handled using distributed rule automotive engine system executing rule Method.The distributed rule engine is the regulation engine constructed according to distributed rule engine building method above.This is held The method of line discipline processing includes:Via the alpha networks being configured in outside single regulation engine, it is appropriate that the fact is arranged into Regulation engine.
Performed according to the distributed rule automotive engine system of the disclosure, distributed rule engine building method and rule process Method is effectively improved the execution efficiency of distributed rule automotive engine system.
Brief description of the drawings
With reference to the explanation of embodiment of the disclosure, can be more readily understood that below in conjunction with the accompanying drawings the disclosure more than and Other objects, features and advantages.In the accompanying drawings, identical or corresponding technical characteristic or part will use identical or corresponding attached Icon is remembered to represent.The size and relative position of unit need not be drawn out according to ratio in the accompanying drawings.
Fig. 1 is the schematic diagram for the Rete network for illustrating the scene that different rule combinations is assigned to two regulation engines.
Fig. 2 is to illustrate showing the different regular Rete networks for combining another scene for being assigned to two regulation engines It is intended to.
Fig. 3 is to illustrate showing the different regular Rete networks for combining another scene for being assigned to two regulation engines It is intended to.
Fig. 4 is the flow chart for illustrating the Distributed engine building method according to the embodiment of the present disclosure.
Fig. 5 is to illustrate to carry out feature extraction according to the pattern to rule condition side of the embodiment of the present disclosure, to obtain correspondingly Binary string, the schematic diagram then divided.
Fig. 6 is to illustrate the method according to the similarity according to pattern of the embodiment of the present disclosure is regulation engine allocation rule Flow chart.
Fig. 7 is the structure chart for illustrating the distributed rule automotive engine system according to the embodiment of the present disclosure.
Fig. 8 is the flow chart for illustrating the method handled according to the executing rule of the embodiment of the present disclosure.
Fig. 9 is to illustrate to be arranged via outwardly and inwardly alpha Web vector graphics hash method according to the embodiment of the present disclosure True schematic diagram.
Figure 10 is to illustrate to solve the schematic diagram of conflict via inside and outside agenda according to the embodiment of the present disclosure.
Figure 11 is the block diagram for showing to realize the example arrangement of the computer of the present invention.
Embodiment
Illustrate embodiment of the disclosure with reference to the accompanying drawings.It should be noted that for purposes of clarity, in accompanying drawing and explanation Eliminate the expression and description of part unrelated with the disclosure, well known by persons skilled in the art and processing.
In the regulation engine using Rete, it is desirable to effectively improve the execution efficiency of distributed rule engine.The disclosure Attempt by realizing execution efficiency by alpha or beta nodes sharings matching result as much as possible when executing rule Improve.The disclosure for each regulation engine in distributed rule automotive engine system by distributing appropriate rule, and by the rule of distribution Rete network is then compiled as to be disposed, to realize by alpha or beta nodes sharings part matching result.
It by taking the rule listed in following list of rules as an example, will illustrate how each rule being suitably allocated to respectively below Individual regulation engine.Example rule list is:
Rule 1:If C1^C2^C3^C4, P1
Rule 2:If C1^C2^C3^C5, P2
Rule 3:If C6^C7, P3
Rule 4:If C1^C6^C7, P4
Wherein, the pattern that C1 to C7 is included by each rule condition side, P1 to P4 are to meet corresponding to each regular condition The operation of execution.
It is assumed for convenience of description that rule engine system to be constructed carries out distributed place using two regulation engines Reason.Then, the combination of 7 rule sets can be obtained by above rule list:
Combination 1:(rule 1, rule 2), (rule 3, rule 4)
Combination 2:(rule 1, rule 3), (rule 2, rule 4)
Combination 3:(rule 1, rule 4), (rule 2, rule 3)
Combination 4:(rule 1), (rule 2, rule 3, rule is 4) }
Combination 5:(rule 2), (rule 1, rule 3, rule is 4) }
Combination 6:(rule 3), (rule 1, rule 2, rule is 4) }
Combination 7:(rule 4), (rule 1, rule 2, rule is 3) }
If constructing distributed rule engine according to several different combinations above respectively, what each combination was obtained The execution efficiency of regulation engine will have marked difference.Because it can with obvious find out that combination 4-7 situation will not be than combination 1-3 execution efficiency is more preferable, below only to combine 1-3 situation be compared.
Fig. 1 is to illustrate that rule 1 and rule 2 are assigned into same regulation engine as shown in combination 1(Regulation engine 1), and incite somebody to action Rule 3 and rule 4 are assigned to another regulation engine(Regulation engine 2)Scene Rete network schematic diagram.Fig. 2 is to illustrate such as Rule 1 and rule 3 are assigned to same regulation engine shown in combination 2, and rule 2 and rule 4 are assigned to another regulation engine Scene Rete network schematic diagram.Fig. 3 is to illustrate that rule 1 and rule 4 are assigned to same rule and drawn as shown in combination 3 Hold up, and rule 2 and rule 3 are assigned to the schematic diagram of the Rete network of the scene of another regulation engine.
As shown in figure 1, in the Rete network of combination 1, only alpha nodes can not be shared corresponding to pattern C1.And such as Shown in Fig. 2, in the Rete network of combination 2, except alpha nodes corresponding to pattern C1, also pattern C2, C3, C6 and C7's Alpha nodes can not be shared.As shown in figure 3, combination 3 in, with combine 2 in situation it is identical, pattern C1, C2, C3, C6 and C7's Alpha nodes can not all be shared.Therefore, as can be seen that combination 1 can be in each rule in the Rete network in combining 1-3 The part matching result of alpha and beta nodes storage is shared in engine to the full extent.
Found after concrete analysis, rule 1 and rule 2 have identical pattern C1^C2^C3, and rule 3 and rule 4 have Identical pattern C6^C7.The two patterns are the common patterns of most long two included in this all four rule.In other words Say, the pattern in rule 1 and rule 2 has a higher similarity, and the pattern in rule 3 and rule 4 is with higher similar Degree.
Found based on more than, so construct the distributed rule automotive engine system according to the disclosure so that the system includes At least one such regulation engine:Rete network, Rete network and one or more rule sets are deployed with the regulation engine It is associated;Wherein, the pattern being included in included by the regular conditional side of same rule concentration is similar each other.Here, Rete nets Network is meant that with rule set " associated ":Alpha and beta nodes in Rete network and each rule condition side in rule set Each pattern or mode combinations it is corresponding.In other words, Rete network forms according to one or more rule set compilings.
The pattern included by regular conditional side in rule set is similar each other, enabling is shared in regulation engine The part storage result of alpha and beta nodes storage, so as to improve the efficiency of regulation engine.Included by the conditional side of rule The similarity of pattern is higher, and the part storage knot of alpha and beta nodes storage can be more fully shared in regulation engine Fruit, thus so that the execution efficiency of regulation engine is higher.
The Distributed engine system is constructed with accordingly, being also disclosed according to the distributed rule automotive engine system of the disclosure Method.Fig. 4 is the flow chart for illustrating the Distributed engine building method according to the embodiment of the present disclosure.
In step S401, by the pattern included by conditional side each other similar regular partition to identical rule set.Can To adopt the similarity for carrying out the pattern that the conditional side of comparison rule is included in various manners as needed.Below, only with one kind side Illustrated exemplified by method.
For example, the pattern that can be included before being divided to the conditional side of rule pre-processes.Specifically, may be used To extract each pattern from the conditional side of rule first.Then, binary system corresponding with the rule is obtained according to the pattern of extraction String, to be divided according to obtained binary string.Each corresponding pattern of binary string can be made.Wherein, 1 represent Corresponding modes are present in rule, and 0 expression corresponding modes are not present in rule.It can cause the length of binary string is equal to treat The quantity for all patterns that the strictly all rules of division includes.
, can be by conditional side institute after pretreatment has obtained each binary string corresponding with pattern more than passing through Comprising pattern between similarity highest regular partition into identical set.Arranged in Fig. 5 with example rule above-mentioned Table(Regular 1-4)Exemplified by, show and feature extraction is carried out to the pattern of rule condition side, to obtain corresponding binary string, then The example divided.
As shown in figure 5, with rule 1 and 2 corresponding to the value of binary string and the corresponding positions of pattern C1 to C3 be all 1, and With rule 3 and 4 corresponding to the value of binary string and the corresponding positions of pattern C6 and C7 be all 1.By observation understand, rule 1 with The conditional side pattern of rule 2 is similar each other, thus is divided into regular collection 1;And the conditional side pattern of rule 3 and rule 4 is each other It is similar, thus it is divided into regular collection 2.
Can be by between pattern that the logical operation between the corresponding position of binary string is included come design conditions side Similarity.It is then possible to by the higher rule of the similarity of pattern(That is, pattern similar rule each other)It is divided into as much as possible In one set.
Then, processing proceeds to step S402.In step S402, each rule set obtained by dividing is associated One of regulation engine to system.
The example of method according to Pattern similarity allocation rule is described with reference to Fig. 6.Fig. 6 is illustrated according to this public affairs The similarity according to pattern for opening embodiment is the flow chart of the method for regulation engine allocation rule.
Hereinafter it is assumed that the quantity of rule is N, the quantity of regulation engine is K, and wherein N is more than K.In Fig. 6 step S601 In, step-by-step exclusive-OR operation is carried out two-by-two to binary string corresponding to strictly all rules, found out so that containing 1 in exclusive-OR operation result The largest number of two binary strings corresponding to the rule cluster center initial as two.In other words, in step S601 In, two minimum rules of the similarity of the pattern of conditional side regular in strictly all rules are found out first, as two initial rule The aggregation benchmark then gathered.
After the center of two regular collections is found, in step S602, determine whether the quantity K of engine is more than 2.When true When being set to K more than 2, processing enters step S603.When being defined as K no more than 2, i.e. when K is equal to 2, processing enters below in detail The step S605 of explanation.
In step S603, the center of other regular collection is continually looked for.Specifically, for example, can be according to in step Binary string corresponding to rule outside the rule as cluster center found in rapid S602 with step S602 Binary string corresponding to two obtained cluster centers carries out the result of step-by-step exclusive-OR operation, finds out so that exclusive-OR operation knot Rule containing non-cluster center corresponding to 1 the largest number of binary strings in fruit is as new cluster center.Then, handle into Row arrives step S604.
In step s 604, it is determined that whether the regular number at the center as regular collection found is equal to K.
If being not equal to K, processing returns to step S603, according to it is all be not two corresponding to the rule of cluster center Corresponding with the obtained all cluster centers binary string of system string carries out the result of step-by-step exclusive-OR operation, find out so that Rule containing non-cluster center corresponding to 1 the largest number of binary strings in exclusive-OR operation result is as in new set The heart.Until the regular number at the center as regular collection for determining to have found in step s 604 is equal to K.
Determination in step S603 to new cluster center may not necessarily carry out exclusive-OR operation again, but read storage The result of the exclusive-OR operation obtained in step s 601 stored in device.
When being defined as the rule number as cluster center in step s 604 and being equal to K, processing proceeds to step S605. In step s 605, it is to each not rule in any group, its corresponding binary string is corresponding with each cluster center Binary string carries out step-by-step with operation, finds out the largest number of cluster centers for causing to contain 1 in operation result, this is advised Then it is added in the set.Then, step-by-step OR operation is carried out to binary string corresponding to the strictly all rules that is included in the set, Using the binary string that OR operation the obtains corresponding binary string new as the cluster center.Then, step proceeds to S606.
In step S606, it is determined whether strictly all rules is all divided into regular collection.If still regular do not drawn Assign in set, then processing returns to step S605, continues the distribution rules between K set.If strictly all rules all should be through It is divided into regular collection, then processing enters step S607.
In step S607, the rule association in the identical set that division is obtained is into identical regulation engine.So Afterwards, processing terminates.
Fig. 4 is now turned to, is gone on to say according to the distributed rule engine building method of the embodiment of the present disclosure for rule Engine is assigned with the subsequent operation after appropriate rule.After appropriate rule is assigned with for regulation engine, in step S403, The rule that the strictly all rules associated with same rule engine is concentrated is compiled into Rete network and disposed in regulation engine. Rete network can be compiled using various methods known in the art, and be disposed.
The distributed rule automotive engine system constructed by using distributed rule engine building method described above, due to The pattern included by regular conditional side at least one rule set of its regulation engine association is similar each other, it is thus possible to Pass through alpha or beta nodes sharings part matching result inside regulation engine.So as to it improve the efficiency of system.
Inside regulation engine, the alpha networks for the fact to be arranged into appropriate alpha nodes can be configured with, Hereinafter referred to internal alpha networks(The example of " second level alpha networks ").In distributed rule automotive engine system, also need Consider how the fact being arranged into appropriate regulation engine.In the distributed rule automotive engine system according to the embodiment of the present disclosure In, outside single regulation engine, it is configured to the fact being arranged into the outside alpha networks of appropriate regulation engine(" the The example of one-level alpha networks ").
Furthermore, it is possible to there is the agenda for the conflict in solution rule engine in regulation engine internal structure, hereinafter Referred to as internal agenda(" first order agenda " example)., will when have activated multiple regular simultaneously in single regulation engine The rule of the plurality of conflict is sent into agenda to solve to conflict.In distributed rule automotive engine system, between multiple regulation engines It is able to may also clash, so as to need construction to solve the mechanism of conflict.Draw in the distributed rule according to the embodiment of the present disclosure Hold up in system, outside single regulation engine, be configured to the outside agenda of conflict for solving between each regulation engine (" second level agenda " example).
Fig. 7 is the structure chart for illustrating the distributed rule automotive engine system 700 according to the embodiment of the present disclosure.As shown in fig. 7, point Cloth rule engine system 700 can include:According to the regulation engine 701 of the embodiment of the present disclosure to 70M;Each rule is arranged on to draw Hold up the inside alpha networks 711 to 71M of inside, the inside agenda721 to 72M being arranged on inside each regulation engine.In addition, Distributed rule automotive engine system 700 can also include:It is arranged on the outside alpha networks 730 of single engine outer and sets In the outside agenda740 of single engine outer.In addition, distributed rule automotive engine system 700 can also include the storage fact Working memory memory.
The method handled with reference to Fig. 8 descriptions according to the executing rule of the embodiment of the present disclosure.Fig. 8 is illustrated according to this public affairs Open the flow chart of the method for the executing rule processing of embodiment.
It is single via being configured in step S801 when carrying out rule process using distributed rule automotive engine system 700 Outside alpha networks 730 outside regulation engine, for example it will be arranged into appropriate rule from the fact that working memory memory Engine.Here, suppose that the fact is arranged to regulation engine 701.
Then,, will via internal alpha networks 711 in the regulation engine 701 for being arranged the fact in step S802 The fact is arranged into appropriate alpha nodes.
In accordance with an embodiment of the present disclosure, externally and/or internally alpha networks can arrange the fact using hash method. Fig. 9 is to illustrate to arrange showing for the fact via outwardly and inwardly alpha Web vector graphics hash method according to the embodiment of the present disclosure It is intended to.
The pattern of the condition part used in Fig. 9 and above example list of rules(Regular 1-4)The example used is one Cause.In this example, pattern C1 occurs in rule 1, rule 2 and rule 4.Rule 1 and rule 2 are deployed in engine 1 On, and rule 4 is deployed on regulation engine 2.Therefore, the fact that matched with pattern C1(That is, Property Name is the thing of " on " It is real)It should be transferred on regulation engine 1, it is also to be transmitted to arrive on regulation engine 2.Here, outside alpha networks according to True Property Name arranges the fact.
In addition, in this example, pattern C3 occurs in rule 1 and rule 2.Rule 1 and rule 2 are all deployed in engine On 1.Therefore, the fact that matched with pattern C3(That is, Property Name be " color ", property value the fact that be " red ")Only passed It is defeated on regulation engine 1.Here, it is true due to that can not be arranged according only to Property Name, thus, outside alpha networks also want root The fact is arranged according to the property value of the fact.
Return to Fig. 8.In step S803, regulation engine 701 carries out true each regular condition with its rule set Matching, so as to generate the result for meeting corresponding conditionses.
In step S804, determine whether the rule process result inside regulation engine 701 clashes.Do not occurring In the case of conflict, in step S806, the result is output to outside regulation engine 701.
In case of a collision, step S805 is proceeded to.In step S805, the result of each conflict is transmitted To the inside agenda721 of regulation engine 701, to solve the conflict between each result.Then, will in step S806 Result after Conflict solving is output to outside regulation engine 701.
In step S807, the result and the processing knot of Else Rule engine 702 to 70M of regulation engine 701 are determined Whether clashed between fruit.If no conflict occurred, result is exported to executing agency in step S809.Processing Terminate.
If conflicted between each regulation engine, proceed to step S808.In step S808, by each conflict Result be sent to outside agenda740, to solve the conflict between the result between each regulation engine.Then, Proceed to step S809, result is exported to executing agency.Processing terminates.
In accordance with an embodiment of the present disclosure, internally and/or externally agenda can be sorted using merger to solve to conflict.Figure 10 It is to illustrate to solve the schematic diagram of conflict via inside and outside agenda according to the embodiment of the present disclosure.
In Figure 10 example, inside and outside agenda solves to conflict by the way of merger sequence.With outside Exemplified by agenda, its time being activated according to each rule is ranked up to the rule of conflict.For example, by activationary time away from work as The distance of preceding time come set rule priority.Then, to be set to highest away from the rule that current time is activated recently excellent First level.Thus, result corresponding with the rule is exported, to be operated.
The general principle of the present invention is described above in association with specific embodiment, however, it is desirable to, it is noted that to this area For those of ordinary skill, it is to be understood that the whole either any steps or part of methods and apparatus of the present invention, Ke Yi Any computing device(Including processor, storage medium etc.)Or in the network of computing device, with hardware, firmware, software or Combinations thereof is realized that this is that those of ordinary skill in the art use them in the case where having read the explanation of the present invention Basic programming skill can be achieved with.
Therefore, the purpose of the present invention can also by run on any computing device a program or batch processing come Realize.Computing device can be known fexible unit.Therefore, the purpose of the present invention can also be realized only by providing to include The program product of the program code of method or device is realized.That is, such program product also forms the present invention, and And the storage medium for being stored with such program product also forms the present invention.Obviously, storage medium can be any known deposits Storage media or any storage medium developed in the future.
In the case where realizing embodiments of the invention by software and/or firmware, from storage medium or network to The computer of specialized hardware structure, for example, shown in Figure 11 all-purpose computer 1100 installation form the software program, the calculating Machine is able to carry out various functions etc. when being provided with various programs.
Figure 11 is the block diagram for showing to realize the example arrangement of the computer of the present invention.In fig. 11, CPU (CPU)1101 according to read-only storage(ROM)The program that is stored in 1102 is loaded into arbitrary access from storage part 1108 and deposited Reservoir(RAM)1103 program performs various processing.In RAM1103, work as the various places of CPU1101 execution also according to needing to store Required data during reason.
CPU1101, ROM1102 and RAM1103 are connected to each other via bus 1104.Input/output interface 1105 also connects To bus 1104.
Components described below is connected to input/output interface 1105:Importation 1106, including keyboard, mouse etc.;Output par, c 1107, including display, such as cathode-ray tube(CRT), liquid crystal display(LCD)Deng, and loudspeaker etc.;Store part 1108, including hard disk etc.;And communications portion 1109, including NIC LAN card, modem etc..Communication unit 1109 are divided to perform communication process via network such as internet.
As needed, driver 1110 is also connected to input/output interface 1105.Such as disk of detachable media 1111, CD, magneto-optic disk, semiconductor memory etc. are installed on driver 1110 as needed so that the computer journey read out Sequence is installed in storage part 1108 as needed.
In the case where realizing above-mentioned steps and processing by software, such as may be used from network such as internet or storage medium Dismantle the program that the installation of medium 1111 forms software.
It will be understood by those of skill in the art that this storage medium is not limited to wherein be stored with journey shown in Figure 11 Sequence and method are separately distributed to provide a user the detachable media 1111 of program.The example bag of detachable media 1111 (compact disc read-only memory is included containing disk, CD(CD-ROM)And digital universal disc(DVD)), magneto-optic disk(Include mini-disk (MD))And semiconductor memory.Or storage medium can be hard disk included in ROM1102, storage part 1108 etc., its Middle computer program stored, and user is distributed to together with the method comprising them.
The present invention also proposes a kind of program product for the instruction code for being stored with machine-readable.Instruction code is read by machine When taking and performing, above-mentioned method according to embodiments of the present invention can perform.
Correspondingly, the storage medium of the program product for carrying the above-mentioned instruction code for being stored with machine-readable is also wrapped Include in disclosure of the invention.Storage medium includes but is not limited to floppy disk, CD, magneto-optic disk, storage card, memory stick etc..
In addition, some method and apparatus for combination tool according to an embodiment of the invention, can expand combination Use range.
It should be appreciated by those skilled in the art that this enumerated be it is exemplary, the invention is not limited in this.
As an example, each step of the above method and all modules and/or unit of the said equipment can To be embodied as software, firmware, hardware or its combination, and as the part in relevant device.Each composition mould in said apparatus Workable specific means or mode are ability when block, unit are configured by way of software, firmware, hardware or its combination Known to field technique personnel, it will not be repeated here.
As an example, in the case where being realized by software or firmware, can from storage medium or network to The computer of specialized hardware structure(Such as the all-purpose computer 1100 shown in Figure 11)Installation forms the program of the software, the calculating Machine is able to carry out various functions etc. when being provided with various programs.
In the feature in the description of the specific embodiment of the invention, describing and/or showing for a kind of embodiment above It can be used in a manner of same or similar in one or more other embodiments, with the feature in other embodiment It is combined, or substitute the feature in other embodiment.
It should be emphasized that term "comprises/comprising" refers to the presence of feature, key element, step or component when being used herein, but simultaneously It is not excluded for the presence or additional of one or more further features, key element, step or component.
In addition, the method for the present invention be not limited to specifications described in time sequencing perform, can also according to it Its time sequencing, concurrently or independently perform.Therefore, the execution sequence of the method described in this specification is not to this hair Bright technical scope is construed as limiting.
Although being had been disclosed above by the description of the specific embodiment to the present invention to the present invention, should The understanding, those skilled in the art can design in the spirit and scope of the appended claims to the present invention various modifications, Improvement or equivalent.These modifications, improvement or equivalent should also be as being to be considered as included in protection scope of the present invention.
The present invention can also be realized with the following examples:
1. a kind of distributed rule automotive engine system, including:
At least one regulation engine, is deployed with Rete network in the regulation engine, the Rete network with one or more Individual rule set is associated;
Wherein, the pattern being included in included by the regular conditional side of same rule concentration is similar each other.
2. according to the distributed rule automotive engine system of embodiment 1, including:
First order alpha networks, it is constructed outside single regulation engine, for the fact to be arranged into appropriate rule Engine;And
Second level alpha networks, it is constructed within single regulation engine, appropriate for the fact to be arranged into Alpha nodes.
3. according to the distributed rule automotive engine system of embodiment 2, wherein, the first order and/or second level alpha Web vector graphics Hash method arranges the fact.
4. according to the distributed rule automotive engine system of embodiment 2 or 3, wherein, the first order and/or second level alpha networks The fact is arranged according to the Property Name of the fact.
5. according to the distributed rule automotive engine system of embodiment 4, wherein, the first order and/or second level alpha networks according to The value of true attribute arranges the fact.
6. according to the distributed rule automotive engine system of any of embodiment 1 to 3, in addition to:
First order agenda, it is constructed within single regulation engine, for solving the conflict in each regulation engine; And
Second level agenda, it is constructed outside single regulation engine, for solving the conflict between each regulation engine.
7. according to the distributed rule automotive engine system of embodiment 6, wherein, second level agenda is sorted using merger to solve Conflict.
8. a kind of building method of distributed rule automotive engine system, including:
By the pattern included by conditional side each other similar regular partition to identical rule set;
Each rule set obtained by division is associated with to one of regulation engine of the system;And
The rule that the strictly all rules associated with same rule engine is concentrated is compiled into Rete network and drawn in the rule Disposed in holding up.
9. according to the distributed rule engine building method of embodiment 8, wherein, division includes:
Each pattern is extracted from the conditional side of rule;And
The binary string according to corresponding to the pattern of extraction obtains rule, and divided according to binary string;
Wherein, each corresponding pattern of binary string, 1 expression corresponding modes are present in rule, and 0 represents corresponding Pattern is not present in rule;Also,
Wherein, the length of binary string is equal to the quantity of all patterns included in strictly all rules to be divided.
10. according to the distributed rule engine building method of embodiment 9, wherein,
Assuming that the quantity of rule is N, the quantity of regulation engine is K, and wherein N is more than K;
Division also includes:
A is operated:Step-by-step exclusive-OR operation is carried out two-by-two to binary string corresponding to strictly all rules, found out so that distance is grasped Make in result containing the cluster center that rule corresponding to 1 the largest number of two binary strings is initial as two;
B is operated:According to all set for not being binary string corresponding to the rule of cluster center and having obtained Binary string corresponding to center carries out the result of step-by-step exclusive-OR operation, finds out the number for causing to contain 1 in exclusive-OR operation result The rule of non-cluster center is as new cluster center corresponding to most binary strings;
C is operated:B operations are repeated, until the number of cluster center is equal to K;
D is operated:It is to each rule not in arbitrary collection, its corresponding binary string is corresponding with each cluster center Binary string carry out step-by-step with operation, find out cause with operation result in contain 1 the largest number of cluster centers, by this Rule is added in the set, then, step-by-step "or" behaviour is carried out to binary string corresponding to the strictly all rules that is included in the set Make, using the binary string that OR operation the obtains corresponding binary string new as the cluster center;And
E is operated:D operations are repeated, until strictly all rules is all in set.
11. according to the distributed rule engine building method of embodiment 10, wherein, in b operations, preserved by inquiry The result of calculation of a operations obtain the result of exclusive-OR operation.
12. a kind of method handled using distributed rule automotive engine system executing rule,
The distributed rule automotive engine system includes at least one such regulation engine:The regulation engine is deployed with Rete network, the Rete network are associated with one or more rule sets;Wherein, it is included in the regular of same rule concentration Pattern included by conditional side is similar each other;
The method of the executing rule processing includes:
Via the alpha networks being configured in outside single regulation engine, the fact is arranged into appropriate regulation engine.
13. the method handled according to the executing rule of embodiment 12, in addition to:
Solves the conflict between each regulation engine using the agenda being configured in outside single regulation engine.

Claims (9)

1. a kind of distributed rule automotive engine system, including:
At least one regulation engine, Rete network is deployed with the regulation engine, and the Rete network is advised with one or more Then collection is associated;
First order alpha networks, it is constructed outside single regulation engine, is drawn for the fact to be arranged into appropriate rule Hold up;And
Second level alpha networks, it is constructed within single regulation engine, is saved for the fact to be arranged into appropriate alpha Point;
Wherein, the pattern being included in included by the regular conditional side of same rule concentration is similar each other.
2. distributed rule automotive engine system according to claim 1, wherein, the first order and/or second level alpha nets Network arranges the fact using hash method.
3. distributed rule automotive engine system according to claim 1 or 2, in addition to:
First order agenda, it is constructed within single regulation engine, for solving the conflict in each regulation engine;And
Second level agenda, it is constructed outside single regulation engine, for solving the conflict between each regulation engine.
4. distributed rule automotive engine system according to claim 3, wherein, the second level agenda is sorted using merger To solve to conflict.
5. a kind of building method of distributed rule automotive engine system, including:
By the pattern included by conditional side each other similar regular partition to identical rule set;
Each rule set obtained by division is associated with to one of regulation engine of the system;And
The rule that the strictly all rules associated with same rule engine is concentrated is compiled into Rete network and in the regulation engine Disposed;
Wherein, the distributed rule automotive engine system includes:
First order alpha networks, it is constructed outside single regulation engine, is drawn for the fact to be arranged into appropriate rule Hold up;And
Second level alpha networks, it is constructed within single regulation engine, is saved for the fact to be arranged into appropriate alpha Point.
6. the building method of distributed rule automotive engine system according to claim 5, wherein, the division includes:
Each pattern is extracted from the conditional side of rule;And
The binary string according to corresponding to the pattern of extraction obtains the rule, and divided according to the binary string;
Wherein, each corresponding pattern of the binary string, 1 expression corresponding modes are present in the rule, and 0 represents Corresponding modes are not present in the rule;Also,
Wherein, the length of the binary string is equal to the quantity of all patterns included in strictly all rules to be divided.
7. the building method of distributed rule automotive engine system according to claim 6, wherein,
Assuming that the regular quantity is N, the quantity of regulation engine is K, and wherein N is more than K;
The division also includes:
A is operated:Step-by-step exclusive-OR operation is carried out two-by-two to binary string corresponding to strictly all rules, found out so that exclusive-OR operation knot Containing the cluster center that rule corresponding to 1 the largest number of two binary strings is initial as two in fruit;
B is operated:According to all cluster centers for not being binary string corresponding to the rule of cluster center and having obtained Corresponding binary string carries out the result of step-by-step exclusive-OR operation, and it is most to find out the number for contain in exclusive-OR operation result 1 Binary string corresponding to non-cluster center rule as new cluster center;
C is operated:B operations are repeated, until the number of cluster center is equal to K;
D is operated:To each rule not in arbitrary collection, by its corresponding binary string corresponding with each cluster center two System string carries out step-by-step with operation, the largest number of cluster centers for causing to contain 1 in the with operation result is found out, by this Rule is added in the set, then, step-by-step "or" behaviour is carried out to binary string corresponding to the strictly all rules that is included in the set Make, using the binary string that the OR operation the obtains corresponding binary string new as the cluster center;And
E is operated:D operations are repeated, until strictly all rules is all in set.
8. a kind of method handled using distributed rule automotive engine system executing rule,
The distributed rule automotive engine system includes at least one such regulation engine:The regulation engine is deployed with Rete nets Network, the Rete network are associated with one or more rule sets;
The distributed rule automotive engine system also includes:
First order alpha networks, it is constructed outside single regulation engine, is drawn for the fact to be arranged into appropriate rule Hold up;And
Second level alpha networks, it is constructed within single regulation engine, is saved for the fact to be arranged into appropriate alpha Point;
Wherein, the pattern being included in included by the regular conditional side of same rule concentration is similar each other;
The method of the executing rule processing includes:
Via the alpha networks being configured in outside single regulation engine, the fact is arranged into appropriate regulation engine.
9. the method for executing rule processing according to claim 8, in addition to:
Solves the conflict between each regulation engine using the agenda being configured in outside single regulation engine.
CN201310641753.6A 2013-12-03 2013-12-03 The method of distributed rule automotive engine system, building method and executing rule processing Expired - Fee Related CN104679790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310641753.6A CN104679790B (en) 2013-12-03 2013-12-03 The method of distributed rule automotive engine system, building method and executing rule processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310641753.6A CN104679790B (en) 2013-12-03 2013-12-03 The method of distributed rule automotive engine system, building method and executing rule processing

Publications (2)

Publication Number Publication Date
CN104679790A CN104679790A (en) 2015-06-03
CN104679790B true CN104679790B (en) 2018-01-16

Family

ID=53314844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310641753.6A Expired - Fee Related CN104679790B (en) 2013-12-03 2013-12-03 The method of distributed rule automotive engine system, building method and executing rule processing

Country Status (1)

Country Link
CN (1) CN104679790B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777029A (en) * 2016-12-08 2017-05-31 中国科学技术大学 A kind of distributed rule automotive engine system and its construction method
CN107145949B (en) * 2017-05-04 2020-07-21 中国科学院软件研究所 Multi-core real-time rule reasoning method
CN107247588B (en) * 2017-05-26 2020-10-23 电子科技大学 Rule engine optimization method based on constraint frequency
CN107943963A (en) * 2017-11-27 2018-04-20 上海交通大学 Mass data distributed rule engine operation system based on cloud platform
CN109871399B (en) * 2019-01-28 2020-10-09 中船重工鹏力(南京)大气海洋信息系统有限公司 Distributed alarm rule engine design method
CN111444291A (en) * 2020-03-27 2020-07-24 上海爱数信息技术股份有限公司 Real-time data alarm method based on stream processing engine and rule engine
CN113535809A (en) * 2021-06-24 2021-10-22 深圳市邦盛实时智能技术有限公司 Distributed multi-kernel decision making system and method for credit granting industry

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999324A (en) * 2011-09-19 2013-03-27 北京四达时代软件技术股份有限公司 Establishing method and system of Rete network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1629358A4 (en) * 2003-06-04 2009-11-04 Fair Isaac Corp Relational logic management system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999324A (en) * 2011-09-19 2013-03-27 北京四达时代软件技术股份有限公司 Establishing method and system of Rete network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Chaining of fuzzy rules in RETE network;Zenon A. Sosnowski;《Part of the Lecture Notes in Computer Science book series》;20010926;第2206卷;第895-902页 *
基于Rete算法的规则引擎在核保系统的应用;邱辉;《中国优秀硕士学位论文全文数据库信息科技辑》;20110315(第3期);第1-41页 *

Also Published As

Publication number Publication date
CN104679790A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
CN104679790B (en) The method of distributed rule automotive engine system, building method and executing rule processing
Guo et al. Community discovery by propagating local and global information based on the MapReduce model
Liao et al. Graph partition neural networks for semi-supervised classification
Bader et al. Snap, small-world network analysis and partitioning: An open-source parallel graph framework for the exploration of large-scale networks
Li et al. Privacy-preserving feature selection with secure multiparty computation
Caserta Tabu search-based metaheuristic algorithm for large-scale set covering problems
Reger et al. Induction in saturation-based proof search
Lin et al. A fast and resource efficient mining algorithm for discovering frequent patterns in distributed computing environments
Barenboim et al. Distributed symmetry-breaking algorithms for congested cliques
Barham et al. Multi-moth flame optimization for solving the link prediction problem in complex networks
Li et al. Classification and disease probability prediction via machine learning programming based on multi-GPU cluster MapReduce system
Shah et al. {TACCL}: Guiding Collective Algorithm Synthesis using Communication Sketches
Shiau et al. Proportionate flexible flow shop scheduling via a hybrid constructive genetic algorithm
Huynh et al. Multi-core parallel algorithms for hiding high-utility sequential patterns
Prajapati et al. MapReduce based multilevel consistent and inconsistent association rule detection from big data using interestingness measures
Hung et al. An efficient parallel-network packet pattern-matching approach using GPUs
Wu et al. Parallel owl reasoning: Merge classification
Kimovski et al. Multi-objective service oriented network provisioning in ultra-scale systems
Méry et al. Refinement-based verification of local synchronization algorithms
Corizzo et al. Distributed node classification with graph attention networks
Ouchaou et al. Towards a distributed SaaS management system in a multi-cloud environment
Zhao et al. L-PowerGraph: a lightweight distributed graph-parallel communication mechanism
Varici et al. Intervention target estimation in the presence of latent variables
El Moussawi et al. BGRAP: Balanced GRAph Partitioning Algorithm for Large Graphs.
Kuzmin et al. Method for Packet Classification for OpenFlow Classification Table Using Graphics Processing Unit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180116

Termination date: 20181203