CN103488650A - Event matching method for use in event model - Google Patents

Event matching method for use in event model Download PDF

Info

Publication number
CN103488650A
CN103488650A CN201210195583.9A CN201210195583A CN103488650A CN 103488650 A CN103488650 A CN 103488650A CN 201210195583 A CN201210195583 A CN 201210195583A CN 103488650 A CN103488650 A CN 103488650A
Authority
CN
China
Prior art keywords
predicate
event
order
coupling
predicates
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
CN201210195583.9A
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.)
ZHENJIANG HUAYANG INFORMATION TECHNOLOGY CO LTD
Original Assignee
ZHENJIANG HUAYANG INFORMATION TECHNOLOGY CO 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 ZHENJIANG HUAYANG INFORMATION TECHNOLOGY CO LTD filed Critical ZHENJIANG HUAYANG INFORMATION TECHNOLOGY CO LTD
Priority to CN201210195583.9A priority Critical patent/CN103488650A/en
Publication of CN103488650A publication Critical patent/CN103488650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an event matching method for use in an event model. The method comprises an event ordering step and a time matching step, wherein in event ordering, an event ordering process on the aspect of the data structure of an event matching algorithm is a preprocessing process of event matching, and a predicate table, an interface list and an ordering list need to be updated when new event ordering is received by event service; in event matching, only received events need to be subjected to matching test line by line in the predicate table on the basis of the data structure and preprocessing of the event ordering. Forward matching of an ordering area and a published value is processed, and reverse matching of a publication area and an ordering value as well as symmetrical matching of the publication area and the ordering area are processed; the invention provides an improved rapid event matching algorithm on the basis of the two kinds of conventional algorithms specific to the requirement of dynamic symmetrical event matching support in a distributed virtual environment. Respective advantages of the two kinds of algorithms are integrated in the algorithm, so that the matching speed and efficiency are increased.

Description

A kind of event matches method in event model
Technical field
The present invention relates to the Communication in distributed virtual environment, the particularly event matches method in event model, relate to there is asynchronism, the communication modes of dynamic, multi-to-multi and the characteristics event model such as anonymous.
Background technology
Distributed virtual environment (DVE) technology has become the subject of a hot topic of current computer realm, in the various fields such as military affairs, medical science, building, education and amusement, is successfully applied [1]singh G, Serra L.Brick Net:A Software Toolkit for Network Based Virtual Worlds (the Software tool bag of distributed virtual environment), Presence, 1994,3 (1): pp.19-34.
Event model (Event Model) be independent of application for providing the structure based on event communication, event (Event
) [2]m.Haahr, R.Meier.P.Nixon, V.Cahill and E.Jul, Filterring and Scalability in the ECO Distributed Event Model (filtration of the distributed event model of ECO and stability), In 5 thinternational Symposium on Software Engineering for Parallel and Distrebuted Syetems, 2000. is exactly the basic communication mechanism in this traffic model.As a kind of novel traffic model, the effect of event model in the distributed system communication is day by day obvious, 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 characteristics that can be anonymous, these characteristics can adapt to the needs of large scale distributed system, make communication module and the emulation module of distributed virtual environment independently to be designed and developed respectively simultaneously, reduced the complicacy of designing and developing.
Event matches is a very important link in event model design, is to determine the efficiency of event transfer of event model and the key of accuracy.
In the event model of distributed virtual environment, the event matches in the of greatest concern symmetrical publish/subscribe model that is based on content.In this model, the publishing region of event need to be mated with each subscribing region, and each publishing region and order zone are comprised of a plurality of predicates, so be actually by the coupling between predicate, realize publishing region and orders regional coupling.
When a system will be processed a large amount of orders and event, event matches need to be faced thousands of predicate, so, can carry out fast event matches and determine that can the real-time of system be met, whether the simultaneous events coupling accurately also will affect the accuracy that whole event transmits, and the event matches algorithm of a less efficiently accuracy rate 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 in Related Research Domain, have profound significance, be also the key of distributed virtual environment in the application of commercial field success simultaneously to a great extent.
Existing main event matches algorithm research is all to be optimized processing reducing aspect extra predicate matching test, and main algorithm generally is divided into two classes [3]walid Rjaibi, Klaus Dittrich and Dieler Jaepel.Event matching in symmetric subscription systems (event matches in symmetrical order system), In CASCON Conference, 2002: based on predicate Index Algorithm (Predicate Indexing Based) with based on matching network algorithm (Testing Network Based).
Event matches algorithm based on the predicate Index Algorithm mainly take order in predicate be organized into index structure as basis, this type of algorithm generally is comprised of two stages, first stage is carried out the predicate matching test, and subordinate phase re-uses the test result of first stage and ordered matching test.Represent that algorithm has: counting algorithm (Counting Algorithm) [4]t.W.Yan and H.Gare ,ya-Molina.Index Structures for Selective Dissemination of Information Under the Boolean Model (index structure of Information Selection distribution under Boolean Model).ACM Trans.Database Syst.1994,19(2): pp.332 -334; The gloomy algorithm of the Chinese (Hanson Algorithm) [5]e.Hanson, M.Chaabouni, C.Kim and Y.Wang.A Predicate Matching Alogrithm for Database Rule Systems (the predicate matching algorithm in a kind of database association rule system), In SIGMOD ,90,1990 etc.
 
