Summary of the invention
Partly statement in the feature and advantage of the present invention description hereinafter perhaps can be described obviously from this, perhaps can learn through putting into practice the present invention.
For overcoming prior art problems, the present invention provides a kind of network alarm alert to concentrate method for pushing, and this method comprises: will concentrate in the pending alert information that front end receives and gather; Each alert information is carried out unified code identification according to the source to be formed the tabulation of pending alert and gets into cache memory section and store; Push rule according to predetermined alert the alert information push is carried out subsequent treatment to connecing of the appointment client of dealing with emergencies and dangerous situations.
Wherein, alert information comprises following one of them or combination in any: alert ID, receiving host machine numbering, alarm host machine numbering, alarm code, time of fire alarming.
Further, unified code identification comprises following one of them or combination in any: alert ID, receiving host machine numbering, alarm host machine numbering.
Preferentially, cache memory section also stores alert and pushes list of rules except storing pending alert tabulation.
Further, concentrated gathering also comprises increasing newly, deleting or upgrading and operate alert information.
Further, when alert information had newly-increased, renewal or deletion action to cause the alert data to change, the alert information that will be pushed after module will change by alert pushed the regular client of dealing with emergencies and dangerous situations that connects that is pushed to appointment according to predetermined alert.
Further, be pushed to connecing of appointment and deal with emergencies and dangerous situations before client carries out subsequent treatment pushing rule according to predetermined alert, connecing the client of dealing with emergencies and dangerous situations at first will be through landing behind the authentication, and pushes rule by alert and obtain initial pending alert tabulation.
Further, when said alert information had newly-increased, renewal or deletion action to cause the alert data to change, the said client of dealing with emergencies and dangerous situations that connects was done the renewal of corresponding data and interface according to the particular message that is pushed to.
Preferably, the alert information push is dealt with emergencies and dangerous situations to connecing of appointment after client carries out subsequent treatment pushing rule according to predetermined alert, also comprises: from the pending alert of high-speed buffer is tabulated with said alert information deletion.
The present invention also provides a kind of network alarm alert to concentrate pusher; This device comprises: alert information is concentrated summarizing module, concentrates after being used for the alert information that receives at front end write through receive a crime report server calls the corresponding interface or function unification and gathers; Coding module is used for each alert is carried out unified code identification according to the source and forms pending alert tabulation; Memory module is used to open up cache memory section, stores pending alert tabulation and alert and pushes list of rules; Alert pushes module, is used for pushing rule according to predetermined alert and alert is pushed to connecing of the appointment client of dealing with emergencies and dangerous situations carries out subsequent treatment.
Further, described the corresponding interface is Rest, WebService or http interface.
Further, memory module also stores alert and pushes list of rules except storing pending alert tabulation.
Technology through technical scheme of the present invention realizes; Compare with prior art, possess following advantage at least:, classify according to the alert information source through the rule of alert forwarding flexibly; Improved the alert forwarding speed significantly; Effectively utilize the resource that connects the client of dealing with emergencies and dangerous situations, promoted the speed of dealing with emergencies and dangerous situations, can in time realize handling big concurrent warning.
Through reading instructions, those of ordinary skills will understand the characteristic and the content of these technical schemes better.
Embodiment
Below in conjunction with accompanying drawing further detailed description is done in practical implementation of the present invention.
Please refer to Fig. 1; Overall technological scheme of the present invention is: the new alert information that will receive at front end writes alert information through the server calls REST interface unification of receiving a crime report and concentrates summarizing module to concentrate to gather; And each alert information is carried out unified code identification according to the source form the tabulation of pending alert and get into cache memory section and store; Pushing rule according to predetermined alert pushes module by alert and is pushed to connecing of the appointment client of dealing with emergencies and dangerous situations and carries out subsequent treatment; After this alert information processing finishes, deletion from the pending alert tabulation of high-speed buffer.Generally speaking; With connect deal with emergencies and dangerous situations relevant data or resource and all can deposit the cache memory section in the receiving host machine in; Push rale store like pending alert tabulation and alert, connecing the client of dealing with emergencies and dangerous situations can be 1-N, as long as land through authentication; And push after rule obtains initial pending alert tabulation by alert, can handle.
Below cache memory section is further described, cache memory section is the storage space opened up specially.
1) the alert information related data object definition of cache memory section explanation:
In general, unified code identification comprises following one of them or combination in any: alert ID, receiving host machine numbering, alarm host machine numbering, still, comparative optimization should be alert ID+ receiving host machine numbering, or alert ID+ alarm host machine numbering.
2) metadata cache defined declaration:
3) metadata cache initializing declaration:
High-speed cache adopts TreeMap (orderly key-value pair) object storage, and in order to improve new alert acquisition speed, it is regular to combine alert to push, and with the value defined of the key name among the TreeMap is:
[alarm answering machine chief editor number] _ [alarm host machine numbering] _ alert ID
In order to let those skilled in the art make much of better, special following table is for illustrating.
Obtain updating interface explanation about data, the interface that open data are obtained and upgraded, converge in real time each receive a crime report server with connect the data that the client of dealing with emergencies and dangerous situations transmits, the data buffer memory is upgraded.
Push rule declaration about alert, alert pushes rule and mainly is meant according to the classification of alert source or alert and confirms to send to the deal with emergencies and dangerous situations mode of client of specific connecing, and is generally systemic presupposition, also can adjust renewal in real time according to the specific demand of concrete business.That in a single day alert has is newly-increased, operation such as upgrade, remove when causing pending alert data to change, and will alert be pushed to the client of dealing with emergencies and dangerous situations that connects of appointment through pushing rule.Following table is the example that alert pushes rule:
Realize about the technical scheme specific procedure:
A) server end is realized based on J2EE (Java 2Platform, Enterprise Edition, i.e. Java 2 Platform Enterprise Edition); Data-interface adopts Rest (Representational State Transfer; The transfer of statement sexual state) mode provides service, communicates through Socket with connecing the client of dealing with emergencies and dangerous situations, and so-called socket is also referred to as " socket " usually; Being used to describe IP address and port, is the handle of a communication chain.Application program is perhaps replied network requests through " socket " to the network request of sending usually;
B) generation of new alert is called the Rest interface through the warning receiver module and is accomplished writing of new alert;
C) connecing the client of dealing with emergencies and dangerous situations can cross and call the Rest interface and accomplish obtaining and handling of alert.Alert obtains and the update notification treatment step:
1) connects the client login of dealing with emergencies and dangerous situations, obtain the client id of dealing with emergencies and dangerous situations that connects of current login,, originally connect the pending alert tabulation of the client of dealing with emergencies and dangerous situations according to regular the obtaining of the alert propelling movement of definition through the getAlarmList interface;
2), connect the client of dealing with emergencies and dangerous situations and do corresponding interface according to the message that is pushed to and upgrade if that pending alert has is newly-increased, upgrade, when removing.
When connecing the client of dealing with emergencies and dangerous situations and logining for the first time, obtain pending alert tabulation through Rest, WebService or http interface, Fig. 2 as can be seen from the figure, mainly comprises the steps: for obtaining the synoptic diagram of pending alert tabulation through the mode of traversal high-speed cache
101, at first obtain and connect the client id of dealing with emergencies and dangerous situations; 102, key is split into array by underscore; If the corresponding receiving host machine of 103 arrays [1] meets the current alert that connects the client id of dealing with emergencies and dangerous situations with the corresponding alarm host machine of array [2] and pushes rule; If then get into 104, join current connecing in the pending tabulation of the client of dealing with emergencies and dangerous situations, otherwise continue the traversal high-speed cache; 105, return current connecing in the pending tabulation of the client of dealing with emergencies and dangerous situations.
When new alert produced, the server of receiving a crime report received that calling the REST interface behind the alert carries out alert and write, and idiographic flow is seen shown in Figure 3, mainly comprises following several steps:
201, obtain the corresponding receiving host machine numbering of new alert, alarm host machine numbering and other attribute informations of alert.
202, produce key according to receiving host machine numbering, alarm host machine numbering, alert ID, put into high-speed cache.
203, from alert propelling movement rule, seek the corresponding client id of dealing with emergencies and dangerous situations that connects with the alarm host machine numbering according to the receiving host machine numbering.
204, sending the corresponding client of dealing with emergencies and dangerous situations that connects of message informing through SOCKET has new alert, upgrades pending tabulation by connecing the client of dealing with emergencies and dangerous situations.
When needs upgrade alert, connect and deal with emergencies and dangerous situations client when handling alert, call the REST interface alert data are upgraded, notice connects the client of dealing with emergencies and dangerous situations accordingly and upgrades simultaneously.In order to guarantee that the pending alert of synchronization can only be connect the client of dealing with emergencies and dangerous situations by one and open, the line data of going forward side by side upgrades, and need open to receive a crime report singly judge whether alert locks, if locked then can not open, must wait for the alert release.Further, can consult Fig. 4, specifically comprise the steps:
301,, call the REST interface and obtain the alert details according to pending alert key.
302, judge whether alert locking attribute is put is 1, then representes in this way to be connect the client locking of dealing with emergencies and dangerous situations by other, if locked, then can not upgrade.Otherwise get into step 303.
303, locking alert is changed to 1 with the locking attribute of the object of key corresponding in the high-speed cache.Get into step 304.
304, sending the corresponding client alert of dealing with emergencies and dangerous situations that connects of message informing through SOCKET is locked.Get into step 305.
305, upgrade alert, close the list of receiving a crime report, the locking attribute of the object of key corresponding in the high-speed cache is changed to 0, unlock, get into step 306
306, sending the corresponding client of dealing with emergencies and dangerous situations that connects of message informing through SOCKET has alert to upgrade, upgrades pending tabulation by connecing the client of dealing with emergencies and dangerous situations.
After pending alert tabulation is disposing, need be with this alert that has disposed deletion from this tabulation, idiographic flow sees also Fig. 5, comprises the steps:
401,, call the REST interface and remove alert according to pending alert key.
402, judge whether alert locking attribute is put is 1, then representes in this way to be connect the client locking of dealing with emergencies and dangerous situations by other, if locked, then can not remove, otherwise get into step 403.
403, upgrade alert, close the list of receiving a crime report, remove alert, from high-speed cache, remove.
404, sending the corresponding client of dealing with emergencies and dangerous situations that connects of message informing through SOCKET has alert to upgrade, upgrades pending tabulation by connecing the client of dealing with emergencies and dangerous situations.
Concentrate pusher corresponding to the network alarm alert of realizing the inventive method; As shown in Figure 6; The concentrated pusher 5 of this alert connects client's 1 end of dealing with emergencies and dangerous situations with several and links to each other; This device comprises: alert information is concentrated summarizing module 501, concentrates after being used for the alert information that receives at front end write through receive a crime report server calls REST interface or specific function unification and gathers; Coding module 502 is used for each alert is carried out unified code identification according to the source and forms pending alert tabulation; Memory module 503 is used to open up cache memory section, stores pending alert tabulation and alert and pushes list of rules; Alert pushes module 504, is used for pushing rule according to predetermined alert and alert is pushed to connecing of the appointment client of dealing with emergencies and dangerous situations carries out subsequent treatment.Likewise, memory module also stores alert and pushes list of rules except storing pending alert tabulation.
Above with reference to description of drawings the preferred embodiments of the present invention, those skilled in the art do not depart from the scope and spirit of the present invention, and can have multiple flexible program to realize the present invention.For example, the characteristic that illustrates or describe as the part of an embodiment can be used for another embodiment to obtain another embodiment.More than be merely the preferable feasible embodiment of the present invention, be not so limit to interest field of the present invention, the equivalence that all utilizations instructions of the present invention and accompanying drawing content are done changes, and all is contained within the interest field of the present invention.