CN101551757A - Matching method of heuristic events based on predicate covering - Google Patents

Matching method of heuristic events based on predicate covering Download PDF

Info

Publication number
CN101551757A
CN101551757A CNA2009100281095A CN200910028109A CN101551757A CN 101551757 A CN101551757 A CN 101551757A CN A2009100281095 A CNA2009100281095 A CN A2009100281095A CN 200910028109 A CN200910028109 A CN 200910028109A CN 101551757 A CN101551757 A CN 101551757A
Authority
CN
China
Prior art keywords
predicate
order
relation
ordering
node
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.)
Pending
Application number
CNA2009100281095A
Other languages
Chinese (zh)
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.)
Nanjing University
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CNA2009100281095A priority Critical patent/CN101551757A/en
Publication of CN101551757A publication Critical patent/CN101551757A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a matching method of heuristic events based on predicate covering. An ordering expression consists of a plurality of ordering predicates; an event expression consists of a plurality of event predicates; the method comprises the following steps of: ordering pre-processing: analyzing the ordering expressions by the pre-processing process, extracting different ordering predicates and simultaneously inserting all the ordering predicates to corresponding positions corresponding a relational tree of the ordering predicates according to the relation of the predicates; constructing a plurality of relational trees of ordering predicates; matching of heuristic predicates: analyzing the received event expression, setting the predicate of the event as p and the ordering predicate node on the relational tree of the ordering predicate to be matched as s, with M1 of a predicate set for carrying out successful matching with the relational tree of ordering predicate; matching of issuing events: the issuing event consists of a plurality of event predicates, therefore, each event predicate corresponds a relational tree of ordering predicates with same attribute; the matching of the issuing events matches the predicate of each event of the event expression with corresponding relational tree of the ordering predicate.

Description

