CN105912653A - Rapid data subscription method and apparatus - Google Patents

Rapid data subscription method and apparatus Download PDF

Info

Publication number
CN105912653A
CN105912653A CN201610219110.6A CN201610219110A CN105912653A CN 105912653 A CN105912653 A CN 105912653A CN 201610219110 A CN201610219110 A CN 201610219110A CN 105912653 A CN105912653 A CN 105912653A
Authority
CN
China
Prior art keywords
subscription
data
physical memory
request
subscribe
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
CN201610219110.6A
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.)
GUANGDONG KAITONG SOFTWARE DEVELOPMENT Co Ltd
Original Assignee
GUANGDONG KAITONG SOFTWARE DEVELOPMENT 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 GUANGDONG KAITONG SOFTWARE DEVELOPMENT Co Ltd filed Critical GUANGDONG KAITONG SOFTWARE DEVELOPMENT Co Ltd
Priority to CN201610219110.6A priority Critical patent/CN105912653A/en
Publication of CN105912653A publication Critical patent/CN105912653A/en
Pending legal-status Critical Current

Links

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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • 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/2455Query execution

Abstract

The present invention provides a rapid data subscription method and apparatus applied to a processor of a server, and the server has a physical memory and a disk. The method comprises the following steps of receiving a subscription request from a client, the subscription request comprising data conditions and subscription attributes; and determining whether the subscription request exists in the physical memory according to the data conditions and the subscription attributes, if so, transmitting subscription data which are stored in the physical memory and corresponding to the subscription request to the client, and if not, adding the subscription request into the physical memory, processing and obtaining subscription data according to the data conditions and the subscription attributes of the subscription request, and transmitting the subscription data to the client. The data are cached by the physical memory without interaction the disk, and access efficiency is high. Data service is transferred, after the client emits the subscription request for the first time, the server caches the subscription request and processes the subscription request in the background, so that frequent computing for data subscription by the client is prevented, and time is saved.

Description