The main thought of the algorithm based on matching network is that ordering, one of composition is schemed or the structure of matching network at pretreatment stage, and event enters from the entrance of figure, by each intermediate node, is filtered, until matching result is judged in outlet.Represent that algorithm has: the algorithm based on coupling number (Tseting Tree Based) [6]m.Aguilera, R.Strom, D.Sturman, M.Astley and T.Chandra.Matching Events in A Content-based Subscription System (event matches in content-based order system), In Eighteen ACM Symposium on Principles of Distributed Computing (PODC ,99), 1999 and the algorithm based on Binary Decision Diagrams (Binary Decisions Diagrams, BDDs) [7]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 Binary Decision Diagrams in publish/subscribe system), In Proceedings of the 23th International Conference on Software Engineering, Toronto, Canada, May2001, pp.443-452.
Existing two class matching algorithms have deficiency separately: as the algorithm based on the predicate index can't utilize auxiliary coupling of correlativity between different attribute, thereby improve matching efficiency; And the event matches algorithm based on decision networks needs static structure coupling tree or Binary Decision Diagrams, be not suitable with the needs of dynamic event coupling, be difficult to be dynamically updated, generally be only applicable to static event model.And, in distributed virtual environment, event and order are all dynamic, not only event needs the transmission of real time high-speed, orders and also needs to constantly update according to the change of User Status.In addition, algorithm can only adapt to asymmetrical event matches at present, can not solve the problem of symmetrical event matches in distributed virtual environment.
Summary of the invention
The objective of the invention is: in distributed virtual environment, the requirement that needs dynamic symmetrical event matches to support, on existing two class algorithm bases, a kind of improved event matches algorithm is proposed, this algorithm can combine two class algorithms advantage separately, not only improve speed and the efficiency of coupling, also solved the problem of symmetrical event matches.
If order expression formula, by a plurality of predicates, formed, and event remains by attribute forming.
Emphasis of the present invention is the data structure part, and this is also the key of algorithm optimization of the present invention.Key data structure as shown in Figure 1, is comprised of a predicate table (Predicate Table), a coupling bucket (Match Bucket), order list (Subscription List) and interface list (Interface List).
predicate table(Predict Table): in the present invention, predicate table is the core of data structure, the tissue bond of predicate table predicate Index Algorithm and matching network algorithm characteristics of data structure separately.All Predicate Classifications are the family of predicates, and the predicate with same alike result and same operation symbol is included into a family of predicates.All families of predicates are divided into equivalent predicate, upper thresholding predicate and lower thresholding predicate three classes.A line of the corresponding predicate table of each family of predicates, and arranged in sequence: " attribute<" family of predicates (as accompanying drawing 2), predicate ratio is arranged from big to small, otherwise, " attribute > " family of predicates, predicate ratio sorts from small to large, and for the equivalent family of predicates, no matter which kind of order can.In addition, in predicate table, the predicate in ordering is coupled together with pointer, finally all point to the concrete order of ordering list.
Coupling bucket (Match Bucket): mated for auxiliary predicate table.Coupling to predicate table is carried out line by line, but not every order is all ordered all families of predicates, some pointers may be crossed over some row, in order to make such predicate, in lining by line scan, can not lose, adopt the data structure of coupling bucket, for the index of temporary transient these predicates of being alleviated of storage.
Interface list (Interface List) and order list (Subscription List): interface and ordering information corresponding to interface have been safeguarded in interface list and order list.Order list and registered all records that join the order of predicate table, a pointer that points to first predicate of ordering in predicate table is arranged simultaneously, be convenient to all predicates that travel all over is ordered.Interface has represented the direction of transfer of event, is the final purpose of event matches.Each interface may have many ordering informations,
So with interface list and order list, all orders are organized together.
Event matches method step in event model is as follows, is divided into event and orders and the event matches two large divisions:
Event is ordered: the event subscription process on the data structure of event matches algorithm is exactly the preprocessing process of event matches, after Event Service receives new event order, needs to upgrade predicate table, interface list and order list;
At first, order is joined and orders in list, the order that the follow-up sensing of last entry of last order in ordering list of the corresponding interface is newly added, and the order number of corresponding interface in interface list is added to 1; Surpassed limit value if order number, chosen two orders and assembled in all orders of this interface, the standard of selection is the lap maximum of two orders;
Then, in predicate table, list of entries is ordered in registration.The information of ordering is order from top to bottom according to predicate table, in ordering each family of predicates comprised, by binary chop, finds insertion position, during corresponding order value is inserted and shown; In the process that predicate table inserts, the predicate of insertion is linked one by one by order from top to bottom, finally point to the correspondence position of ordering in list, and order the pointer of first position in predicate table to ordering corresponding list item transmission in list.
Event matches: on the pretreated basis of data structure and event order, only the event received need be carried out line by line to matching test in predicate table, if the set of all predicates that Pi---is the capable family of predicates of i, Pi---_match means the predicate set of this event of coupling in Pi---, S matchmean the order set of coupling;
At first algorithm carries out initialization to coupling bucket content.Traversal is ordered list, finds the position of the predicate of each order, after initialization, has preserved the index of first predicate of all orders in the coupling bucket; The data structure of the coupling bucket that employing is carried out line by line to the coupling of predicate table, for the index of temporary transient these predicates that are delayed of storage.
Then need predicate table is lined by line scan.For every a line of predicate table, mainly carry out two parts work: find all predicates of this event of coupling in this family of predicates, then according to the content of coupling bucket, the predicate of these couplings is investigated one by one; All predicates in predicate table are divided into to coupling and are not mated two parts,
When being tested i is capable, for the non-equivalent family of predicates, because predicate all passes through sequence, so can use binary chop, the property value according to corresponding in event, find a position Pi---to be divided into Pi---_left and Pi---_right two parts; Pi---_left is the Pi---_match of corresponding this line just, means the set of this event of coupling in the predicate of this row; For the equivalent family of predicates, search the predicate that all predicate values equal property value corresponding to event, put into Pi---_match; If this event does not comprise the attribute that this journey is corresponding, think that all predicates of this line all mate, all predicates that Pi---_match comprises this row;
In testing line by line, be located at while being tested i is capable, in the coupling bucket, the capable corresponding predicate set of i is B i, in this row, all predicate set that really meet matching test are Pi---_match ∩ B i: add S by this set, ordering order corresponding to last node predicate match, remaining probes into its follow-up predicate index corresponding position in the coupling bucket.To Pi---_match and B icap, value need to be B iin each predicate index and this be about to that predicate table Pi is divided into Pi---_left and the two-part split position of Pi---_right compares, this is asked to hand over and borrowed just to mean this predicate attribute before this position, otherwise is removed.
Characteristics of the present invention are: this algorithm synthesis two class algorithms separately a little, not only improved speed and the efficiency of coupling, also solved the problem of symmetrical event matches.
The accompanying drawing explanation
fig. 1be key data structure of the present invention, formed by a predicate table (Predicate Table), a coupling bucket (Match Bucket), order list (Subscription List) and interface list (Interface List)
fig. 2the a line (" X<" family of predicates) in predicate table of the present invention: a line of the corresponding predicate table of each family of predicates, and arranged in sequence.
fig. 3it is algorithm false code of the present invention
specific implementation method
Concrete grammar of the present invention (algorithm) step is as follows, and mainly be divided into event and order and the event matches two large divisions: event is ordered: although the present invention ground design object is the event matches algorithm, event is ordered has also affected the data structure that event matches relies on.Event subscription process on the data structure of event matches algorithm is exactly the preprocessing process of event matches, after Event Service receives new event order, needs to upgrade predicate table, interface list and order list.At first, order is joined and orders in list, the order that last order follow-up sensing of the last item purpose in ordering list of the corresponding interface is newly added, if and the order number of corresponding interface in interface list is added to 1. order numbers and surpassed limit value, choosing two orders in all orders of this interface is assembled, the standard of selecting is the lap maximum of two, then, and at predicate table
Entry is ordered in middle registration.The information of ordering is order from top to bottom according to predicate table, by binary chop, finds insertion position in ordering each family of predicates comprised, during corresponding order straight cutting is entered to show.In the process that predicate table inserts, the predicate that insert in river is lived link one by one by order from top to bottom, finally points to the correspondence position of ordering in list, and passs and order in predicate the pointer of first position in table to ordering in list corresponding list item.
The user also can send the existing request of ordering of upgrading to Time Service.In distributed virtual environment, need to constantly upgrade order.Upgrade the treatment step of ordering and add new order similar.In predicate table, the predicate that correspondence is ordered is replaced one by one, and inserts from new sort.
event matches: on the pretreated basis of data structure and event order, only the event received need be carried out line by line to matching test in predicate table.
If the set of all predicates that Pi---is the capable family of predicates of i, Pi---_match means the predicate set of this event of coupling in Pi.S matchmean the order set of coupling.
At first algorithm carries out initialization to coupling bucket content.Traversal is ordered list, finds the position of first predicate of each order.If the position with regard to the j row that first predicate of an order i in predicate table is capable adds this location index j so in the i of coupling bucket is capable.After initialization, preserved the index of first predicate of all orders in the coupling bucket.
Then need predicate table is lined by line scan.For every a line of predicate table, mainly carry out two parts work: find in this family of predicates all predicates of this event of coupling, then according to the content of coupling bucket to the predicate of these couplings by being investigated.
Finding all predicates of match event in the family of predicates is exactly that all predicates in predicate table are divided into to coupling and do not mate two parts.When being tested i is capable for the non-equivalent family of predicates, because predicate all passes through sequence, so can use binary chop, according to property value corresponding in event, find a position that Pi is divided into to Pi---_left and Pi---_right two parts, the Pi---_match of just corresponding this line of Pi---_left, mean the set of this event of coupling in this predicate carried out.For the equivalent family of predicates, search the predicate that all predicate values equal attribute corresponding to event, do not comprise if put into this event of Pi---_match. the attribute that this journey is corresponding, think that all predicates of this line all mate, all predicates that Pi---_match comprises this row.
In testing line by line, be located at while being tested i is capable, in the coupling bucket, the capable corresponding predicate set of i is B i, in this row, all predicate set that really meet matching test are Pi---_match ∩ B i. will in this set, be that order corresponding to predicate of ordering last node adds S match, remaining its follow-up predicate index is inserted coupling the bucket in correspondence position.To Pi---_match and B icap, only need to be B iin each predicate index and this be about to that predicate table Pi is divided into Pi---_left and the two-part split position of Pi---_right compares, just meaned that before this position this predicate belongs to this and asks to hand over and borrowed, otherwise disallowable.
the coupling of symmetrical event: the present invention can also solve the matching problem of other algorithms without the symmetrical event of taking into account, symmetrical event matches not only needs to process the forward coupling of ordering zone and issue value, also needs to process reverse coupling and the symmetrical coupling of publishing region and order zone of publishing region and order value.Symmetrical event matches publishing region to be processed and order zone all are comprised of a plurality of predicates, and the problem of in fact symmetrical event matches is exactly the coupling that can be decomposed between predicate and predicate.In the present invention, predicate is divided into three classes according to the operational character limited separately.
For equivalent predicate, no matter forward, it is all identical that reverse or symmetrical event matches is processed, as long as property value equates just coupling, does not unequally just mate.
Under upper thresholding, the event matches of thresholding predicate is different, upper thresholding and lower thresholding predicate are generally paired appearance, determine together the scope of an attribute, therefore the paired coupling of attribute that needs predicate to comprise when predicate matching, this often adopts the predicate matching method of intersection, as for certain attribute predicate A, order regional A ∈ (a, b), publishing region A ∈ (C, D), clearly, only have in the situation of c<b or d<a and just do not mate, in other situations two range of attributes have overlapping, so need to be by the upper thresholding predicate ordered relatively.The predicate matching intersected is easy to realize on the algorithm structure of the predicate table of above-mentioned introduction, algorithm stands good, symmetrical algorithm still pursues scanning in predicate table, for the equivalent family of predicates or the same, in test during the thresholding family of predicates, choosing the property value of the lower thresholding predicate in publishing region is tested, still carry out binary chop as asymmetric event matches, predicate in a line is divided into to left and right two parts, the predicate of left side partly mates, test for the lower thresholding family of predicates, get corresponding upper thresholding predicate matching in publishing region, or get left side after cutting apart by predicate is capable.
So, basic identical to the scanning process of predicate table and above-mentioned algorithm, the tested object of just choosing of change, algorithm itself does not need to change, and Here it is has realized the coupling of symmetrical event.
In so symmetrical event matches algorithm, if carry out forward or reverse event matches, value need to be got identical value to thresholding on the association attributes in a side order zone and lower thresholding predicate, and other process still the same.
The method that the present invention proposes, and the event model system in the distributed virtual environment of design data realization has following advantage:
matching speed is fast:algorithm of the present invention has utilized relevance between predicate and the pass property between attribute, has accelerated matching speed, be based on the predicate Index Algorithm and based on the matching network algorithm a little can be embodied in the present invention separately.
dynamic: algorithm of the present invention do not need as existing structure matching network static as the algorithm based on matching network, overcome and so on the shortcoming of algorithm, can upgrade dynamically ordering information.
high-level efficiency: with the algorithm of basic predicate index, compare, this algorithm is also divided the family of predicates, and each family of predicates has been carried out to index by the mode of sequence or hash table, and what this was can obtain very high efficiency when each predicate is mated. complicated prompt drop is low: in the spatial complex speed of algorithm of the present invention according to the lot-size linear growth; Its preprocessing process is that than existing basis, the event matches algorithm in matching network reduces the event complexity ordered of event greatly, the event complexity of other event matches algorithms of the time complexity of matching process is suitable, so the overall event complexity of algorithm can decrease.
realize the coupling of symmetrical event: the coupling of carrying out asymmetric event that algorithm of the present invention can not only efficiently and accurately, also be applicable to the coupling of symmetrical event simultaneously, this is that existing other algorithms can't be accomplished.
Current being widely used along with Internet, distributed virtual environment and relevant a series of application thereof are a kind of event matches technology rapidly and efficiently of exigence all, and the algorithm of the cloth grace invention this demand of can having said positive adaptation can be predicted kindhearted good market prospect.
the false code of algorithm as shown in Figure 3.
implementation column: be applied in the distributed event model of network
At basic CBT(Core_Based Tree) multicast tree and initiatively in the distributed environment of route thought, All hosts all passes through initiatively router (Active Router) and is connected on multicast tree, carries out communication with the event model of publish/subscribe simultaneously.Releasing news wherein, subscribe message or publishing region, order the value of all use a plurality of attributes in zone or the representation of codomain composition, be called an interest expression formula.
In the first stage, initiatively router is after receiving the subscribe message that each main frame of connecting it or downstream router send, when safeguarding the virtual interface state, create and safeguard all router spaces (Routing Space) that zone (interest expression formula) forms of ordering.This routing space as previously mentioned, is configured to the structure structure (predicate table is ordered list and interface list) of a plurality of chained lists, the structure of determining chained list according to number and the relation of the attribute in the interest expression formula.
After this, publish/subscribe message is constantly propagated broadcasting on tree, when initiatively router is ceaselessly safeguarded the router space according to the message of new subscribe message or order renewal, need to process the distributing data received, mate accordingly according to the interest expression formula in distributing data.
When implementing concrete coupling, the event matches method according to the present invention: at first each the attribute codomain in the interest expression formula in giving out information or value are compared because chained list was arranged order with chained list in corresponding routing space or array element, therefore just can find the position of attribute codomain correspondence chained list of issue from the traversal chained list of little arrival, also just can know whether that there is common factor in the order zone of certain virtual interface.
Now, judged: if first attribute codomain is carried out to search procedure, put into a set existing the interest expression formula of occuring simultaneously to collect so, to the matching process of follow-up attribute, will borrow set and reject unmatched expression formula from this.Owing to requiring all properties in distributing data all to require to meet certain the interest expression formula in routing space simultaneously, therefore above-mentioned way is reasonably, as long as there is one not meet, just can reject unnecessary expression formula.To the scanning result of predicate table, after completing coupling, in set, remaining expression formula is exactly the result of coupling.
After having mated, giving out information of Chen Gong coupling can be found corresponding order place virtual interface according to the content of ordering in chained list and interface chained list, and the data that forward this issue to corresponding active router or main frame by virtual interface.Said process constantly repeats, and the communication of bearing in whole distributed environment is carried out.What the present invention was to provide the method realizes thought and computer program, once not need special working condition to study successful cost, almost can not ignore.