Matching method of heuristic events based on the predicate covering
One, technical field
The present invention relates to the communication problem in content route network and the publish/subscribe traffic model, particularly event matches method wherein, relate to have asynchronism, the communication modes of the publish/subscribe traffic model of characteristics such as dynamic, multi-to-multi and anonymity.
Two, background technology
The extensive publish/subscribe system of content-based route becomes the research focus of communication of distributed system now gradually, has carried out deep research in fields such as online game, general fit calculation, Web Services, mobile computing and has obtained application widely.
The publish/subscribe traffic model of content-based route is as a kind of novel traffic model, and the effect in the distribution application system communication is obvious day by day, and its characteristics and meaning are that it provides a kind of communication mode of loose coupling.This communication mode has asynchronous communication, dynamic, many-many communication mode and can anonymous characteristics, and these characteristics make it can adapt to the needs of large-scale distributed system.
Event matches is a very important realization link in the extensive publish/subscribe system, is the issue incident transmission efficiency of decision systems performance and the key of accuracy.
In the publish/subscribe system design process that content-based route network is built, the event matches efficient in the publish/subscribe traffic model of the route that is based on content of greatest concern.When carrying out event matches, the issue incident need be mated with each subscribe message, and each issue incident and subscribe message (expression formula) are made up of a plurality of predicates, so be actually the coupling that realizes issue incident and subscribe message (expression formula) by the coupling between the predicate.
When a system will handle a large amount of incidents and order, the event matches demand side is to thousands of order (predicate), so, can can rapidly and efficiently carry out event matches have determined the real-time of system be met, whether the simultaneous events coupling accurately also will influence the accuracy that whole event transmits, and the event matches algorithm of a low accuracy rate of poor efficiency can bring congested and bottleneck to system to a great extent.
Therefore, study a kind of algorithm of event matches fast and accurately and not only have profound significance in Related Research Domain, the publish/subscribe technology that also is based on simultaneously the content route to a great extent practical application area can successful Application key.
Existing main event matches algorithm research all is to be optimized processing aspect the extra predicate matching test reducing, and main algorithm generally is divided into two classes [1]Walid Rjaibi, Klaus Dittrich and Dieter Jaepel.Event matching in symmetricsubscription systems (event matches in the symmetrical order system), In CASCON Conference, 2002: based on predicate Index Algorithm (Predicate Indexing Based) with based on matching network algorithm (Testing Network Based).
The index structure that mainly is organized into based on the event matches algorithm of predicate Index Algorithm based on the predicate in ordering, this type of algorithm generally is made up of two stages, phase one is carried out the predicate matching test, and subordinate phase re-uses the test result of phase one and orders matching test.Represent algorithm to have: counting algorithm (Counting Algorithm) [2]T.W.Yan andH.Garc ' ya-Molina.Index Structures for Selective Dissemination of Information Under the Boolean Model (index structure of Information Selection distribution under boolean's model) .ACM Trans.Database Syst., 1994,19 (2): pp.332-334; The gloomy algorithm of the Chinese (Hanson Algorithm) [3]E.Hanson, M.Chaabouni, C.Kim and Y.Wang.A Predicate Matching Algorithm forDatabase Rule Systems (the predicate matching algorithm in a kind of database association rule system), In SIGMOD ' 90,1990 etc.
Based on the main thought of the algorithm of matching network be at pretreatment stage ordering the structure of forming a figure or matching network, incident enters from the inlet of figure, filters by each intermediate node, judges matching result up to outlet.Represent algorithm to have: based on the algorithm of coupling tree (Testing Tree Based) [4]M.Aguilera, R.Strom, D.Sturman, M.Astley andT.Chandra.Matching Events in A Content-based Subscription System (event matches in the content-based order system), InEighteen ACM Symposium on Principles of Distributed Computing (PODC ' 99), 1999 and based on y-bend decision diagram (Binary Decisions Diagrams, algorithm BDDs) [5]A.Campailla, S.Chaki, E.Clarke, S.Jha and H.Veith.Efficient Filtering in Publish-Subscribe Systems Using Binary Decision Diagrams (using the high efficiency filter of y-bend decision diagram in the publish/subscribe system), In Proceedings of the 23th International Conference on Software Engineering, Toronto, Canada, May 2001, pp.443-452.
In addition, Silvia Bianchi, Pascal Felber, Maria Gradinariu.Content-based Publish/Subscribe using DistributedR-trees. (using the publish/subscribe technology of the content-based route of distributed R-trees realization), In Proceedings of theInternational Conference on Parallel and Distributed Computing.Rennes, France, 2007:537-548 one literary composition [6]In, according to MBR [7]Principle makes up a distributed R-trees, and the coupling route of incident is all carried out based on R-trees, yet that the weak point of this algorithm is a space complexity is bigger, and from the entire system angle, it is bigger to order the scale amount.At Chand R, FelberPA.Ascalable protocol for content-based routing in overlay networks (a kind of extensible protocol research that is suitable for the overlay network of content-based route), In Proceedings of the 2nd IEEE Int ' l Symp on Network Computing and Applications.Cambridge, USA, 2003:123-130 one literary composition [8]In, to how realizing accurate route, reducing the network bandwidth, how reducing aspects such as routing table space size, event matches algorithm and done systematic Study.
Traditional matching algorithm all has deficiency separately: can't utilize auxiliary coupling of correlativity between different attribute as the algorithm based on the predicate index, thereby improve matching efficiency; And needing static structure coupling tree or y-bend decision diagram based on the event matches algorithm of decision networks, the needs of incompatibility dynamic event coupling are difficult to dynamically update.Though document [6] [8]Carried out research and proposed corresponding improvement algorithm from the correlativity aspect that exists between ordering, but not with regard to how further reduction system order scale and as how the similarity (covering relation) described between ordering of certain reasonable manner study.
List of references
[1]Walid?Rjaibi,Klaus?Dittrich?and?Dieter?Jaepel.Event?matching?in?symmetric?subscription?systems,InCASCON?Conference,2002
[2]T.W.Yan?and?H.Garc’ya-Molina.Index?Structures?for?Selective?Dissemination?of?Information?Under?the?BooleanModel.ACM?Trans.Database?Syst.,1994,19(2):pp.332-334
[3]E.Hanson,M.Chaabouni,C.Kim?and?Y.Wang.A?Predicate?Matching?Algorithm?for?Database?Rule?Systems,InSIGMOD’90,1990
[4]M.Aguilera,R.Strom,D.Sturman,M.Astley?and?T.Chandra.Matching?Events?in?A?Content-based?SubscriptionSystem,In?Eighteen?ACM?Symposium?on?Principles?of?Distributed?Computing(PODC’99),1999
[5]A.Campailla,S.Chaki,E.Clarke,S.Jha?and?H.Veith.Efficient?Filtering?in?Publish-Subscribe?Systems?UsingBinary?Decision?Diagrams,In?Proceedings?of?the?23th?International?Conference?on?Software?Engineering,Toronto,Canada,May?2001,pp.443-452
[6]Silvia?Bianchi,Pascal?Felber,Maria?Gradinariu.Content-based?Publish/Subscribe?using?DistributedR-trees//Proceedings?of?the?International?Conference?on?Parallel?and?Distributed?Computing(Euro-Par’2007).Rennes,France,2007:537-548
[7]G?Li,S?Hou,Jacobsen?H.A?unified?approach?to?routing,covering?and?merging?in?publish/subscribe?systemsbased?on?modified?binary?decision?diagrams.In?Proceedings?of?25th?ICDCS.Columbus,USA,2005:447-457
[8]Chand?R,Felber?P?A.A?scalable?protocol?for?content-based?routing?in?overlay?networks//Proceedings?of?the?2ndIEEE?Int′l?Symp?on?Network?Computing?and?Applications.Cambridge,USA,2003:123-130
Three, summary of the invention
The objective of the invention is: in the publish/subscribe system at content-based route, need to support the requirement of efficient event matches, proposed a kind of based on ordering the heuristic events matching algorithm that predicate covers, not only improved the speed and the efficient of coupling, this algorithm is also supported symmetrical event matches simultaneously.
Technical scheme of the present invention is: the matching method of heuristic events based on predicate covers comprises following step:
Suppose to order expression formula and form, and incident remains by a plurality of attributes (incident predicate) and forms by a plurality of order predicates;
Order pre-service: this preprocessing process is resolved and is ordered expression formula, and extracts different order predicates, simultaneously each is ordered predicate and is inserted into relevant position in the corresponding order predicate relational tree according to the predicate relation; After preprocessing process finishes, will construct many and order the predicate relational tree.
The processing of ordering predicate will cause the variation by a small margin of ordering predicate relational tree structure, but this variation does not expend too much time complexity.End to a large amount of order expression formula preprocessing process after, will construct some and order the predicate relational trees.
Heuristic predicate coupling: the event representation formula that receives is resolved, and each incident predicate that will parse carries out the predicate coupling with corresponding order predicate relational tree.If the incident predicate is p, the predicate node s on the order predicate relational tree to be matched, M iFor with i order the order predicate set that the predicate relational tree successfully mates.
Heuristic predicate matching process (algorithm) will utilize heuristic coupling/filtering rule, reduce incident predicate and the number of comparisons of ordering predicate as far as possible, order the predicate relational tree by traversal, obtain the order predicate set that is complementary.Coupling/filter method is as follows:
(1) if the relation of p and s satisfies filtering rule 2,5, p will stop and mate with any order predicate node of ordering in the subtree that predicate node s is a root node so;
(2) if the relation of p and s satisfies filtering rule 3,6, p will stop mating with any order predicate node of ordering in the left subtree (covering subtree) that predicate node s is a root node so;
(3) if the relation of p and s satisfies matched rule 7,8, show p and s coupling so, s is added set M iIn, i.e. M i← M i∪ s; P will continue to order the predicate node with other and carry out matching operation simultaneously.
The issue event matches: the issue incident is made up of several incident predicates, so all correspondence an order predicate relational tree with same alike result for each incident predicate, on the basis that heuristic predicate matching process is handled, the coupling of issue incident is mated each incident predicate of event representation formula with corresponding order predicate relational tree, and the order that each order predicate set carrying out " friendship " arithmetic operation obtains to be complementary with incident is gathered.
To arbitrary order S, its each order predicate s k, can find a certain order predicate set M i, make s k∈ M i, promptly
Figure A20091002810900071
M i, s k∈ M i(i=1,2 ..n), just think the issue incident
Figure A20091002810900072
Be complementary with ordering S.
The matching process of whole issue incident sees that shown in the accompanying drawing 2, the event matches arthmetic statement is seen the 5th joint, and the arthmetic statement of heuristic predicate matching process is seen the 5th joint.
Predicate: make s=x Θ A Θ y, x wherein, y is a reasonable value in the attribute A codomain space, Θ is compare operation, claims that then s is a predicate; If x=y claims that then s is equivalent predicate, otherwise claim that s is the non-equivalent predicate.
Wherein, the predicate of forming issue event representation formula is called the incident predicate, forms the predicate of ordering expression formula and is called the order predicate.
Get threshold function table: up and down threshold function table ξ (s) of predicate is got in definition: if s=x Θ A Θ y and Θ="<", and ξ (s ↓)=x then, ξ (s ↑)=y.
For the purpose of hereinafter describing conveniently, suppose to have order predicate s 1And s 2, and two predicates describe is that the different range of same attribute is represented, comparison operator Θ="<" of acquiescence, and unless otherwise noted, hereinafter related predicate is all the non-equivalent predicate.
Predicate relation (Predicate Relation): arrange according to the relation that the order numerical range that predicate comprised is carried out between predicate, and the relation that it is possible comprehensively is two kinds: covering relation (Cover Relation) and order relation (Order Relation).Wherein, covering relation has been described order predicate s 1And s 2There is covering relation, ξ (s is promptly arranged 1↓)≤ξ (s 2↓) and ξ (s 1↑) 〉=ξ (s 2↑), then claim to order predicate s 1Cover s 2, be designated as
Figure A20091002810900081
Order relation has been described order predicate s 1And s 2There is order relation, [ξ (s is promptly arranged 1↓)≤ξ (s 2↓) and ξ (s 1↑)≤ξ (s 2↑)] or [ξ (s 1↓) 〉=ξ (s 2↓) and ξ (s 1↑) 〉=ξ (s 2↑)], then claim s 1, s 2There are left order relation or right order relation, are designated as
Figure A20091002810900082
Or
Figure A20091002810900083
Order predicate relational tree (Predicate Relation Tree):, order predicate correspondence is ordered order predicate node in the predicate relational tree according to ordering the y-bend relational tree that the predicate relation makes up; Wherein, the left subtree of ordering the predicate node is called the covering subtree, and all order predicate nodes that cover in the subtree are all covered by it; The right subtree of ordering the predicate node is called the preface subtree, and all of preface subtree are ordered the predicate node and all had (right side) order relation with it.The example of order predicate relational tree as shown in Figure 1.
Heuristic coupling/filtering rule: according to the special construction of ordering the predicate relational tree, and in conjunction with the relevant nature of asymmetric predicate (incident) coupling and symmetrical predicate (incident) coupling, proposed some heuristic coupling/filtering rules, the utilization of these rules can improve the efficient of event matches algorithm.For issue incident predicate p and order predicate s, have
Filtering rule 1: [ p ] ∉ s ⇒ [ p ] ∉ ∀ s ′ ( ↑ ) s ′ s , Wherein [p] is worth accordingly for equivalent incident predicate p, is applicable to asymmetric event matches.
Explain: if [p] do not belong to predicate s, [p] belongs to any predicate that is covered by predicate s scarcely so.
Filtering rule 2:
Figure A20091002810900085
Wherein [p] is worth accordingly for equivalent incident predicate p, is applicable to asymmetric event matches.
Explain: if [p] less than the following fault value of predicate s, [p] belongs to any predicate s ' that has right order relation with s scarcely so, wherein
Figure A20091002810900086
Cut operator:, stop coupling to any order predicate of this subtree node to being the subtree beta pruning of root node with predicate node s.
Filtering rule 3: [ p ] > x ( s ↑ ) ⇒ [ p ] ∉ ∀ s ′ ( ↑ ) s ′ s , Wherein [p] is worth accordingly for equivalent incident predicate p, is applicable to asymmetric event matches.
Explain: if [p] greater than the last fault value of predicate s, [p] belongs to any predicate s ' that has covering relation with s scarcely so, wherein
Figure A20091002810900091
Cut operator:, stop coupling to any order predicate of this left subtree node to being that the left subtree (covering subtree) of root node carries out beta pruning to order predicate node s.
Filtering rule 4:
Figure A20091002810900092
Be applicable to symmetrical event matches.
Explain: if p is not covered by s, p and exist with s between any order predicate s ' of covering relation and have covering relation scarcely so, wherein
Figure A20091002810900093
Filtering rule 5:p trembles
Figure A20091002810900094
Be applicable to symmetrical event matches.
Explain: if there are order relation in p and s, there is covering relation in p scarcely with ordering predicate s ' so, and wherein there is order relation in s ' with s
Figure A20091002810900095
Cut operator:, stop coupling to any order predicate of this subtree node to being the preface subtree beta pruning of root node to order predicate node s.
Filtering rule 6:
Figure A20091002810900096
Be applicable to symmetrical event matches.
Explain: if there are order relation in p and s, there is covering relation in p scarcely with ordering predicate s ' so, and wherein there is covering relation in s ' with s
Figure A20091002810900097
Cut operator:, stop coupling to any order predicate of this left subtree node to being that the left subtree (covering subtree) of root node carries out beta pruning to order predicate node s.
Matched rule 7: [ p ] ∈ s ⇒ p ⊕ s , Show p and s coupling, wherein
Figure A20091002810900099
Accord with for the match is successful.Be applicable to asymmetric event matches.
Matched rule 8: ↑ p s ⇒ p ⊕ s , Show p and s coupling, wherein
Figure A200910028109000911
Accord with for the match is successful.Be applicable to symmetrical event matches.
Ordering predicate is one to one with ordering the predicate node, only orders the predicate node and is applied in algorithm or the data structure description.How the present invention has provided realization event and has ordered scheme and the whole thought that realizes that expression formula is mated with extensive, therefore is the total technical scheme of a relevant event matches in this field.Core concept is: event matches is based on heuristic predicate and mates and realize.On technological layer, real realization event mates to mate with the concurrent heuristic predicate that carries out repeatedly of the mode of multithreading to be finished.
Matching process is the matching process of incident and order in fact.The event representation formula that receives will split into a plurality of incident predicates, and the order predicate relational tree that these a plurality of incident predicates one are together corresponding carries out the predicate matching treatment.How to mate and not mate with predicate relational tree B with order predicate relational tree A as for a certain incident predicate, reason is that this incident predicate has identical attribute with order predicate relational tree A, and quite different with B.
Order expression formula for one and also be made of a plurality of order predicates, a large amount of order expression formulas exists a large amount of order predicates on a certain same alike result, and the order predicate of these same alike results has just constituted one and ordered the predicate relational tree.The order predicate of different attribute just belongs to different order predicate relational trees.
Emphasis of the present invention is heuristic coupling/filtering rule part, and this also is the key of algorithm optimization of the present invention.Beneficial effect of the present invention is: based on ordering covering relation and the order relation that exists between predicate, order attribute at each and make up a corresponding predicate relational tree, the order predicate that each incident predicate of composition issue event representation formula will be used in heuristic coupling/filtering rule and the corresponding predicate relational tree carries out matching operation.This is a kind of based on ordering the heuristic events matching algorithm that predicate covers, and has not only improved the speed and the efficient of coupling, and this method is also supported symmetrical event matches simultaneously.The heuristic matching process of the present invention is used with the other technology and is combined, and has obtained good experiment effect.
Four, description of drawings
Fig. 1: predicate relational tree (Predicate Relation Tree)
Fig. 2: event matches process
Fig. 3: order predicate node structure
The predicate relational tree has been described covering relation and the order relation of ordering between the predicate, and with a kind of directly perceived, number of being easier to realize According to structure construction. Representative shown in the figure has identical predicate attribute " temperature ", and orders expression formula (6) from difference The order predicate relational tree that makes up of order predicate.
As shown in Figure 1, and enumerated some and ordered the relation that exists between predicates:
Figure A20091002810900101
Wherein, covering pointer field order predicate node and each node of the subtree take this node as root node pointed all is it The covering node; Order id field represents this order predicate node and belongs to which order expression formula; The operator field has indicated this and has ordered Purchase the affiliated type of predicate, order predicate, "<" predicate or ">" predicate such as equivalence, acquiescence being all "<" predicate; Lower threshold value reaches The upper threshold value field represents respectively the upper and lower threshold value of ordering predicate; The order pointer field is the order pointer, its order predicate pointed knot There are (right side) order relation in point and each node of the subtree take this node as root node with it.
Five, specific implementation method
Concrete grammar of the present invention (algorithm) step is as follows, mainly is divided into ordering pre-service and heuristic predicate coupling and three parts of event matches:
Order pre-service: this preprocessing process is resolved and is ordered expression formula, and extracts different order predicates, simultaneously each is ordered predicate and is inserted into relevant position in the corresponding order predicate relational tree according to the predicate relation; After preprocessing process finishes, will construct many and order the predicate relational tree.
The processing of ordering predicate will cause the variation by a small margin of ordering predicate relational tree structure, but this variation does not expend too much time complexity.End to a large amount of order expression formula preprocessing process after, will construct some and order the predicate relational trees.
Heuristic predicate coupling: the event representation formula that receives is resolved, and each incident predicate that will parse carries out the predicate coupling with corresponding order predicate relational tree.If the incident predicate is p, the predicate node s on the order predicate relational tree to be matched, M iFor with i order the predicate set that the predicate relational tree successfully mates.
Heuristic predicate matching process (algorithm) will utilize the least possible traversal of heuristic coupling/filtering rule to order the predicate relational tree, and the predicate that obtains to be complementary is gathered.Coupling/filter method is as follows:
(1) if the relation of p and s satisfies filtering rule 2,5, p will stop and mate with any predicate (node) of ordering in the subtree that predicate node s is a root node so;
(2) if the relation of p and s satisfies filtering rule 3,6, p will stop mating with any predicate (node) of ordering in the left subtree (covering subtree) that predicate node s is a root node so;
(3) if the relation of p and s satisfies matched rule 7,8, show p and s coupling so, s is added set M iIn, i.e. M i← M i∪ s; P will continue to order the predicate node with other and carry out matching operation simultaneously.
Heuristic coupling/the filtering rule discussed by preamble and heuristic matching process implementation process as can be known, coupling/filtering rule make full use of the predicate comparison match operation of having avoided a large amount of, also promoted the matching efficiency of algorithm thus.
The issue event matches: the issue incident is made up of several incident predicates, so all correspondence an order predicate relational tree with same alike result for each incident predicate, on the basis that heuristic predicate matching process is handled, the coupling of issue incident is mated each incident predicate of event representation formula with corresponding order predicate relational tree, and the order that each order predicate set carrying out " friendship " arithmetic operation obtains to be complementary with incident is gathered.
To arbitrary order S, its each order predicate s k, can find a certain order predicate set M i, make s k∈ M i, promptly
Figure A20091002810900111
M i, s k∈ M i(i=1,2 ... n), just think the issue incident
Figure A20091002810900112
Be complementary with ordering S.The matching process of whole issue incident is seen shown in the accompanying drawing 2.
The coupling of symmetry incident:
The present invention has solved symmetrical event matches problem simultaneously, i.e. issue zone and the symmetry coupling of ordering the zone.The issue to be processed of symmetry event matches is regional and order is regional all is made up of a plurality of order predicates, and the problem of symmetrical incident (predicate) coupling is exactly the coupling between incident predicate (codomain) and the order predicate (codomain).
Issue incident predicate is interval (scope) value with ordering the predicate value, and therefore the essence of symmetrical event matches is incident predicate interval value and the coupling of ordering the predicate interval value.We think, order predicate covering incident predicate and just are called coupling fully.Two predicates that present order relation (segment part or juxtaposition) between the coupling predicate do not constitute coupling.For example, if the issue event attribute is the predicate p=" a<temperature<b " of " temperature ", ordering the predicate attribute also is the predicate s=" c<temperature<d " of " temperature ", have only as a 〉=c and b≤d and just think coupling, otherwise for not matching.But issue incident predicate here and the relation form of ordering between predicate turn to
Figure A20091002810900113
Following reasoning is also promptly arranged:
↑ p s ⇒ p ⊕ s , Wherein
Figure A20091002810900122
Expression p and s successfully mate.
Symmetry event matches thought is described in heuristic predicate matching algorithm false code, and the incident predicate of establishing is p, the predicate node s on the order predicate relational tree to be matched, and concrete matching process is as follows:
(1)
Figure A20091002810900123
There are juxtaposition or not overlapping in p and s, by filtering rule 5 as can be known, stop p and the coupling that with s is any order predicate node in the right subtree (preface subtree) of root node.
(2) There are juxtaposition or not overlapping in p and s, by filtering rule 6 as can be known, stop p and the coupling that with s is any order predicate node in the left subtree (covering subtree) of root node.
(3)
Figure A20091002810900125
Mate with s.
From arthmetic statement as can be seen, symmetrical event matches process and asymmetric event matches process are closely similar, and algorithm is simple and clear, easy to understand and realization.
The method that the present invention proposes, and in view of the above the publish/subscribe system of the content-based route that realizes of design (SelectivePredicate-Covering Routing System SPCRS) has following advantage:
Matching speed is fast: algorithm of the present invention has utilized relevance between predicate and the correlativity between attribute, has summed up some heuristic coupling/filtering rules, and has fully used these rules, has accelerated the incident matching speed.
Dynamic: though matching algorithm of the present invention is based on tree, yet and unlike existing structure matching network static as based on the algorithm of matching network, overcome the shortcoming of this class algorithm, can upgrade ordering information dynamically, upgrade the variation of caused by operations tree construction and expend less time complexity.
High-level efficiency: owing to utilize predicate relation and this makes can obtain very high efficient when each predicate is mated based on the coupling/filtering rule of this proposition because fairly large minimizing the predicate quantity of mating.
Algorithm complex reduces: the space complexity of algorithm of the present invention is according to the lot-size linear growth; After utilizing heuristic coupling/filtering rule, the incident predicate descends with the number of times of the required comparison that the order predicate mates, so the time complexity of matching process is compared with the time complexity of other event matches algorithms, bigger lifting is arranged.
The system space complexity reduces: the prototype system of adopting said method is in conjunction with covering route thought, fairly large reduction the order scale amount of the required maintenance of each router in the content route network.
To improving the support of incident router efficiency: consider from the total system aspect, because combining, system covers route and heuristic events matching strategy, make the closer to each intermediate router maintenance order (predicate) scale still less of CBT (Core-Based Tree) core router, therefore also reduced the required predicate number of comparisons of carrying out of matching algorithm, thereby only needed still less event matches time with respect to router than bottom.So from issue end issue event message, order end through variant router arrival, the passing time of incident is used compared to general matching algorithm bigger improvement.
Realize the coupling of symmetrical incident: the coupling of carrying out asymmetric incident that algorithm of the present invention can not only efficiently and accurately, also be applicable to the coupling of symmetrical incident simultaneously, and both matching efficiencies are roughly the same.
Along with being extensive use of of Internet, application as content-based routes such as online game, stock exchange, E-News distribution and publish/subscribe traffic model all presses for a kind of event matches technology rapidly and efficiently, and algorithm of the present invention we can say positive adaptation this demand can be predicted good market outlook.
The algorithm false code:
(1) heuristic predicate matching algorithm
Figure A20091002810900131
end?for
return?M;
(2) event matches algorithm
Figure A20091002810900132
returnβ;
Embodiment: be applied in the event matches of content route network
In distributed environment based on CBT (Core-Based Tree) multicast tree and active content route thought, All hosts all passes through active router (Active Router) or event agent (Event Broker) is connected on the multicast tree, uses the publish/subscribe traffic model to carry out communication simultaneously.Giving out information wherein, subscribe message or issue zone, order the discrete value of all use a plurality of attributes in the zone or the structure of codomain composition is represented, be called an interest expression formula.
At first, initiatively router is after receiving the subscribe message that each main frame that connects it or downstream router send, and create and safeguard that all order the routing space (Routing Space) that zone (interest expression formula) constitutes, how the matching algorithm that the present invention relates to uses heuristic matched rule improving algorithmic match efficient because of being absorbed in, so the routing procedure that the maintenance in route space is reached the issue incident after the match is successful is not described.In fact, the routing forwarding of incident realizes comparatively simple.After event matches finishes, the order in order (the ordering id) set that obtains is searched in routing table (ordering and the mapping table of transmitting port) according to its id, obtain corresponding forwarding port, the forwarding of issuing incident then.
After this, publish/subscribe message constantly goes up at CBT (content route network) and propagates, initiatively router according to new subscribe message, order updating message, quit the subscription of that subscribe message do not stop carry out routing space when safeguarding, the issue event data that processing receives, carry out corresponding predicate coupling according to the predicate in the issue incident, and finally realize the coupling of issue incident.
When carrying out event matches, according to heuristic (predicate) of the present invention event matches method: at first parse each attribute (incident predicate) discrete value or codomain in issue (incident) message; Then, each incident predicate is carried out the predicate matching operation with the order predicate relational tree of corresponding (event attribute is consistent with order predicate attribute), as hereinbefore described, this matching operation process has inspiration character.Each incident predicate returns the order predicate set that is complementary with after corresponding order predicate relational tree matching operation is finished.
At last, operation is selected in a plurality of order predicate set that obtain, order the predicate set, should order the pairing order formula of id so with the issue event matches if promptly a certain order id all belongs to these, otherwise, order pairing order formula of id and issue incident and do not match.After operation is finished, will obtain one and order set, the arbitrary order in this order set is all with the issue event matches.
After coupling is finished, order id according to coupling and search routing table (ordering id with the mapping table of transmitting port), and obtain to transmit port, then, the issue incident will be transmitted port to this and transmit.
In implementation procedure, the matching process of each incident predicate is all by an independent thread execution.Therefore, in issue event matches process, the operation of a plurality of predicate coupling thread will be arranged earlier, obtain matching result by individual event coupling thread at last.Adopt the coupling executive mode of multithreading to help further to promote treatment effeciency.
Said process constantly repeats, and bears the carrying out of the communication in the whole distributed content route system.
The present invention provides the realization thought and the computer program of this method, does not need special working condition, in case study successful cost and almost can ignore.

Claims (1)

1, the matching method of heuristic events that covers based on predicate is ordered expression formula and is made up of a plurality of order predicates, the event representation formula by a plurality of attributes, promptly be referred to as the incident predicate and form; It is characterized in that comprising following step:
Order pre-service: this preprocessing process is resolved the order formula, and extracts different order predicates, simultaneously each is ordered predicate and is inserted into relevant position in the corresponding order predicate relational tree according to the predicate relation; After preprocessing process finishes, will construct many and order the predicate relational tree;
Heuristic predicate coupling: the event representation formula that receives is resolved, and each incident predicate that will parse carries out the predicate coupling with corresponding order predicate relational tree; If the incident predicate is p, the order predicate node s on the order predicate relational tree to be matched, M iFor with i order the predicate set that the predicate relational tree successfully mates;
Heuristic predicate matching process will utilize heuristic coupling/filtering rule, reduce incident predicate and the number of comparisons of ordering predicate as far as possible, order the predicate relational tree by traversal, obtain the order predicate set that is complementary.Coupling/filter method is as follows:
(1) if the relation of p and s satisfies filtering rule 2,5, p will stop and mate with any predicate (node) of ordering in the subtree that predicate node s is a root node so;
(2) if the relation of p and s satisfies filtering rule 3,6, p will stop mating with any predicate (node) of ordering in the left subtree (covering subtree) that predicate node s is a root node so;
(3) if the relation of p and s satisfies matched rule 7,8, show p and s coupling so, s is added set M 1In, i.e. M i← M i∪ s; P will continue to order the predicate node with other and carry out matching operation simultaneously;
The issue event matches: the issue incident is made up of several incident predicates, so all correspondence an order predicate relational tree with same alike result for each incident predicate, on the basis that heuristic predicate matching process is handled, the coupling of issue incident is mated each incident predicate of event representation formula with corresponding order predicate relational tree, and the order that each order predicate set carrying out " friendship " arithmetic operation obtains to be complementary with incident is gathered;
To arbitrary order S, its each order predicate s k, can find a certain order predicate set M i, make s k∈ M i, promptly ∃ M i , s k ∈ M i ( i = 1,2 , . . . n ) , Think that just issuing thing does E = ^ k = 1 n p k Be complementary with ordering S;
Predicate: make s=x Θ A Θ y, x wherein, y is a reasonable value in the attribute A codomain space, Θ is compare operation, claims that then s is a predicate; If x=y claims that then s is equivalent predicate, otherwise claim that s is the non-equivalent predicate.Wherein, the predicate of forming issue event representation formula is called the incident predicate, forms the predicate of ordering expression formula and is called the order predicate;
Get threshold function table: up and down threshold function table ξ (s) of predicate is got in definition: if s=x Θ A Θ y and Θ="<", and ξ (s ↓)=x then, ξ (s ↑)=y;
Suppose to have order predicate s 1And s 2, and two what order that predicates describe is that the different range of same attribute is represented, comparison operator Θ="<" of acquiescence, and unless otherwise noted, related predicate is all the non-equivalent predicate;
Predicate relation: arrange according to the relation that the numerical range that predicate comprised is carried out between predicate, and the relation that it is possible comprehensively is two kinds: covering relation and order relation; Wherein, covering relation has been described order predicate s 1And s 2There is covering relation, ξ (s is promptly arranged 1↓)≤ξ (s 2↓) and ξ (s 1↑) 〉=ξ (s 2↑), then claim to order predicate s 1Cover s 2, be designated as
Figure A2009100281090002C3
Order relation has been described order predicate s 1And s 2There is order relation, [ξ (s is promptly arranged 1↓)≤ξ (s 2↓) and ξ (s 1↑)≤ξ (s 2↑)] or [ξ (s 1↓) 〉=ξ (s 2↓) and ξ (s 1↑) 〉=ξ (s 2↑)], then claim s 1, s 2There are left order relation or right order relation, are designated as
Figure A2009100281090002C4
Or
Figure A2009100281090002C5
Order the predicate relational tree:, order predicate correspondence is ordered order predicate node in the predicate relational tree according to ordering the y-bend relational tree that the predicate relation makes up; Wherein, the left subtree of ordering the predicate node is called the covering subtree, and all order predicate nodes that cover in the subtree are all covered by it; The right subtree of ordering the predicate node is called the preface subtree, and all of preface subtree are ordered the predicate node and all had (right side) order relation with it;
Heuristic coupling/filtering rule: according to the special construction of ordering the predicate relational tree, and in conjunction with the relevant nature of asymmetric predicate event matches and symmetrical predicate (incident) coupling, proposed some heuristic coupling/filtering rules, the utilization of these coupling/filtering rules can improve the efficient of event matches algorithm; For issue incident predicate p and order predicate s, have
Filtering rule 1: [ p ] ∉ s ⇒ [ p ] ∉ ∀ s ′ ( ↑ s ′ s ) , Wherein [p] is worth accordingly for equivalent incident predicate p, is applicable to asymmetric event matches;
Explain: if [p] do not belong to s, [p] belongs to any order predicate that is covered by s scarcely so;
Filtering rule 2: Wherein [p] is worth accordingly for equivalent incident predicate p, is applicable to asymmetric event matches;
Explain: if [p] less than the following fault value of ordering predicate s, [p] belongs to any order predicate s ' that has right order relation with s scarcely so, wherein
Figure A2009100281090003C3
Cut operator:, stop coupling to any order predicate of this subtree node to being the subtree beta pruning of root node to order predicate node s;
Filtering rule 3: [ p ] > x ( s ↑ ) ⇒ [ p ] ∉ ∀ s ′ ( ↑ s ′ s ) , Wherein [p] is worth accordingly for equivalent incident predicate p, is applicable to asymmetric event matches;
Explain: if [p] greater than the last fault value of ordering predicate s, [p] belongs to any order predicate s ' that has covering relation with s scarcely so, wherein
Figure A2009100281090003C5
Cut operator:, stop coupling to any order predicate of this left subtree node to being that the left subtree (covering subtree) of root node carries out beta pruning to order predicate node s;
Filtering rule 4:
Figure A2009100281090003C6
Be applicable to symmetrical event matches;
Explain: if p is not covered by s, p and exist with s between any order predicate s ' of covering relation and have covering relation scarcely so, wherein
Filtering rule 5:
Figure A2009100281090004C1
Be applicable to symmetrical event matches;
Explain: if there are order relation in p and s, there is covering relation in predicate p scarcely with predicate s ' so, and wherein there is order relation in s ' with s
Figure A2009100281090004C2
Cut operator:, stop coupling to any order predicate of this subtree node to being the preface subtree beta pruning of root node to order predicate node s;
Filtering rule 6:
Figure A2009100281090004C3
Be applicable to symmetrical event matches;
Explain: if there are order relation in p and s, there is covering relation scarcely in the same s ' of p so, and wherein there is covering relation in s ' with s
Figure A2009100281090004C4
Cut operator:, stop coupling to any order predicate of this left subtree node to being that the left subtree (covering subtree) of root node carries out beta pruning to order predicate node s;
Matched rule 7: [ p ] ∈ s ⇒ p ⊕ s , Show p and s coupling, wherein
Figure A2009100281090004C6
Accord with for the match is successful; Be applicable to asymmetric event matches;
Matched rule 8: ↑ p s ⇒ p ⊕ s , Show p and s coupling, wherein
Figure A2009100281090004C8
Accord with for the match is successful; Be applicable to symmetrical event matches.
CNA2009100281095A 2009-01-09 2009-01-09 Matching method of heuristic events based on predicate covering Pending CN101551757A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2009100281095A CN101551757A (en) 2009-01-09 2009-01-09 Matching method of heuristic events based on predicate covering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2009100281095A CN101551757A (en) 2009-01-09 2009-01-09 Matching method of heuristic events based on predicate covering

Publications (1)

Publication Number Publication Date
CN101551757A true CN101551757A (en) 2009-10-07

Family

ID=41156008

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2009100281095A Pending CN101551757A (en) 2009-01-09 2009-01-09 Matching method of heuristic events based on predicate covering

Country Status (1)

Country Link
CN (1) CN101551757A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083626A (en) * 2019-03-29 2019-08-02 北京奇安信科技有限公司 Streaming events sequences match method and device
WO2024114655A1 (en) * 2022-11-29 2024-06-06 中国银联股份有限公司 Rule expression matching method and apparatus, and computer-readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083626A (en) * 2019-03-29 2019-08-02 北京奇安信科技有限公司 Streaming events sequences match method and device
WO2024114655A1 (en) * 2022-11-29 2024-06-06 中国银联股份有限公司 Rule expression matching method and apparatus, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US20140344230A1 (en) Methods and systems for node and link identification
CN103793489B (en) Method for discovering topics of communities in on-line social network
CN102411583A (en) Method and device for matching texts
CN107017992B (en) Design method of high-performance alliance block chain based on double-chain structure
CN105446734A (en) Software development history-based developer network relation construction method
Chen et al. Distributed evaluation and convergence of self-appraisals in social networks
CN102385635A (en) Heterogeneous data integration method based on ontology mode
CN105976048A (en) Power transmission network extension planning method based on improved artificial bee colony algorithm
CN107832344A (en) A kind of food security Internet public opinion analysis method based on storm stream calculation frameworks
CN102289491B (en) Parallel application performance vulnerability analyzing method and system based on fuzzy rule reasoning
CN102323942A (en) Statistical query method
CN102255955A (en) Dynamic Web service combination method based on dependency relationship
CN107315843A (en) Storage method and system for massive structured data
CN101551757A (en) Matching method of heuristic events based on predicate covering
Zhao et al. A consensus model for large-scale multi-attribute group decision making with collaboration-reference network under uncertain linguistic environment
CN107104826A (en) A kind of network control coding method based on SDN and NFV
CN102708285A (en) Coremedicine excavation method based on complex network model parallelizing PageRank algorithm
CN109902434B (en) REST architecture style oriented service data visual modeling and matching method in cloud computing environment
Bhushan et al. Optimal imputation of the missing data using multi auxiliary information
Maleszka Observing collective knowledge state during integration
Gan et al. Performance of leader-following consensus on multiplex networks
CN106161277A (en) A kind of parallel network flow sorting technique based on body
Luo et al. Fast synchronization of model updates for collaborative learning in micro-clouds
Cao et al. LogCEP-Complex event processing based on pushdown automaton
Mao et al. Complex Event Processing on uncertain data streams in product manufacturing process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20091007