The quick method for subscribing of data and device
Technical field
The present invention relates to communication data comprehensive management technology field, particularly relate to data and quickly subscribe to Method and device.
Background technology
Along with the development of communication technology and the transformation of the idea in management of common carrier, network Operation management progressively moves towards centralization from dispersion.Network centralization management is mainly reflected in two sides Face, one be management region centralization, be in the past with branch company of districts and cities be monitored managing progressively to Save, group company carries out unified monitoring maintenance;Two is management equipment scope centralization, by originally Each specialty, a set of webmaster of producer progressively collect to the carrying out of full specialty one comprehensive network management of the whole network Middleization.
But along with the centralized management of network, bring many challenges, particularly alarm management. Will full specialty the whole network management, alarm amount can be caused huge, relevant alarm client real-time in Now it is processed into a problem compeling highly necessary to solve.
Traditional mode is based on relevant database, according to conditional combination when interface presents data Becoming relevant SQL statement, the data directly inquiring correspondence from data base present.Should Method there is problems in that 1, treatment effeciency depends directly on data base, when data base's pressure Comparison is presented slow time bigger.2, the quantity of client can affect the performance of data base, accesses Client the most, the pressure of data base is the biggest.2, very flexible, is limited to the language of SQL Sentence, and between distinct type data-base, SQL statement can be variant.
Summary of the invention
For above-mentioned technical problem, an object of the present invention is to provide a kind of data quickly to order Readding method, it is independent of disk, uses physical memory buffered data, and access efficiency is high.
The two of the purpose of the present invention are to provide a kind of data quickly to subscribe to device, and it is used for realizing An object of the present invention.
One of for achieving the above object, the present invention adopts the following technical scheme that
The quick method for subscribing of data, is applied in the processor of service end, has thing in service end Reason internal memory and disk, comprise the steps:
Step one: receiving the subscription from client and ask, described subscription request includes data strip Part and subscription attribute;
Step 2: whether be present in thing according to data qualification and subscription this subscription of attributive judgment request In reason internal memory, the most then will be stored in physical memory and the subscription corresponding with this subscription request Data send to client, otherwise, perform step 3;
Step 3: the data qualification asked according to this subscription and subscription attribute process from disk To subscribing to data, this subscription request is added to physical memory, and data storage will be subscribed to To physical memory, and these subscription data are sent to client.
Preferably, described physical memory is provided with a subscription table,
Described physical memory is provided with a subscription table, in described step 2 " according to data qualification and Subscribe to whether this subscription of attributive judgment request is present in physical memory " it is specially according to data strip Whether part and subscription this subscription of attributive judgment request are present in subscription table;In described step 3 " add this subscription request to physical memory " to be specially and this subscription request is added to subscribing to In table.
Preferably, described data qualification is a Boolean expression, and this Boolean expression includes at least One relational expression, described relational expression includes field, operator, correction data, right Than part and additional information.
Preferably, described subscription attribute includes ID, subscribes to duration, field attribute, complete One or more in portion's subscription, part subscription, subscription sequence and paging information.
Preferably, described subscription sequence includes needing sort field and sort type, described sequence class Type includes ascending order and descending;Described paging information includes starting quantity and terminates quantity.
Two for achieving the above object, the present invention adopts the following technical scheme that
Data quickly subscribe to device, are applied in the processor of service end, have thing in service end Reason internal memory and disk, including such as lower unit:
Receive unit: asking for receiving the subscription from client, described subscription request includes Data qualification and subscription attribute;
Judging unit: for whether depositing according to data qualification and subscription this subscription of attributive judgment request It is in physical memory, the most then will be stored in physical memory and ask corresponding with this subscription Subscription data send to client, otherwise, perform transmitting element;
Transmitting element: for the data qualification asked according to this subscription with subscribe to attribute from disk Process obtains subscribing to data, this subscription request is added to physical memory, and by subscription According to storing to physical memory, and these subscription data are sent to client.
Preferably, described physical memory is provided with a subscription table, in described judging unit " according to Whether data qualification and subscription this subscription of attributive judgment request are present in physical memory " it is specially Whether it is present in subscription table according to data qualification and subscription this subscription of attributive judgment request;Described This subscription request " is added to physical memory " by transmitting element and is specially and this subscription is asked Add to subscription table.
Preferably, described data qualification is a Boolean expression, and this Boolean expression includes at least One relational expression, described relational expression includes field, operator, correction data, right Than part and additional information.
Preferably, described subscription attribute includes ID, subscribes to duration, field attribute, complete One or more in portion's subscription, part subscription, subscription sequence and paging information.
Preferably, described subscription sequence includes needing sort field and sort type, described sequence class Type includes ascending order and descending;Described paging information includes starting quantity and terminates quantity.
Compared to existing technology, beneficial effects of the present invention is as follows:
The present invention uses physical memory cache data, and access efficiency is high, it is not necessary to and disk is mutual; Data, services shifts, and after client sends subscription request for the first time, service end please by this subscription Seek caching, then ask in this subscription of background process, it is to avoid during client subscription data frequently Calculate and spend the time.
Accompanying drawing explanation
Fig. 1 is the workflow diagram of the quick method for subscribing of data of the present invention.
Detailed description of the invention
Below, in conjunction with accompanying drawing and detailed description of the invention, the present invention is described further:
Seeing Fig. 1, the present invention provides a kind of quick method for subscribing of data, the method application service In processor in end, in service end, there is physical memory and disk, and in physics A subscription table it is provided with in depositing.Client, in order to understand relevant information, sends the request of subscription to clothes Business end, service end is stored in relevant information, returns data into client according to the content of the request of subscribing to End, specifically comprises the following steps that
Step S1: receiving the subscription from client and ask, described subscription request includes data Condition and subscription attribute;
Data qualification refers to the data demand needing to present, and subscribes to attribute and refers to that service end is finally returned It is back to the call format of the data of client, such as by the sequence of certain attribute, paging return etc..
Data qualification is single set condition, and condition is a Boolean expression, and Boolean expression is by one Individual or multiple relational expression compositions.Condition must have one group of logical expression, operator Can be and or or or not, when relation is not, inside group, only allow one Individual sub-condition.Such as:
Element minimum in condition is relational expression, relational expression attribute be respectively field, Operator, correction data, contrast part and additional information five part composition.
Subscribe to the action part that attribute is rule, according to the different demands of client the most not With.The subscription attribute of once subscribing to request be presented herein below:
The ID that USER_ID tag representation is subscribed to.SUB_TYPE represents subscription type, STAT Representing statistics, LIST represents data list.ALL represents all subscription.SUB_MINUTES table Show subscription duration, only subscribe to the data of nearest N minute.UB_FIELD represents field attribute, ORDER represents that sequence, FIELD represent the field that needs sort, and TYPE represents sort type: ASC (ascending order), DESC (descending).PAGE represents the paging information of request, START table Show that starting quantity, END represent end quantity.
Step S2: whether be present according to data qualification and subscription this subscription of attributive judgment request In physical memory, the most then will be stored in asking corresponding ordering in physical memory and with this subscription Read data to send to client, otherwise, perform step S3;
Concrete, according to data qualification, this orders the physical memory in service end with subscribing to attributive judgment Whether the request of readding is present in subscription table.
Step S3: the data qualification asked according to this subscription and subscription attribute process from disk Obtain subscribing to data, this subscription request is added to physical memory, and subscription data are deposited Store up to physical memory, and these subscription data are sent to client.
Concrete, this subscription request is added to subscription table, carries out real-time update, work as user First whether query subscription table exists when sending subscription request, order if there is the most directly transferring Read data and return these subscription data to client, if there is no then initialization data and preserve extremely Subscription table.When not receiving the subscription request preserved in subscription table for a long time, then delete this and order Read request, prevent junk data committed memory and affect performance.
On the other hand, the data that the present invention also provides for a kind of method for subscribing quick with data corresponding are fast Speed subscribes to device, is applied in the processor of service end, has physical memory and magnetic in service end Dish, it include receive unit: for receive from client subscription ask, described subscription please Ask and include data qualification and subscribe to attribute;Judging unit: for belonging to according to data qualification and subscription Property judge this subscription request whether be present in physical memory, the most then will be stored in physics Ask corresponding subscription data to send to client in depositing and with this subscription, otherwise, perform transmission Unit;Transmitting element: for the data qualification asked according to this subscription with subscribe to attribute from disk Middle process obtains subscribing to data, this subscription request is added to physical memory, and will subscribe to Data store to physical memory, and send these subscription data to client.
Accordingly, physical memory is provided with a subscription table, " according to data in described judging unit Whether condition and subscription this subscription of attributive judgment request are present in physical memory " it is specially basis Whether data qualification and subscription this subscription of attributive judgment request are present in subscription table;Described transmission This subscription request " is added to physical memory " to be specially by unit this subscription request is added To subscription table.
Data qualification is a Boolean expression, and this Boolean expression includes at least one relationship expression Formula, described relational expression includes field, operator, correction data, contrast part and adds Information.Subscribe to attribute to include ID, subscribe to duration, field attribute, all subscription, portion One or more divide subscription, subscribing in sequence and paging information.Described subscription sequence includes needing Sort field and sort type, described sort type includes ascending order and descending;Described paging information Including starting quantity and end quantity.
It will be apparent to those skilled in the art that can technical scheme as described above and structure Think, make other various corresponding changes and deformation, and all these changes and deformation Within all should belonging to the protection domain of the claims in the present invention.