Claims (3)

1. the event matches method in event model, is characterized in that being divided into time order and event matches two large divisions;
Event is ordered: the event subscription process on the data structure of event matches algorithm is exactly the preprocessing process of event matches, after Event Service receives new event order, needs to upgrade predicate table, interface list and order list;
At first, order is joined and orders in list, the order that the follow-up sensing of last entry of last order in ordering list of the corresponding interface is newly added, and the order number of corresponding interface in interface list is added to 1; Surpassed limit value if order number, chosen two orders and assembled in all orders of this interface, the standard of selection is the lap maximum of two orders;
Then, in predicate table, entry is ordered in registration, and the information of order is order from top to bottom according to predicate table, then orders in each family of predicates comprised by binary chop, finds insertion position, during corresponding order value is inserted and shown; In the process that predicate table inserts, the predicate of insertion is linked one by one by order from top to bottom, finally point to the correspondence position of ordering in list, and order the pointer at first seat in predicate table to ordering corresponding list item transmission in list;
Event matches: on the pretreated basis of data structure and event order, only the event received progressively need be carried out to matching test in predicate table, if the set of all predicates that Pi is the capable family of predicates of i, Pi---_match means the predicate set of this event of coupling in Pi, and Smatch means the order set of coupling;
At first algorithm carries out initialization to coupling bucket content;
Traversal is ordered list, finds the position of first predicate of each order, after initialization, has preserved the index of first predicate of all orders in the coupling bucket; The data structure of the coupling bucket that employing is carried out line by line to the coupling of predicate table, for the index of temporary transient these predicates that are delayed of storage;
Then need predicate table is progressively scanned, for every a line of predicate table, mainly carry out two parts work: find all predicates of this event of coupling in the family of predicates, then according to the content of coupling bucket, the predicate of these couplings is investigated one by one; All predicates in predicate table are divided into to coupling and do not mate two parts;
When i is tested, for the non-equivalent family of predicates, because predicate all passes through sequence, so can use binary chop, according to property value corresponding in event, find a position that Pi is divided into to Pi_left and Pi_right two parts, Pi_left is the Pi---_match of corresponding this line just, means the set of this event of coupling in the predicate of this row; For the equivalent family of predicates, search the predicate that all predicate values equal property value corresponding to event, put into Pi---_match; If this event does not comprise the attribute that this journey is corresponding, think that all predicates of this line all mate, all predicates that Pi---_match comprises this row;
In testing line by line, be located at while being tested i is capable, in the coupling bucket, the capable corresponding predicate set of i is Bi, in this row, all predicate set that really meet matching test are Pi---_match ∩ Bi; To in this set, be that order corresponding to predicate of ordering last node adds Smatch, remaining inserts its follow-up predicate index correspondence position in the coupling bucket;
Cap to Pi---_match and Bi, only each predicate index in Bi and this need to be about to that predicate table Pi is divided into Pi_left and the two-part split position of Pi_right compares, just meaned that before this position this predicate belongs to this and asks the knot fruit, otherwise disallowable.
2. the quick time match method in event model claimed in claim 1, the method that it is characterized in that the coupling of symmetrical event is: process the forward coupling of ordering zone and issue value, also process the reverse coupling of publishing region and order value and the symmetry coupling in publishing region and order zone;
Symmetrical event matches publishing region to be processed and order zone all are comprised of a plurality of predicates, and predicate is divided into three classes according to the operational character limited separately;
For equivalent predicate, no matter forward, reverse or symmetrical event matches is processed is all identical, as long as property value equates just coupling, unequally just do not mate;
The predicate matching method that the paired coupling employing of attribute intersects, by the lower thresholding predicate of the upper thresholding predicate of order and issue relatively, the lower thresholding predicate of order compares with the upper thresholding predicate of issue;
During the thresholding family of predicates, choose the property value of the lower thresholding predicate in publishing region and tested in test, still as non-, to becoming event matches, carry out binary chop, the predicate in a line is divided into to left and right two parts, the predicate of left side partly mates; For the test of the lower thresholding family of predicates, get in publishing region corresponding upper thresholding predicate matching, or get left side after cutting apart by predicate is capable;
In the event matches algorithm of such symmetry, if carry out forward or reverse event matches, only need to get identical value to the upper thresholding predicate of the association attributes in a side order zone and lower thresholding predicate, other process still the same.
3. the quick event matches method in event model claimed in claim 1, is characterized in that the user sends to Event Service the existing request of ordering of upgrading; In distributed virtual environment, need to constantly upgrade order; Upgrade the treatment step of ordering and add new order similar; In predicate table, the predicate that correspondence is ordered is replaced one by one, and rearrangement is inserted.
CN201210195583.9A 2012-06-14 2012-06-14 Event matching method for use in event model Pending CN103488650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210195583.9A CN103488650A (en) 2012-06-14 2012-06-14 Event matching method for use in event model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210195583.9A CN103488650A (en) 2012-06-14 2012-06-14 Event matching method for use in event model

