Summary of the invention
The embodiment of the invention provides a kind of alarm pushing method and equipment and system, in order to reduce the load of service end in the alarm pushing process.
The alarm pushing method that the embodiment of the invention provides may further comprise the steps:
When client is subscribed to alarm to service end, if the alarm that pulls subscription by other client subscription, then service end increases to the subscriber of this alarm with this client, otherwise this client is designated propelling movement person as the subscriber of this alarm and with it; Service end is notified propelling movement person's client to described alarm with alarm and subscriber's corresponding relation;
Service end receives after the alarm the propelling movement person client of this alarm pushing to this alarm, and described propelling movement person's client is given this alarm pushing other client of this alarm of subscription according to this alarm and subscriber's corresponding relation.
In the said method, described client is increased to the subscriber of alarm, be specially: non-the first subscriber who client is increased to alarm;
Described client is designated propelling movement person as the subscriber of alarm and with it, is specially: with first subscriber of client as the alarm subscriber;
Described service end receives the propelling movement person's client that this alarm is sent to after the alarm this alarm, is specially: described service end receives after the alarm the first subscriber client of this alarm pushing to this alarm.
In the said method, also comprise:
When alarm subscriber client off-line being arranged or nullify, service end is judged the whether propelling movement person of alarm of this client according to alarm and subscriber's corresponding relation;
If the propelling movement person of alarm then selects a subscriber and is labeled as propelling movement person, and the client of this off-line or cancellation is deleted from the subscriber of this alarm from other subscriber of corresponding alarm; If not the propelling movement person of alarm then deletes the client of this off-line or cancellation from the subscriber of this alarm;
Alarm after service end will be upgraded and subscriber's corresponding relation are notified the propelling movement person's client to this alarm.
In the said method, also comprise: if be designated during propelling movement person's the alarm subscriber client off-line or cancellation, after service end reselects out propelling movement person's client of alarm, server end has the alarm pushing failure, after then the alarm after service end will be upgraded and subscriber's corresponding relation is pushed to the propelling movement person's client that reselects out, again push this alarm.
The client device that the embodiment of the invention provides comprises:
Subscribing module is used for subscribing to alarm to service end, and, the alarm that pulls subscription that the reception service end is returned and the subscriber's of this alarm correspondence relationship information; Wherein, if before the alarm that described client-requested is subscribed to also not by other client subscription, then described client is marked as the propelling movement person of this alarm;
Receiver module is used for receiving alarm;
Pushing module, be used for after receiver module receives alarm, according to the subscriber's of described alarm and this alarm correspondence relationship information, judge the whether propelling movement person of this alarm of this client, and push this alarm to other subscriber's client of this alarm when being being judged as.
In the above-mentioned client device, in the received described corresponding relation of described subscribing module, if before the alarm that described client-requested is subscribed to also not by other client subscription, then described client is as first subscriber's client of this alarm;
Described pushing module specifically is used for, and when judging that described client is first subscriber's client of the alarm that receives, pushes described alarm to other subscriber's client of this alarm.
The server device that the embodiment of the invention provides comprises:
Subscribe to processing module, be used for receiving the alarm subscribe request of client, and carry out obtaining after subscription location manages alarm and subscriber's correspondence relationship information; Wherein, if the alarm that pulls subscription by other client subscription, then increases to this client the subscriber of this alarm, otherwise this client is designated propelling movement person as the subscriber of this alarm and with it;
Sending module is used for described alarm and subscriber's correspondence relationship information is notified to propelling movement person's client of subscribing to this alarm;
Receiver module is used for the alarm that receiving equipment sends;
Pushing module is used for the correspondence relationship information according to described alarm and subscriber, and the alarm pushing that described receiver module is received is to propelling movement person's client of this alarm.
In the above-mentioned server device, described subscription processing module is by increasing to client non-first subscriber of alarm, client is increased to the subscriber of alarm, by with first subscriber of client as the alarm subscriber, client is designated propelling movement person as the subscriber of alarm and with it;
Described pushing module specifically is used for, and receives after the alarm the first subscriber client of this alarm pushing to this alarm.
In the above-mentioned server device, described subscription processing module also is used for, and when alarm subscriber client off-line being arranged or nullify, judges the whether propelling movement person of alarm of this client according to alarm and subscriber's corresponding relation; If the propelling movement person of alarm then selects a subscriber and is labeled as propelling movement person, and the client of this off-line or cancellation is deleted from the subscriber of this alarm from other subscriber of corresponding alarm; If not the propelling movement person of alarm then deletes the client of this off-line or cancellation from the subscriber of this alarm;
Described sending module also is used for, and notifies propelling movement person's client to this alarm with the alarm after upgrading and subscriber's corresponding relation.
In the above-mentioned server device, described pushing module also is used for, if be designated during propelling movement person's the alarm subscriber client off-line or cancellation, after described subscription processing module reselects out propelling movement person's client of alarm, service end has the alarm pushing failure, after then the alarm after described sending module will upgrade and subscriber's corresponding relation is pushed to the propelling movement person's client that reselects out, again push this alarm.
The alarm pushing system that the embodiment of the invention provides comprises above-mentioned client device, and above-mentioned server device.
The above embodiment of the present invention, when the client subscription alarm receives strategy, if this client is first subscriber that this alarm receives strategy, then service end with this client as the propelling movement person's client that is used for bearing the alarm pushing task, this propelling movement person's client is after receiving the alarm that service end pushes, push this alarm to other subscriber, thereby realized bearing part alarm pushing task by client, reduced the load of service end.
Embodiment
Below in conjunction with accompanying drawing the embodiment of the invention is described in detail.
Referring to Fig. 1, the network architecture that relates to for the embodiment of the invention.Wherein, there is the individual client of N (N 〉=1) to carry out information interaction with service end.There is demand that alarm receives to be described as example take N client in the embodiment of the invention.
Based on the concrete application scenarios of the network architecture shown in Figure 1 and the embodiment of the invention, Fig. 2 shows the client subscription alarm flow process of (or claiming to subscribe to the alarm pushing strategy).Need to subscribe to the client of alarm pushing strategy for each, it subscribes to processing procedure can be as shown in Figure 2, below only is described as an example of client 1 example, and this flow process can comprise:
Step 201, client 1 send the request of subscribing to the alarm pushing strategy to service end.
Step 202~203, service end judge whether to finish dealing with all subscribe request of client 1 if finish dealing with, then change step 204 over to, otherwise change step 209 over to.
Concrete, the alarm reception strategy that client 1 pulls subscription may have a plurality of, and service end need to be processed each subscribe request of client 1 one by one.Service end can be after the request of client 1 being subscribed to alarm reception strategy be finished dealing with, corresponding subscribe request is labeled as processes, in service end reads the subscribe request of client 1, also have unmarkedly during for the subscribe request processed, change step 204 over to, otherwise change step 209 over to.
Step 204~205, for untreated subscribe request also, service end is inquired about the subscriber that corresponding alarm receives strategy, if there has been the subscriber, then changes step 206 over to, otherwise changes step 207 over to.
Concrete, service end can be stored the correspondence relationship information that alarm receives strategy and subscriber thereof, and service end receives strategy by the alarm of inquiring about this correspondence relationship information and can knowing that this client 1 pulls subscription and whether had other subscriber.
Step 206 receives strategy in the alarm that client 1 pulls subscription and has existed in other subscriber's the situation, and service end is increased to this alarm with client 1 and receives in the tactful subscriber list, then can change step 208 over to.
Step 207, receiving strategy in the alarm that client 1 pulls subscription does not also have in other subscriber's the situation, and service end is increased to this alarm with client 1 as the first subscriber and receives in the tactful subscriber list, then can change step 208 over to.
Concrete, receive in the subscriber list of strategy in alarm, will in follow-up alarm pushing process, bear the task of alarm pushing as the first subscriber's client.The client of alarm pushing task is born in another kind of difference and the mode of other common subscriber's client is: the client that will bear the alarm pushing task identifies, as is designated propelling movement person's client, to distinguish with other subscriber's client.Concrete, in this step, can identify client 1, it is designated propelling movement person's client.
Step 208, service end adds 1 with the number of references that this alarm receives strategy, and the numerical value of this number of references can show subscribes to the client terminal quantity that this alarm receives strategy.This step is optional.
Step 209, service end notifies the correspondence relationship information that alarm receives strategy and its subscriber to the client of having subscribed to corresponding alarm.Preferably, service end can only be notified this alarm and its subscriber's correspondence relationship information the propelling movement person's client (namely bearing the client of this alarm pushing task) to this alarm.
Step 210, service end is returned response to client 1.
Can find out by above flow process, when the client subscription alarm receives strategy, if this client is first subscriber that this alarm receives strategy, then this client will be as propelling movement person's client (as by being marked as the mode of propelling movement person's client, or by the mode as first subscriber's client), this client will be born the propelling movement task of corresponding alarm in follow-up alarm pushing process.
Receiving under the prerequisite of tactful subscribing manner based on the above-mentioned alarm of employing, the alarm pushing flow process that the embodiment of the invention provides can as shown in Figure 3, comprise:
Step 301, service end is received alarm.
Step 302, service end determine to bear the client of this alarm pushing task according to its alarm pushing strategy of storing and its subscriber's correspondence relationship information.
Concrete, if receive in the tactful subscription procedure in alarm, employing is with in the situation of the first subscriber as the client of bearing the alarm pushing task, in this step, first subscriber's client in service end the subscriber list that this alarm is corresponding is defined as bearing the client of this alarm pushing task.If receive in the tactful subscription procedure in alarm, adopt in the situation of mark mode with mark propelling movement person client, in this step, the client that service end will be labeled as propelling movement person's client is defined as bearing the client of this alarm pushing task.
Step 303, service end are given this alarm pushing the client of bearing this alarm pushing task of determining.
The propelling movement task of oneself whether bearing this alarm according to the alarm pushing strategy of its preservation and its subscriber's corresponding relation, is inquired about in step 304~305, client after receiving alarm, if so, then change step 306 over to, otherwise change step 307 over to.
Concrete, if receive in the tactful subscription procedure in alarm, employing is with in the situation of the first subscriber as the client of bearing the alarm pushing task, in this step, client terminal to discover oneself is the first subscriber in the corresponding subscriber list of this alarm, then determines oneself to bear the propelling movement task of this alarm.If receive in the tactful subscription procedure in alarm, adopt in the situation of mark mode with mark propelling movement person client, in this step, client terminal to discover oneself is marked as propelling movement person in subscriber list corresponding to this alarm, then determines oneself to bear the propelling movement task of this alarm.
Step 306, this client is given other subscriber's client of this alarm and execution in step 307 with the alarm pushing that receives.
Step 307, client is processed the alarm that receives.
Can find out by above flow process, service end is after receiving alarm, only need give the client of bearing this alarm pushing task with this alarm pushing, thereby subscribe to the client of this alarm for all alarm pushing by this client, alleviate the load of service end.
Receive the situation that tactful subscriber changes for alarm, such as client off-line, cancellation etc., the embodiment of the invention provides corresponding solution.
Take client 1 off-line or cancellation as example, as shown in Figure 4, when service end was found client 1 off-line or nullified, alarm received the flow process that strategy and its subscriber's corresponding relation upgrades and can comprise:
Step 401, service end judge whether client 1 has been subscribed to alarm and received strategy, and if so, then execution in step 402, otherwise process ends.
Concrete, service end can receive strategy by query warning and judge with its subscriber's corresponding relation whether client 1 has been subscribed to alarm and received strategy.
Step 402 if client 1 is still born the client of alarm pushing task, then changes step 403 over to; Otherwise change step 404 over to.
Concrete, as previously mentioned, if adopt in the situation of the first subscriber as the client of bearing the alarm pushing task, in this step, service end judges that client 1 is the first subscriber, then client 1 is to bear the client of alarm pushing task.If adopt in the situation of mark mode with mark propelling movement person client, in this step, service end judges that client 1 is marked as propelling movement person, and then client 1 is to bear the client of alarm pushing task.
Step 403, service end receive subscriber list corresponding to strategy from alarm client 1 are deleted, and select a client as the client of bearing the propelling movement task of this alarm from this tabulation, then change step 405 over to.
Concrete, if adopt in the situation of the first subscriber as the client of bearing the alarm pushing task, in this step, the new client that service end will be selected is as first subscriber's client.If adopt in the situation of mark mode with mark propelling movement person client, in this step, the new client that service end will be selected is labeled as propelling movement person.
Concrete, service end can adopt various selection mode of the prior art when reselecting propelling movement person's client, include but not limited to the subscription order according to the subscriber of this alarm, or selects according to the loading condition of subscriber's client.For example, after subscriber list deletion client 1, the client that comes thereafter is chosen as propelling movement person's client; Again for example, after subscriber list deletion client 1, from this tabulation, select the lightest client of present load as propelling movement person's client of this alarm.
Step 404, service end receive subscriber list corresponding to strategy from alarm client 1 are deleted, and then change step 405 over to.
Step 405, the correspondence relationship information that the alarm after service end will be upgraded receives strategy and its subscriber sends to corresponding client.Preferably, the alarm after service end will be upgraded and its subscriber's correspondence relationship information only send to propelling movement person's client of this alarm.
If client 1 is subscribed to a plurality of alarm pushing strategies are arranged, then for the alarm pushing strategy of each subscription, all carry out the renewals processing of alarm pushing strategy and subscriber's relation according to the step 402 of above-mentioned flow process~404.
Further, in the process of client 1 off-line or cancellation, if service end has alarm pushing to client 1, the alarm pushing failure can occur then.In order to address this problem, the embodiment of the invention provides following solution:
For the not alarm of success propelling movement, service end is wait reselecting out the client of bearing the alarm pushing task and after further the alarm pushing strategy after will upgrading and its subscriber's corresponding relation sends to propelling movement person's client of newly selecting, according to alarm pushing strategy and its subscriber's corresponding relation, again the failed alarm of this propelling movement is pushed.
In sum, in the above embodiment of the present invention, first consumer's client is received after the alarm, according to the relation between alarm reception strategy and the subscriber, gives other subscriber with alarm pushing.By the distributed propelling movement of this client, reduced the workload of the concentrated alarm pushing of service end.
Based on identical technical conceive, the embodiment of the invention also provides a kind of client device and server device.
As shown in Figure 5, the structure of the client device that provides for the embodiment of the invention, this client device can comprise:
Subscribing module 501 is used for subscribing to alarm to service end, and, the alarm that pulls subscription that the reception service end is returned and the subscriber's of this alarm correspondence relationship information 500; Wherein, if before the alarm that described client-requested is subscribed to also not by other client subscription, then described client is marked as the propelling movement person of this alarm.
Receiver module 502 is used for receiving alarm;
Pushing module 503, be used for after receiver module 502 receives alarm, according to the subscriber's of described alarm and this alarm correspondence relationship information 500, judge the whether propelling movement person of this alarm of this client, and push this alarm to other subscriber's client of this alarm when being being judged as.
In the above-mentioned client device, in the received described corresponding relation of subscribing module 501, if before the alarm that described client-requested is subscribed to also not by other client subscription, then described client is as first subscriber's client of this alarm; Accordingly, pushing module 503 can when judging that described client is first subscriber's client of the alarm that receives, push described alarm to other subscriber's client of this alarm.
Usually, client device also can comprise warning processing module, is used for the alarm that receives is processed.
As shown in Figure 6, the structure of the server device that provides for the embodiment of the invention, this server device can comprise:
Subscribe to processing module 601, be used for receiving the alarm subscribe request of client and carry out subscription location's reason, obtain alarm and its subscriber's correspondence relationship information 600, if the alarm that pulls subscription is by other client subscription, then this client is increased to the subscriber of this alarm, otherwise this client is designated propelling movement person as the subscriber of this alarm and with it;
Sending module 602 is used for described alarm and subscriber's correspondence relationship information 600 is notified to propelling movement person's client of subscribing to this alarm;
Receiver module 603 is used for the alarm that receiving equipment sends;
Pushing module 604 is used for the correspondence relationship information 600 according to alarm and subscriber, and the alarm pushing that receiver module 603 is received is to propelling movement person's client of this alarm.
In the above-mentioned server device, subscribe to processing module 601 by client being increased to non-first subscriber of alarm, client is increased to the subscriber of alarm, by with first subscriber of client as the alarm subscriber, client is designated propelling movement person as the subscriber of alarm and with it; Accordingly, pushing module 604 can be given this alarm pushing first subscriber's client of this alarm after receiving alarm.
In the above-mentioned server device, subscribe to processing module 601 and also can be used for, when alarm subscriber client off-line being arranged or nullify, judge the whether propelling movement person of alarm of this client according to alarm and subscriber's corresponding relation; If the propelling movement person of alarm then selects a subscriber and is labeled as propelling movement person, and the client of this off-line or cancellation is deleted from the subscriber of this alarm from other subscriber of corresponding alarm; If not the propelling movement person of alarm then deletes the client of this off-line or cancellation from the subscriber of this alarm; Accordingly, sending module 602 can be notified the alarm after upgrading and subscriber's corresponding relation the propelling movement person's client to this alarm.
In the above-mentioned server device, pushing module 604 also can be used for, if be designated during propelling movement person's the alarm subscriber client off-line or cancellation, after subscription processing module 601 reselects out propelling movement person's client of alarm, service end has the alarm pushing failure, after then the alarm after sending module 602 will upgrade and subscriber's corresponding relation was pushed to the propelling movement person's client that reselects out, this pushing module 604 pushed this alarm again.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode in a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a station terminal equipment (can be mobile phone, personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.