Claims (10)

1. the quick method for subscribing of data, is applied in the processor of service end, has in service end Physical memory and disk, it is characterised in that comprise the steps:
Step one: receiving the subscription from client and ask, described subscription request includes data strip Part and subscription attribute;
Step 2: whether be present in thing according to data qualification and subscription this subscription of attributive judgment request In reason internal memory, the most then will be stored in physical memory and the subscription corresponding with this subscription request Data send to client, otherwise, perform step 3;
Step 3: the data qualification asked according to this subscription and subscription attribute process from disk To subscribing to data, this subscription request is added to physical memory, and data storage will be subscribed to To physical memory, and these subscription data are sent to client.
2. the quick method for subscribing of data as claimed in claim 1, it is characterised in that described Physical memory is provided with a subscription table, " according to data qualification and subscription attribute in described step 2 Judge whether this subscription request is present in physical memory " it is specially according to data qualification and subscription Whether this subscription of attributive judgment request is present in subscription table;" by this subscription in described step 3 Request is added to physical memory " it is specially and this subscription request is added to subscription table.
3. the quick method for subscribing of data as claimed in claim 1, it is characterised in that described number Being a Boolean expression according to condition, this Boolean expression includes at least one relational expression, institute State relational expression and include field, operator, correction data, contrast part and additional information.
4. the quick method for subscribing of data as claimed in claim 1, it is characterised in that described in order Read attribute include ID, subscribe to duration, field attribute, all subscribe to, part is subscribed to, Subscribe to one or more in sequence and paging information.
5. the quick method for subscribing of data as claimed in claim 4, it is characterised in that described in order Read sequence to include needing sort field and sort type, described sort type to include ascending order and descending; Described paging information includes starting quantity and terminates quantity.
6. data quickly subscribe to device, are applied in the processor of service end, have in service end Physical memory and disk, it is characterised in that include such as lower unit:
Receive unit: asking for receiving the subscription from client, described subscription request includes Data qualification and subscription attribute;
Judging unit: for whether depositing according to data qualification and subscription this subscription of attributive judgment request It is in physical memory, the most then will be stored in physical memory and ask corresponding with this subscription Subscription data send to client, otherwise, perform transmitting element;
Transmitting element: for the data qualification asked according to this subscription with subscribe to attribute from disk Process obtains subscribing to data, this subscription request is added to physical memory, and by subscription According to storing to physical memory, and these subscription data are sent to client.
7. data as claimed in claim 6 quickly subscribe to device, it is characterised in that described thing Reason internal memory is provided with a subscription table, " according to data qualification and subscription attribute in described judging unit Judge whether this subscription request is present in physical memory " it is specially according to data qualification and subscription Whether this subscription of attributive judgment request is present in subscription table;This " is ordered by described transmitting element The request of readding is added to physical memory " it is specially and this subscription request is added to subscription table.
8. the data as described in full claim 6 quickly subscribe to device, it is characterised in that described Data qualification is a Boolean expression, and this Boolean expression includes at least one relational expression, Described relational expression includes field, operator, correction data, contrast part and additional information.
9. the data as described in full claim 6 quickly subscribe to device, it is characterised in that described Subscribe to attribute include ID, subscribe to duration, field attribute, all subscribe to, part is subscribed to, Subscribe to one or more in sequence and paging information.
10. data as claimed in claim 9 quickly subscribe to device, it is characterised in that described Subscribe to sequence to include needing sort field and sort type, described sort type to include ascending order and fall Sequence;Described paging information includes starting quantity and terminates quantity.
CN201610219110.6A 2016-04-08 2016-04-08 Rapid data subscription method and apparatus Pending CN105912653A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610219110.6A CN105912653A (en) 2016-04-08 2016-04-08 Rapid data subscription method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610219110.6A CN105912653A (en) 2016-04-08 2016-04-08 Rapid data subscription method and apparatus