Publications (1)

Publication Number Publication Date
CN103488650A true CN103488650A (en) 2014-01-01

Family

ID=49828888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210195583.9A Pending CN103488650A (en) 2012-06-14 2012-06-14 Event matching method for use in event model

Country Status (1)

Country Link
CN (1) CN103488650A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411966A (en) * 2016-12-28 2017-02-15 太仓红码软件技术有限公司 Event target based task cooperation method and its system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694094A (en) * 2005-06-20 2005-11-09 南京大学 Rapid event matching method in event model
US20060117005A1 (en) * 2004-12-01 2006-06-01 International Business Machines Corporation Just-in-time publishing via a publish/subscribe messaging system using a subscribe-event model
CN102012918A (en) * 2010-11-26 2011-04-13 中金金融认证中心有限公司 System and method for excavating and executing rule

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060117005A1 (en) * 2004-12-01 2006-06-01 International Business Machines Corporation Just-in-time publishing via a publish/subscribe messaging system using a subscribe-event model
CN1694094A (en) * 2005-06-20 2005-11-09 南京大学 Rapid event matching method in event model
CN102012918A (en) * 2010-11-26 2011-04-13 中金金融认证中心有限公司 System and method for excavating and executing rule

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411966A (en) * 2016-12-28 2017-02-15 太仓红码软件技术有限公司 Event target based task cooperation method and its system
CN106411966B (en) * 2016-12-28 2019-04-16 佛山市顺客隆商业有限公司 A kind of task cooperative method and its system based on object event

