CN103324520B - A kind of method for subscribing merging based on condition and share - Google Patents

A kind of method for subscribing merging based on condition and share Download PDF

Info

Publication number
CN103324520B
CN103324520B CN201310245202.8A CN201310245202A CN103324520B CN 103324520 B CN103324520 B CN 103324520B CN 201310245202 A CN201310245202 A CN 201310245202A CN 103324520 B CN103324520 B CN 103324520B
Authority
CN
China
Prior art keywords
condition
subscriber
entry
filtrator
subscription
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.)
Active
Application number
CN201310245202.8A
Other languages
Chinese (zh)
Other versions
CN103324520A (en
Inventor
尤涛
杜承烈
徐伟
赵湑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhiying Future Xi'an Information Technology Co ltd
Original Assignee
Northwestern Polytechnical 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 Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN201310245202.8A priority Critical patent/CN103324520B/en
Publication of CN103324520A publication Critical patent/CN103324520A/en
Application granted granted Critical
Publication of CN103324520B publication Critical patent/CN103324520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The present invention relates to and a kind ofly to merge and the method for subscribing shared based on condition, technical characteristic: set up the mapping of subscriber to filtrator and method as first-level buffer district, set up mapping that subscription condition gathers to subscriber as Secondary buffer; Detect the subscriber that whether there is this entry in first-level buffer district, if existed, carry out filtrator merger; Do not exist, this entry is joined in first-level buffer district as new element; The filtrator of each element in first-level buffer district is split, joins in Secondary buffer according to condition; If Secondary buffer has existed this condition, just the subscriber of new element joined in subscriber's set corresponding to this entry, if there is no this condition, has just newly set up mapping relations, and this entry has been added; Finally according to condition, subscriber is joined in subscription data structure.The present invention, by shortening transaction cycle, adapts to fast changing market environment more.

Description

A kind of method for subscribing merging based on condition and share
Technical field
The present invention relates to a kind of method for subscribing merging based on condition and share,
Background technology
Be current most popular term in futures market be " algorithm transaction ", the algorithm transaction of content is full of with the financial publication of scale, if trader is not in the trade of algorithm transaction technology and instrument, so, the board of directors is difficult to " refined taste " to his managed futures industry.These say great majority is the application formality hypervelocity algorithm transaction of " quantize transaction ", and ultra-short term is concluded the business, and to determine the moment of the market opportunity, and increase rapidly, to reflect, all these is the time at several milliseconds.Algorithm transaction is also known as automated transaction, black box transaction or machine transaction, and it refers to the method by using computer program to send trading instruction.In transaction, the scope that program can determine comprises the selection of exchange hour, the price of transaction, even comprises the security quantity that last needs strike a bargain.Need to gather mass data at short notice due to this transaction and accurate judgement is made to its data, therefore herein based on condition merge with subscribing mechanism research of sharing be by excessive redundancy event when processor cannot process immediately, by excessive redundancy event stored in buffer zone, and in buffer zone, the fusion of these redundant datas is simplified, finally reoffer to processor.
In the subscribing matching of compound event, current compound event system is mostly content-based distribution subscription system.Subscriber specifies constraint condition in the content of event, expresses their interest, and flow of event is that the inquiry stated by subscriber and predicate determine to decision-making where.Its subscription number of content-based system is more much bigger than the number based on the theme of the system of theme.In current more influential prototype system Gryphon, SIENA, JEDI and Rebeca, the mode that the expression of subscribing to condition often adopts asterisk wildcard and secondary to subscribe to replacement.The mode of asterisk wildcard is by deteriorating to the process of asterisk wildcard coupling by content subscription, subscription condition very little in subscription procedure changes the reconstruct being all converted to whole ordering system.The mode that secondary subscribing manner is also subscribed to again by the subscription condition that cancellation is previous completes, first such realization makes the very large handling capacity of system cost in the change of process subscription condition, probably makes most succedaneum in system all time flower changed in subscription condition instead of event filtering when changing frequent; In addition in order to ensure that again the correctness of ordering system often needs to back up a upper subscription condition, which increases system overhead.In current subscribing matching algorithm, the people such as Gough propose a kind of matching algorithm based on search tree, but the cost that the subscription of algorithm is safeguarded is very high, when client increases subscription or cancels subscriptions, system is difficult to the change modifying to reflect subscription to this search tree, and must rebuild search tree; The people such as Aguilera propose a kind of algorithm based on Parallel search tree, the space complexity of this algorithm with to subscribe to quantity linear, when client have roll up or cancel subscriptions time, subscribe to the cost safeguarded also higher; The people such as Campailla propose a kind of algorithm based on binary decision diagram (binarydecisiondiagram), although this algorithm is all optimized in efficiency and applicable cases, but still are limited to the frequent change of subscription condition.The research subscription condition of compound event and the relation of matching algorithm are not difficult to find, the research relative maturity of matching algorithm is that the traditional definition mode of subscription condition predicate cannot be combined with matching algorithm the frequent subscription situation just causing these researchs current and cannot directly support in types of applications system very well.
Summary of the invention
The technical matters solved
In order to avoid the deficiencies in the prior art part, the present invention proposes a kind of method for subscribing merging based on condition and share, in ordering system, when the message of subscribing to is too much, put into buffer zone by temporarily processing subscription, owing to may there is a large amount of redundant datas in subscription condition, buffer zone can by these redundant data merger, thus reduce the subscription number of process, promote its efficiency.
Technical scheme
Merge and the method for subscribing shared based on condition, it is characterized in that step is as follows:
Step 1: set up the mapping of subscriber to filtrator and method as first-level buffer district, sets up mapping that subscription condition gathers to subscriber as Secondary buffer;
Step 2: when there being new entry to arrive, detects the subscriber that whether there is this entry in first-level buffer district, if existed, carries out filtrator merger; Do not exist, this entry is joined in first-level buffer district as new element;
Judge that whether the method for two entries is identical, just add operation is carried out to two filtrators if identical, just subtraction operation is carried out to two filtrators if different.If the result of subtraction operation is negative, just by method negate, and the negative sign of filtrator is removed;
Step 3: split the filtrator of each element in first-level buffer district, joins in Secondary buffer according to condition;
For Secondary buffer, when there being new element to arrive, if there is this condition in Secondary buffer, just the subscriber of new element is joined in subscriber's set corresponding to this entry, if there is no this condition, just newly sets up mapping relations, and this entry is added;
Step 4: finally according to condition, subscriber is joined in subscription data structure.
Beneficial effect
A kind of method for subscribing merging based on condition and share that the present invention proposes, carries out merger to the subscription condition of redundancy in the buffer, has simplified subscription condition, thus improve the speed that the person of ordering travels through buffer zone, add the efficiency of subscribing matching.By shortening transaction cycle, more adapt to fast changing market environment.
Accompanying drawing explanation
Fig. 1 first-level buffer district processing flow chart;
Fig. 2 Secondary buffer processing flow chart.
Embodiment
Now in conjunction with the embodiments, the invention will be further described for accompanying drawing:
Data structure:
Subscribe to entry item: subscribing to entry and be made up of three parts, is subscriber subscriber respectively, filtrator filter, method of operating method.Filter is for subscribing to set of circumstances, and Method is that sub subscribes to a filter, and a cancel subscriptions filter, sub and unsub of unsub is a pair inverse operation, i.e. sub=-unsub.
First-level buffer district: first-level buffer district is mainly used to the subscription merger safeguarding same subscriber.Taking the data structure of HashMap, with subscriber subscriber for the key value in map, take filter+method as the value value in map.
Secondary buffer: Secondary buffer is used for the different subscriber of merger but have the order of identical or that part is identical filter.When multiple order has identical or part is identical filter, multiple subscriber can be registered when once inserting subscription condition simultaneously, so no matter there are how many subscription, travel through at the most once for order terms, do not have the access of repetition, be equivalent to repeatedly subscription procedure has been simplified to once.Secondary buffer takes the data structure of HashMap, adds two HashMap:sub-map and unsub-map respectively according to the difference of method.With the condition of the filter after decomposition for the key value in map, gather HashSet for the value value in map with subscriber.
Algorithm:
First-level buffer district: when new entry item2 arrives, first detect the entry whether HashMap has existed this subscriber, if there is no, then new entry added, operation terminates.If there is itme1, then carry out following set operation according to already present method with the method for new entry: if the method for method and the item2 of itme1 is identical, then itme1.f=itme1.f+itme2.f,
Otherwise itme1.f=itme1.f-itme2.f, if result is " bearing " value, then by the method negate of itme1, and removes the negative sign of result.
Secondary buffer: for the item that merger in one-level buffer is good, first determines to add respectively two kinds of different HashMap according to the difference of the method for item.Then decompose itme1.f, each condition in f is inserted in the HashMap of Secondary buffer as an entry, and the subscriber of correspondence is added in subscriber's set corresponding to this condition.When subscribing to beginning, operate according to sub-map and unsub-map respectively.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with example, the present invention is described in further detail.Example, only for explaining the present invention, is not intended to limit scope of the present invention.
First-level buffer district example:
Filter1{x>1,y=5}
Filter2{x=3,y=5}
Filter3{x<6,y=5}
Secondary buffer example:
First-level buffer district merger example:
Secondary buffer decomposes example:
Suber4<->Filter4{xLEssT.LTssT .LT6, y=5, z=6} Tonghua process.

Claims (1)

1. merge and the method for subscribing shared based on condition, it is characterized in that step is as follows:
Step 1: set up the mapping of subscriber to filtrator and method as first-level buffer district, sets up mapping that subscription condition gathers to subscriber as Secondary buffer;
Step 2: when there being new entry to arrive, detects the subscriber that whether there is this entry in first-level buffer district, if existed, carries out filtrator merger; Do not exist, this entry is joined in first-level buffer district as new element;
Judge that whether the method for two entries is identical, just add operation is carried out to two filtrators if identical, just subtraction operation is carried out to two filtrators if different; If the result of subtraction operation is negative, just by the method negate of entry, and the negative sign of filtrator is removed;
Step 3: split the filtrator of each element in first-level buffer district, joins in Secondary buffer according to condition;
For Secondary buffer, when there being new element to arrive, if there is this condition in Secondary buffer, just the subscriber of new element is joined in subscriber's set corresponding to this entry, if there is no this condition, just newly sets up mapping relations, and this entry is added;
Step 4: finally according to condition, subscriber is joined in subscription data structure.
CN201310245202.8A 2013-06-19 2013-06-19 A kind of method for subscribing merging based on condition and share Active CN103324520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310245202.8A CN103324520B (en) 2013-06-19 2013-06-19 A kind of method for subscribing merging based on condition and share

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310245202.8A CN103324520B (en) 2013-06-19 2013-06-19 A kind of method for subscribing merging based on condition and share

Publications (2)

Publication Number Publication Date
CN103324520A CN103324520A (en) 2013-09-25
CN103324520B true CN103324520B (en) 2016-04-06

Family

ID=49193284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310245202.8A Active CN103324520B (en) 2013-06-19 2013-06-19 A kind of method for subscribing merging based on condition and share

Country Status (1)

Country Link
CN (1) CN103324520B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430060B (en) * 2015-11-04 2018-06-19 中国人民解放军63680部队 Constraint publish-subscribe model space flight measurement and control data exchange system
CN108234584A (en) * 2016-12-22 2018-06-29 北京奇虎科技有限公司 The method and apparatus that structure moving advertising is subscribed to based on change
CN113992741B (en) * 2020-07-10 2023-06-20 华为技术有限公司 Method and device for indexing release data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090512A (en) * 2006-06-12 2007-12-19 捷讯研究有限公司 System and method for mixed mode delivery of dynamic content to a mobile device
CN101295311A (en) * 2008-06-17 2008-10-29 浙江大学 Semantic matching algorithm of large scale issuance subscription system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0521355D0 (en) * 2005-10-19 2005-11-30 Ibm Publish/subscribe system and method for managing subscriptions
GB0623914D0 (en) * 2006-11-30 2007-01-10 Ibm Flexible topic identification in a publish/subscribe system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090512A (en) * 2006-06-12 2007-12-19 捷讯研究有限公司 System and method for mixed mode delivery of dynamic content to a mobile device
CN101295311A (en) * 2008-06-17 2008-10-29 浙江大学 Semantic matching algorithm of large scale issuance subscription system

Also Published As

Publication number Publication date
CN103324520A (en) 2013-09-25

Similar Documents

Publication Publication Date Title
JP7273045B2 (en) Dimensional Context Propagation Techniques for Optimizing SQL Query Plans
Zheng et al. Real-time intelligent big data processing: technology, platform, and applications
EP3259668B1 (en) System and method for generating an effective test data set for testing big data applications
US10572296B2 (en) System and method for a data processing architecture
CN109716320A (en) Figure for distributed event processing system generates
Yan et al. Quegel: A general-purpose query-centric framework for querying big graphs
CN111143681A (en) Information recommendation device, method, equipment and system
Teymourian et al. Knowledge-based processing of complex stock market events
CN109472568A (en) A kind of block chain method of commerce, device, management system, equipment and storage medium
WO2019047441A1 (en) Communication optimization method and system
US20180330002A1 (en) Service Processing Method, and Data Processing Method and Apparatus
CN103324520B (en) A kind of method for subscribing merging based on condition and share
CN114461603A (en) Multi-source heterogeneous data fusion method and device
Chen et al. Real-time analytics: Concepts, architectures and ML/AI considerations
Ibtisum A Comparative Study on Different Big Data Tools
Ji et al. The network structure of Chinese finance market through the method of complex network and random matrix theory
CN114153862A (en) Service data processing method, device, equipment and storage medium
CN109522537A (en) Patent writing and application software for XRF analysis
Zhang et al. Precise marketing of precision marketing value chain process on the H group line based on big data
CN109146606A (en) A kind of brand recommended method, electronic equipment, storage medium and system
Hu et al. 5G‐Oriented IoT Big Data Analysis Method System
Lv [Retracted] Real Estate Marketing Adaptive Decision‐Making Algorithm Based on Big Data Analysis
EP4174678A1 (en) Cloud analysis scenario-based hybrid query method and system, and storage medium
Belyaev et al. Towards efficient dissemination and filtering of XML data streams
CN114281494A (en) Data full life cycle management method, system, terminal device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221026

Address after: 710065 Room 11805, Unit 1, Building 1, No. Chazhang Road, Hi tech Zone, Xi'an, Shaanxi

Patentee after: Zhiying Future (Xi'an) Information Technology Co.,Ltd.

Address before: 710072 No. 127 Youyi West Road, Shaanxi, Xi'an

Patentee before: Northwestern Polytechnical University

TR01 Transfer of patent right