Publications (1)

Publication Number Publication Date
CN105912653A true CN105912653A (en) 2016-08-31

Family

ID=56745778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610219110.6A Pending CN105912653A (en) 2016-04-08 2016-04-08 Rapid data subscription method and apparatus

Country Status (1)

Country Link
CN (1) CN105912653A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109286671A (en) * 2018-09-29 2019-01-29 青岛海尔科技有限公司 Subscribing notification processing method, device, storage medium and equipment under environment of internet of things

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010051927A1 (en) * 2000-06-08 2001-12-13 Blinkspeed, Inc. Increasing web page browsing efficiency by periodically physically distributing memory media on which web page data are cached
CN1798032A (en) * 2004-12-30 2006-07-05 腾讯科技(深圳)有限公司 Method and system for implementing message subscription through Internet
CN101667202A (en) * 2009-10-19 2010-03-10 浙江大学 Parallel matching method of publish/subscribe system based on semantics under multi-core framework
CN102024032A (en) * 2010-11-29 2011-04-20 广州明朝网络科技有限公司 Distributed data caching and persisting method and system based on Erlang

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010051927A1 (en) * 2000-06-08 2001-12-13 Blinkspeed, Inc. Increasing web page browsing efficiency by periodically physically distributing memory media on which web page data are cached
CN1798032A (en) * 2004-12-30 2006-07-05 腾讯科技(深圳)有限公司 Method and system for implementing message subscription through Internet
CN101667202A (en) * 2009-10-19 2010-03-10 浙江大学 Parallel matching method of publish/subscribe system based on semantics under multi-core framework
CN102024032A (en) * 2010-11-29 2011-04-20 广州明朝网络科技有限公司 Distributed data caching and persisting method and system based on Erlang

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
曹双双: "基于SSH的发布订阅系统框架设计及数据持久层研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
赵晖: "分布式发布订阅系统建模仿真与性能分析", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109286671A (en) * 2018-09-29 2019-01-29 青岛海尔科技有限公司 Subscribing notification processing method, device, storage medium and equipment under environment of internet of things