Similar Documents

Publication Publication Date Title
Simitsis et al. Optimizing ETL processes in data warehouses
Simitsis et al. State-space optimization of ETL workflows
Gao et al. Relational approach for shortest path discovery over large graphs
WO2005106717A1 (en) Partial query caching
CN103678513B (en) A kind of interactively retrieval type generates method and system
CN103116619B (en) Collaborative business intelligence realizes method and device
CN111309753A (en) Method, device and equipment for optimizing structured query statement and storage medium
CN110532282A (en) Data query method and device
Barbieri et al. Continuous queries and real-time analysis of social semantic data with c-sparql
CN100367216C (en) Rapid event matching method in event model
CN102737134B (en) Query processing method being suitable for large-scale real-time data stream
CN103488650A (en) Event matching method for use in event model
Cui et al. An efficient subscription index for publication matching in the cloud
KR20180077830A (en) Processing method for a relational query in distributed stream processing engine based on shared-nothing architecture, recording medium and device for performing the method
CN103984760B (en) The data structure of content oriented distribution subscription system and its compound event matching process
Vagena et al. Roxsum: Leveraging data aggregation and batch processing for xml routing
CN103279525B (en) A kind of Multi-condition linkage searching method optimized based on Hash
CN105630777A (en) Rapid query matching method of event models
Bou et al. An improved method of keyword search over relational data streams by aggressive candidate network consolidation
Prabhavathy et al. Path stream group level encoding: Efficient wireless xml streaming
Huang et al. LiveIndex: A distributed online index system for temporal microblog data
CN107133281A (en) A kind of packet-based global multi-query optimization method
Simitsis et al. Logical optimization of ETL workflows
Broder et al. Efficiently evaluating graph constraints in content-based publish/subscribe
CN106560804A (en) Content retrieval method based on XML meaning

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140101