Similar Documents

Publication Publication Date Title
CN109684358B (en) Data query method and device
US8065365B2 (en) Grouping event notifications in a database system
CN109947668B (en) Method and device for storing data
CN103914485B (en) System and method for remotely collecting, retrieving and displaying application system logs
CN202058147U (en) Distribution type real-time database management system
CN100543750C (en) A kind of matrix type data caching method and device of using based on WEB
US10025718B1 (en) Modifying provisioned throughput capacity for data stores according to cache performance
US8843436B2 (en) Systems and methods for performing direct reporting access to transaction databases
CN102867070A (en) Method for updating cache of key-value distributed memory system
CN102436513A (en) Distributed search method and system
CN105159845A (en) Memory reading method
CN109446222A (en) A kind of date storage method of Double buffer, device and storage medium
CN112445863A (en) Real-time data synchronization method and system
CN107180113A (en) A kind of big data searching platform
US11093496B1 (en) Performance-based query plan caching
CN106790422A (en) A kind of data buffer storage cluster and data retrieval method for WEB application
CN111597259B (en) Data storage system, method, device, electronic equipment and storage medium
CN103365987B (en) Clustered database system and data processing method based on shared-disk framework
US10649964B2 (en) Incorporating external data into a database schema
CN109299089A (en) The calculating and storage method and calculating of a kind of label data of drawing a portrait and storage system
CN105912653A (en) Rapid data subscription method and apparatus
Hurst et al. Social streams blog crawler
CN116383207A (en) Data tag management method and device, electronic equipment and storage medium
CN109474653A (en) A kind of shopping website guest access monitoring statisticss and outer push system and method for standing
CN112231129B (en) Data proxy service method, server, storage medium and computing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 1001 room 1101, room 12, 510000, Third Street, Luogang District Development Zone, Guangzhou, Guangdong

Applicant after: Guangdong Kaitong Polytron Technologies Inc

Address before: 901, 510000, 1001 and 1101 rooms, No. 12, 3rd Street, Luogang District Development Zone, Guangzhou, Guangdong, China

Applicant before: Guangdong Kaitong Software Development Co., Ltd.

COR Change of bibliographic data
CB02 Change of applicant information

Address after: 510000 Room 1001, Room 1101, Room 901, 12 Kehui Sanjie, Luogang District Development Zone, Guangzhou City, Guangdong Province

Applicant after: Kaitong Technology Co., Ltd.

Address before: 510000 Room 1001, Room 1101, No. 12, Kehui Third Street, Luogang District Development Zone, Guangzhou City, Guangdong Province

Applicant before: Guangdong Kaitong Polytron Technologies Inc

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20160831

RJ01 Rejection of invention patent application after publication