CN101465860B - Method and device for subscribing and notifying terminal state - Google Patents

Method and device for subscribing and notifying terminal state Download PDF

Info

Publication number
CN101465860B
CN101465860B CN2009100012417A CN200910001241A CN101465860B CN 101465860 B CN101465860 B CN 101465860B CN 2009100012417 A CN2009100012417 A CN 2009100012417A CN 200910001241 A CN200910001241 A CN 200910001241A CN 101465860 B CN101465860 B CN 101465860B
Authority
CN
China
Prior art keywords
state information
subscribed
terminal
initial state
current state
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.)
Expired - Fee Related
Application number
CN2009100012417A
Other languages
Chinese (zh)
Other versions
CN101465860A (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.)
Shenzhen Coship Electronics Co Ltd
Original Assignee
Shenzhen Coship Electronics 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 Shenzhen Coship Electronics Co Ltd filed Critical Shenzhen Coship Electronics Co Ltd
Priority to CN2009100012417A priority Critical patent/CN101465860B/en
Publication of CN101465860A publication Critical patent/CN101465860A/en
Application granted granted Critical
Publication of CN101465860B publication Critical patent/CN101465860B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention relates to communication technical field and discloses a terminal status subscribing and informing method and a device thereof. The subscribing method includes the following steps: acquiring and saving the initial status information of all the subscribed terminals; sending the subscription information which carries the initial status information of the subscribed terminals to a server through user datagram protocol; receiving the current status information of the subscribed terminals, which is inconsistent with the initial status information of the subscribed terminals and is sent by the server through the user datagram protocol; judging whether the current status information of the subscribed terminals is lost, if no, renewing the initial status information of the subscribed terminals; and if yes, acquiring the current status information of all the subscribed terminals and renewing the initial status information of the subscribed terminals. Through the method and the device, the statuses of the subscribed terminals can be known at real time. The method and the device are dispensed with a retransmission mechanism, reduce the amount of the transmitted information and reduce the probability of faults.

Description

A kind of subscription of the SOT state of termination and Notification Method, device
Technical field
The present invention relates to communication technical field, particularly a kind of subscription of the SOT state of termination and Notification Method, device.
Background technology
In some catenet information interaction systems, the user needs to pay close attention in real time the current state of some other users or equipment usually.Common way is, the user needs the terminal paid close attention to the subscription of status tracking server, and the status change notification that the status tracking server in real time will subscribed terminal is to the user.The user can be called the subscriber, and the status tracking server can be called the annunciator.
In the prior art, the subscriber with subscription information through sending to the annunciator, if the subscription information amount is bigger based on certain application layer protocol; The mode that also can adopt increment to send sends to the annunciator one by one; After the annunciator receives subscription information, can collect the current state at these subscribed terminals immediately, then these state informations are handed down to the subscriber one by one; Because the amount of information that issues maybe be bigger, also can adopt the mode of incremental distribution.In subsequent process, when monitoring certain SOT state of termination, the annunciator changes, can immediately this change information be handed down to the subscriber.If because factors such as unstable networks cause certain to subscribe to or notification message is lost, the sender can adopt retransmission mechanism to send once more usually.
Under above-mentioned scene, interacting message is very frequent, and normally takes place synchronously, and this has just proposed that to annunciator's concurrent ability very high requirement is arranged.Total institute is known, adopts transmission control protocol (TCP, Transmission Control Protocol) can set up a kind of reliable two-way connection; Can guarantee information intactly send to the other side; But because normally a kind of synchronous blocking model of Transmission Control Protocol, it is higher that each connection takies resource, and under the relatively poor situation of network environment; Blocking time can be long; If the use Transmission Control Protocol, the annunciator must start a large amount of thread concurrent processing, and annunciator's resource will soon approach exhaustion like this.Therefore, in this type of certain scale used, all be to adopt UDP (UDP, User Datagram Protocol) to carry out transmission of messages at present.As datagram transmission, both sides' udp protocol need not connect with message, and message is sent the back and do not known whether the other side receives, and mutual both sides adopt the asynchronous working mode usually, and efficient is high more than the TCP mode.
At present message is mainly comprised following aspect as the techniqueflow of datagram transmission to udp protocol:
(1) component is subscribed to: when subscribing to the announcement information amount bigger the time employing component send mode batchwise transfer.The length of each datagram of udp protocol is very limited, when the terminal quantity that need subscribe to as the user is a lot, just must subscribe to by component.
(2) after the annunciator receives subscriber's subscription terminal list, can the current state at all these terminals all be notified usually and give the subscriber.
(3) when subscribe to or notification message lose after the employing retransmission mechanism.Since the unreliability of udp protocol, when unstable networks, the situation that the datagram that can fall in is lost.Therefore a lot of annunciators and subscriber have retransmission mechanism, when certain affirmation of once not receiving the other side alternately, will resend.
(4) in during subscribing to, change, will this change notification be subscribed to the subscriber at this terminal to all when the annunciator monitors certain SOT state of termination.
Adopt retransmission mechanism can't guarantee that the subscriber understands the state of subscribing to the terminal really; And when the terminal quantity of subscribing to is huger; The annunciator need consume ample resources and send a notification message, and causes notification message quantity huge, and increase is lost the probability that brings status error because of notification message.
Summary of the invention
The embodiment of the invention provides a kind of subscription and Notification Method, device of the SOT state of termination, can understand the state at subscribed terminal in real time, abandons retransmission mechanism, thereby reduces the message number of sending, and reduces wrong odds.
For realizing above-mentioned purpose, the embodiment of the invention provides following technical scheme:
The embodiment of the invention provides a kind of method for subscribing of the SOT state of termination, comprising:
Obtain the initial state information at all subscribed terminals, and preserve;
Send the subscription information of the initial state information of carrying subscribed terminal to server with the UDP mode;
The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode;
Judge whether the current state information at said subscribed terminal is lost,, upgrade the initial state information at said subscribed terminal if not; If then obtain the current state information at all subscribed terminals, and upgrade the initial state information at said subscribed terminal.
The embodiment of the invention provides a kind of Notification Method of the SOT state of termination, comprising:
Monitor the initial state information at subscribed terminal, and storage;
Receive to subscribe to the full dose subscribe request that send at the terminal, the initial state information at the subscribed terminal of storage is sent to said subscription terminal;
Receive to subscribe to the subscription information of the initial state information of carrying subscribed terminal of sending with the UDP mode at the terminal;
Contrast the current state information at subscribed terminal of initial state information and the monitoring at subscribed terminal one by one, obtain the current state information at inconsistent subscribed terminal and send to said subscription terminal.
The embodiment of the invention provides a kind of subscription terminal, comprising:
The full dose subscribing module is used to obtain the initial state information at all subscribed terminals, and preserves;
The component subscribing module is used for sending to server with the UDP mode subscription information of the initial state information carry subscribed terminal; The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode; If the current state information at said subscribed terminal is not lost, upgrade the initial state information at subscribed terminal;
Said full dose subscribing module is lost if also be used for the current state information at the subscribed terminal of server transmission, obtains the current state information at all subscribed terminals, upgrades the initial state information at subscribed terminal.
The embodiment of the invention provides a kind of server, comprising:
The full dose notification unit is used to receive the full dose subscribe request of subscribing to the terminal transmission; The initial state information at the subscribed terminal of storing is sent to said subscription terminal;
The component notification unit is used to monitor the initial state information at subscribed terminal; Receive the subscription information of subscribing to the initial state information of carrying subscribed terminal of sending at the terminal; Contrast the current state information at subscribed terminal of initial state information and the monitoring at subscribed terminal one by one, obtain the current state information at inconsistent subscribed terminal and send said subscription terminal;
Database is used to store the state information at the subscribed terminal of said component notification unit monitoring.
Compared with prior art; The embodiment of the invention is carried the initial state information at each subscribed terminal in the subscribe message of send server; Because server contrasts one by one and send the current state information at inconsistent subscribed terminal to subscribing to the terminal; Thereby can reduce the message number of transmission, reduce wrong odds; When the current state information at the subscribed terminal that server sends is lost; Subscription terminal ability is obtained once the current state information at all subscribed terminals to correct status error to server; Thereby can understand the state at subscribed terminal in real time, abandon retransmission mechanism.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use among the embodiment below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The schematic flow sheet of the method for subscribing of a kind of SOT state of termination that Fig. 1 provides for the embodiment of the invention one;
The schematic flow sheet of the Notification Method of a kind of SOT state of termination that Fig. 2 provides for the embodiment of the invention two;
Fig. 3 a is a kind of logical construction sketch map of subscribing to the terminal that the embodiment of the invention three provides;
Fig. 3 b is the logical construction sketch map of a kind of component subscribing module of providing of the embodiment of the invention three;
Fig. 3 c is the logical construction sketch map of a kind of full dose subscribing module of providing of the embodiment of the invention three;
A kind of server logical structural representation that Fig. 4 provides for the embodiment of the invention four;
The system schematic that a kind of SOT state of termination that Fig. 5 provides for the embodiment of the invention five is subscribed to and notified.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment one:
See also Fig. 1, the schematic flow sheet of the method for subscribing of a kind of SOT state of termination that Fig. 1 provides for the embodiment of the invention one.As shown in Figure 1, this method can comprise:
Step 101: obtain the initial state information at all subscribed terminals, and preserve.
Subscribe to the terminal when start, can adopt the transmission control protocol mode to send the full dose subscribe request to server;
The initial state information at all subscribed terminals that reception server sends;
Through such mode, can obtain with the initial state information at the subscribed terminal of need paying close attention to is disposable.
Step 102: the subscription information of sending the initial state information of carrying subscribed terminal with the UDP mode to server.
Subscribe to the terminal and can in sending to the subscription information of server, carry the initial state information at the subscribed terminal of step 101 under obtaining;
If it is bigger to subscribe to the subscription information amount of sending at the terminal, can take componentwise to send subscription information, send the transmission that finally can accomplish the initial state information at all subscribed terminals through componentwise;
Subscribing to the terminal specifically can adopt the UDP mode to send the subscription information of the initial state information of carrying subscribed terminal to server; Because the length of each datagram of UDP is very limited; When the subscription information of sending is a lot of; Just must send by component, thereby reach the purpose that component sends subscription information.
Step 103: the reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode.
After server receives the subscription information of subscribing to the initial state information of carrying subscribed terminal of sending at the terminal, obtain the current state information at subscribed terminal;
The initial state information at the subscribed terminal of carrying in the current state information at subscribed terminal and the subscription information is contrasted one by one, put out the current state information at inconsistent subscribed terminal in order;
The current state information at these inconsistent subscribed terminals is sent to the subscription terminal through the UDP mode.
Step 104: whether the current state information of judging said subscribed terminal is lost, if not, then upgrades the initial state information at said subscribed terminal; If then obtain the current state information at all subscribed terminals, and upgrade the initial state information at said subscribed terminal.
When server is put out the current state information at inconsistent subscribed terminal in order in step 103 after; Can distribute a notice sequence number for the current state information at each subscribed terminal according to the order of the current state information at the subscribed terminal of sending, all notice sequence numbers be have successional; Such as, when server sends the current state information at first subscribed terminal, distribute notice sequence number 1; When sending the current state information at second subscribed terminal, distribute notice sequence number 2; By that analogy;
When subscribing to after the terminal receives the current state information at all subscribed terminals, according to the notice sequence number whether have continuity confirm whether the current state information at subscribed terminal is lost in transmission course;
If all notice sequence numbers have continuity, such as notice sequence number 1, notice sequence number 2; Notice sequence number 3; Notice sequence number 4 ..., or the like; The current state information at the subscribed terminal that receives is covered the initial state information at corresponding subscribed terminal, thereby reach the purpose of the initial state information of upgrading subscribed terminal;
Otherwise, if all notice sequence numbers do not have continuity, such as notice sequence number 1; Notice sequence number 2; Notice sequence number 4 or the like explain that the current state information at the 3rd the subscribed terminal that server sends is lost in transmission course, the current state information that need obtain once all subscribed terminals is lost the status error that comes because of the current state information at the 3rd subscribed terminal of transmission with correction; Concrete obtain manner is identical with step 101, here just no longer repeats.
The method for subscribing of above-mentioned a kind of SOT state of termination that the embodiment of the invention one is provided is introduced; The embodiment of the invention is carried the initial state information at each subscribed terminal in sending to the subscribe message of server, because server contrasts and return the current state information at inconsistent subscribed terminal one by one; Have only when the current state information at subscribed terminal is lost, just obtain once the current state information at all subscribed terminals, correct status error; Thereby can understand the state at subscribed terminal in real time; Abandon retransmission mechanism, reduce the message number of sending, reduce wrong odds.
Embodiment two:
See also Fig. 2, the schematic flow sheet of the Notification Method of a kind of SOT state of termination that Fig. 2 provides for the embodiment of the invention two.As shown in Figure 2, this method can comprise:
Step 201: monitor the initial state information at subscribed terminal, and storage.
Server can be monitored the initial state information at all subscribed terminals when starting, and the initial state information at subscribed terminal is stored in the database;
In subsequent process, variation has taken place in the initial state information that monitors some subscribed terminals when server, and the current state information at this subscribed terminal is stored in database, the initial state information at this subscribed terminal of storage before upgrading.
Step 202: receive to subscribe to the full dose subscribe request that send at the terminal, the initial state information at the subscribed terminal of storage is sent to said subscription terminal;
Wherein, server can adopt the initial state information of transmission control protocol mode to all subscribed terminals of subscribing to the disposable transmission in terminal according to subscribing to the full dose subscribe request that send with the transmission control protocol mode at the terminal.
Step 203: the subscription information of receive subscribing to the initial state information of carrying subscribed terminal of sending with the UDP mode at the terminal.
Wherein, Subscribe to the subscription information of sending at the terminal and can adopt the UDP mode to send, because the length of each datagram of UDP is very limited, when the subscription information of sending is a lot of; Just must send by component, thereby reach the purpose that component sends subscription information.
Step 204: contrast the current state information at subscribed terminal of initial state information and the monitoring at subscribed terminal one by one, obtain the current state information at inconsistent subscribed terminal and send said subscription terminal.
Server receives in step 203 after the initial state information of subscribing to the subscribed terminal of sending at the terminal, obtains the current state information at subscribed terminal;
The initial state information at the subscribed terminal of carrying in the current state information at subscribed terminal and the subscription information is contrasted one by one, put out the current state information at inconsistent subscribed terminal in order;
The current state information at these inconsistent subscribed terminals is sent to the subscription terminal through the UDP mode.
Wherein, the current state information at each inconsistent subscribed terminal that server can send distributes a notice sequence number, all notice sequence numbers be have successional.Such as, when server sends the current state information at first subscribed terminal, distribute notice sequence number 1; When sending the current state information at second subscribed terminal, distribute notice sequence number 2, by that analogy.
Server is to subscribe to the terminal when receiving the current state information at subscribed terminal in order to make to the purpose of a notice of the current state information distribution sequence number at the subscribed terminal of each transmission, can whether have continuity according to all notice sequence numbers and judge whether the current state information at the subscribed terminal that server sends is lost in the process of transmitting.
The Notification Method of above-mentioned a kind of SOT state of termination that the embodiment of the invention two is provided is introduced; The embodiment of the invention contrasts the initial state information of subscribing to each subscribed terminal of sending at the terminal one by one, only sends the current state information at inconsistent subscribed terminal to subscribing to the terminal; Have only when subscribing to terminal transmission full dose subscribe request; The current state information that ability is sent all subscribed terminals with the transmission control protocol mode gives the subscription terminal to correct status error; Thereby can make the state that subscribed terminal is understood at the terminal in real time of subscribing to; Abandon retransmission mechanism, thereby reduce the message number of sending, reduce wrong odds.
Embodiment three:
See also Fig. 3 a, Fig. 3 a is a kind of logical construction sketch map of subscribing to the terminal that the embodiment of the invention three provides.Shown in Fig. 3 a, this subscription terminal can comprise:
Full dose subscribing module 301 is used to obtain the initial state information at all subscribed terminals, and preserves;
Component subscribing module 302 is used for sending to server with the UDP mode subscription information of the initial state information carry subscribed terminal; The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode; If the current state information at said subscribed terminal is not lost, upgrade the initial state information at subscribed terminal;
Said full dose subscribing module 301 is lost if also be used for the current state information at the subscribed terminal of server transmission, obtains the current state information at all subscribed terminals, upgrades the initial state information at subscribed terminal.
Please consult Fig. 3 b in the lump, said component subscribing module 302 can comprise:
Transmit-Receive Unit 3201 is used for sending to server with the UDP mode subscription information of the initial state information carry subscribed terminal; The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode;
Updating block 3202 is not lost if be used for the current state information at said subscribed terminal, upgrades the initial state information at subscribed terminal.
Wherein, When said updating block 3202 specifically is used for notice sequence number that the current state information at the subscribed terminal that server sends carries and has continuity; The current state information at the subscribed terminal that server is sent covers the initial state information at corresponding subscribed terminal, reaches the purpose of the initial state information of upgrading subscribed terminal.
Please consult Fig. 3 c in the lump,, said full dose subscribing module 301 can comprise:
Acquiring unit 3011 is used to obtain the initial state information at all subscribed terminals;
Memory cell 3012 is used to preserve the initial state information at all subscribed terminals.
Wherein, lose, obtain the current state information at all subscribed terminals, and upgrade the initial state information at subscribed terminal if said acquiring unit 3011 also is used for the current state information at the subscribed terminal of server transmission.
Said acquiring unit 3011 specifically can adopt the transmission control protocol mode to send the full dose subscribe request to server; The initial state information at all subscribed terminals that reception server sends, thus can obtain with the initial state information at the subscribed terminal that needs to pay close attention to is disposable.
When the notice sequence number of carrying in the current state information at the subscribed terminal that server sends does not have continuity; Said acquiring unit 3011 adopts the transmission control protocol mode to send the full dose subscribe request to server once more; The current state information at all subscribed terminals that reception server sends; The current state information at all subscribed terminals that server is sent covers the initial state information at all subscribed terminals that memory cell 3012 preserves, and reaches the purpose of the initial state information of upgrading subscribed terminal.
Above-mentioned a kind of subscription terminal that the embodiment of the invention three is provided is introduced; The embodiment of the invention contrasts the initial state information component send server at subscribed terminal one by one; And the current state information at inconsistent subscribed terminal is returned in the reception service; Thereby can understand the state at subscribed terminal in real time, reduce server and send message number, reduce wrong occurrence probability; Have only when the current state information at the subscribed terminal that server sends is lost, the current state information that just obtains once all subscribed terminals is with the correction status error, thereby can abandon the retransmission mechanism of server, simplification server.
Embodiment four:
See also Fig. 4, a kind of server logical structural representation that Fig. 4 provides for the embodiment of the invention four.As shown in Figure 4, this server can comprise:
Component notification unit 401 is used to monitor the initial state information at subscribed terminal; Receive the subscription information of subscribing to the initial state information of carrying subscribed terminal of sending at the terminal; Contrast the initial state information at subscribed terminal and the current state information at subscribed terminal one by one, obtain the current state information at inconsistent subscribed terminal and send said subscription terminal;
Database 402 is used to store the current state information at the subscribed terminal of said component notification unit 401 monitorings.
Wherein, said server can also comprise:
Full dose notification unit 403 is used to receive the full dose subscribe request of subscribing to the terminal transmission; The initial state information at the subscribed terminal of database 402 storage is sent to said subscription terminal.
In subsequent process; When if variation has taken place in the initial state information that said component notification unit 401 monitors some subscribed terminals; Said database 402 will this subscribed terminal current state information store the initial state information at this subscribed terminal of storage before upgrading.
Wherein, Said component notification unit 401 specifically can be after receiving the initial state information of subscribing to the subscribed terminal of sending at the terminal; The current state information at the subscribed terminal of the initial state information at the subscribed terminal of carrying in the subscription information and monitoring is contrasted one by one, put out the current state information at inconsistent subscribed terminal in order;
The current state information at these inconsistent subscribed terminals is sent to the subscription terminal through the UDP mode.
Simultaneously, the current state information that component notification unit 401 can give to send be subscribed to each inconsistent subscribed terminal at terminal distributes a notice sequence number, all notice sequence numbers be have successional.Such as, when sending the current state information at first subscribed terminal, distribute notice sequence number 1; When sending the current state information at second subscribed terminal, distribute notice sequence number 2; By that analogy.
Distributing the purpose of a notice sequence number to the current state information at the subscribed terminal of each transmission is to subscribe to the terminal when receiving the current state information at subscribed terminal in order to make, and can whether have continuity according to all notice sequence numbers and judge whether the current state information at the subscribed terminal that server sends is lost in the process of transmission;
When the current state information at the subscribed terminal of subscribing to the transmission of terminal judges server is lost, to the full dose subscribe request of said full dose notification unit 403 transmissions; Said full dose notification unit 403 sends to said subscription terminal with the initial state information at the subscribed terminal of database 402 storage with the transmission control protocol mode, makes to subscribe to the terminal and can correct because of the current state information at subscribed terminal and lose the status error that brings.
The initial state information that said full dose notification unit 403 adopts the transmission control protocol mode to send subscribed terminal to the subscription terminal can guarantee that the current state information at subscribed terminal intactly sends to the subscription terminal.
Above-mentioned a kind of server that the embodiment of the invention four is provided is introduced; The embodiment of the invention contrasts the initial state information of subscribing to each subscribed terminal of sending at the terminal one by one; Only send the current state information at inconsistent subscribed terminal to subscribing to the terminal; Thereby reduce the message number of sending, reduce wrong odds; Have only when subscribing to terminal transmission full dose subscribe request; The current state information that ability is sent once all subscribed terminals with the transmission control protocol mode gives the subscription terminal to correct status error; Can make and subscribe to the state that subscribed terminal is understood at the terminal in real time, abandon retransmission mechanism, simplify server.
Embodiment five:
The server that subscription terminal that present embodiment combination the foregoing description three provides and embodiment four provide is introduced the system that a kind of SOT state of termination is subscribed to and notified.See also Fig. 5, the system schematic that a kind of SOT state of termination that Fig. 5 provides for the embodiment of the invention five is subscribed to and notified.
As shown in Figure 5, server S 01 is when starting, and at first component notification unit S011 monitors the initial state information at all subscribed terminals, and database S012 stores the initial current state information at subscribed terminal;
In subsequent process; Variation has taken place in the initial state information that monitors some subscribed terminals as component notification unit S011; Said database S012 will this subscribed terminal current state information store the initial state information at this subscribed terminal of storage before upgrading;
Full dose notification unit S013 receives and subscribes to the full dose subscribe request that full dose subscribing module S021 adopts the transmission control protocol mode to send among the S02 of terminal; The initial state information at the subscribed terminal of database S012 storage is sent to said full dose subscribing module S021 with the transmission control protocol mode store, can guarantee the initial state information at all subscribed terminals of the disposable acquisition of full dose subscribing module S021;
Component subscribing module S022 sends the subscription information of the initial state information of carrying subscribed terminal according to the initial state information at all subscribed terminals of acquisition of full dose notification unit S013 acquisition to component notification unit S011 with UDP mode component;
Component notification unit S011 receives after the subscription information of the initial state information of carrying subscribed terminal that component subscribing module S022 sends, and obtains the current state information at subscribed terminal; The initial state information at the subscribed terminal of carrying in the current state information at subscribed terminal and the subscription information is contrasted one by one, put out the current state information at inconsistent subscribed terminal in order; The current state information at these inconsistent subscribed terminals is sent to component subscribing module S022 through the UDP mode;
If the current state information at the subscribed terminal that said component notification unit S011 sends is not lost; The current state information at the subscribed terminal that component subscribing module S022 will receive covers the initial state information at the corresponding subscribed terminal of full dose subscribing module S021 storage, reaches the purpose of the initial state information of upgrading subscribed terminal;
If the current state information at the subscribed terminal that said component notification unit S011 sends is lost; Full dose subscribing module S021 adopts the transmission control protocol mode to send the full dose subscribe request to full dose notification unit S013 again; Receive the current state information at all subscribed terminals of full dose notification unit S013 transmission; The current state information at all subscribed terminals is covered the initial state information at all subscribed terminals of storage before, reach the purpose of the initial state information of upgrading subscribed terminal.
The embodiment of the invention contrasts the initial state information of subscribing to each subscribed terminal of sending at the terminal one by one, only sends the current state information at inconsistent subscribed terminal to subscribing to the terminal, thereby reduces the message number of sending, and reduces wrong odds; Have only when subscribing to terminal transmission full dose subscribe request; The current state information that ability is sent once all subscribed terminals with the transmission control protocol mode gives the subscription terminal to correct status error; Can make and subscribe to the state that subscribed terminal is understood at the terminal in real time, abandon retransmission mechanism, simplify server.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of program command; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as read-only memory (ROM), random access device (RAM), magnetic disc or CD.
More than the subscription of a kind of SOT state of termination that the embodiment of the invention provided and Notification Method, device have been carried out detailed introduction; Used concrete example among this paper principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. the method for subscribing of a SOT state of termination is characterized in that, comprising:
Obtain the initial state information at all subscribed terminals, and preserve;
Send the subscription information of the initial state information of carrying subscribed terminal to server with the UDP mode;
The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode;
Judge whether the current state information at said subscribed terminal is lost,, upgrade the initial state information at said subscribed terminal if not; If then obtain the current state information at all subscribed terminals, and upgrade the initial state information at said subscribed terminal.
2. method according to claim 1 is characterized in that, the said initial state information of obtaining all subscribed terminals comprises:
Send the full dose subscribe request with the transmission control protocol mode to server;
The initial state information at all subscribed terminals that reception server sends with the transmission control protocol mode.
3. method according to claim 1 and 2 is characterized in that, comprising:
Judge whether the notice sequence number that the current state information at all subscribed terminals that server sends carries has continuity, if then upgrade the initial state information at subscribed terminal;
If, do not obtain the current state information at all subscribed terminals, and upgrade the initial state information at subscribed terminal.
4. method according to claim 1 is characterized in that, the said current state information that obtains all subscribed terminals, and the initial state information of upgrading said subscribed terminal comprises:
Send the full dose subscribe request with the transmission control protocol mode to server;
The current state information at all subscribed terminals that reception server sends with the transmission control protocol mode;
The initial state information at subscribed terminal is updated to the current state information at subscribed terminal.
5. the Notification Method of a SOT state of termination is characterized in that, comprising:
Monitor the initial state information at subscribed terminal, and storage;
Receive to subscribe to the full dose subscribe request that send at the terminal, the initial state information at the subscribed terminal of storage is sent to said subscription terminal;
Receive to subscribe to the subscription information of the initial state information of carrying subscribed terminal of sending with the UDP mode at the terminal;
Contrast the current state information at subscribed terminal of initial state information and the monitoring at subscribed terminal one by one, obtain the current state information at inconsistent subscribed terminal and send to said subscription terminal.
6. Notification Method according to claim 5 is characterized in that, comprising:
The current state information at the subscribed terminal of the initial state information at subscribed terminal and monitoring is compared one by one, obtain the current state information at inconsistent subscribed terminal;
With the UDP mode current state information at said inconsistent subscribed terminal is sent to and to subscribe to the terminal.
7. subscribe to the terminal for one kind, it is characterized in that, comprising:
The full dose subscribing module is used to obtain the initial state information at all subscribed terminals, and preserves;
The component subscribing module is used for sending to server with the UDP mode subscription information of the initial state information carry subscribed terminal; The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode; If the current state information at said subscribed terminal is not lost, upgrade the initial state information at subscribed terminal;
Said full dose subscribing module is lost if also be used for the current state information at the subscribed terminal of server transmission, obtains the current state information at all subscribed terminals, upgrades the initial state information at subscribed terminal.
8. subscription according to claim 7 terminal is characterized in that, said component subscribing module comprises Transmit-Receive Unit and updating block:
Said Transmit-Receive Unit is used for sending to server with the UDP mode subscription information of the initial state information of carrying subscribed terminal; The reception server current state information with the inconsistent subscribed terminal of initial state information subscribed terminal that send with the UDP mode;
Do not lose if said updating block is used for the current state information at said subscribed terminal, upgrade the initial state information at subscribed terminal;
Said full dose subscribing module comprises acquiring unit and memory cell:
Said acquiring unit is used to obtain the initial state information at all subscribed terminals;
Said memory cell is used to preserve the initial state information at all subscribed terminals.
9. subscription according to claim 8 terminal; It is characterized in that said acquiring unit is lost if also be used for the current state information at the subscribed terminal of server transmission; Obtain the current state information at all subscribed terminals, and upgrade the initial state information at subscribed terminal.
10. a server is characterized in that, comprising:
The full dose notification unit is used to receive the full dose subscribe request of subscribing to the terminal transmission; The initial state information at the subscribed terminal of storing is sent to said subscription terminal;
The component notification unit is used to monitor the initial state information at subscribed terminal; Receive the subscription information of subscribing to the initial state information of carrying subscribed terminal of sending at the terminal; Contrast the current state information at subscribed terminal of initial state information and the monitoring at subscribed terminal one by one, obtain the current state information at inconsistent subscribed terminal and send said subscription terminal;
Database is used to store the state information at the subscribed terminal of said component notification unit monitoring.
CN2009100012417A 2009-01-14 2009-01-14 Method and device for subscribing and notifying terminal state Expired - Fee Related CN101465860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100012417A CN101465860B (en) 2009-01-14 2009-01-14 Method and device for subscribing and notifying terminal state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100012417A CN101465860B (en) 2009-01-14 2009-01-14 Method and device for subscribing and notifying terminal state

Publications (2)

Publication Number Publication Date
CN101465860A CN101465860A (en) 2009-06-24
CN101465860B true CN101465860B (en) 2012-05-23

Family

ID=40806222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100012417A Expired - Fee Related CN101465860B (en) 2009-01-14 2009-01-14 Method and device for subscribing and notifying terminal state

Country Status (1)

Country Link
CN (1) CN101465860B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516723A (en) * 2013-09-22 2014-01-15 大唐移动通信设备有限公司 SIP message handling method and device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158911A (en) * 2010-02-11 2011-08-17 华为技术有限公司 Machine-to-machine service bearer establishment method and network transmission equipment
CN102752335B (en) * 2011-04-22 2017-08-08 中兴通讯股份有限公司 Peer-to-peer overlay network interior joint overload information subscribing method and system
KR101945812B1 (en) * 2012-06-08 2019-02-08 엘지전자 주식회사 Mobile terminal and method for operating the same
CN105635209B (en) * 2014-10-31 2019-06-21 中国移动通信集团公司 The management method and device, online terminal agent of online terminal
CN108052661B (en) * 2017-12-27 2021-12-28 广州品唯软件有限公司 Aggregation retrieval method and device in distributed environment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474289A (en) * 2002-08-09 2004-02-11 联想(北京)有限公司 Method for displaying synchronously content of host on client machine
CN101247389A (en) * 2007-02-12 2008-08-20 华为技术有限公司 Method and system for discovering stream media service and service discovering device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474289A (en) * 2002-08-09 2004-02-11 联想(北京)有限公司 Method for displaying synchronously content of host on client machine
CN101247389A (en) * 2007-02-12 2008-08-20 华为技术有限公司 Method and system for discovering stream media service and service discovering device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516723A (en) * 2013-09-22 2014-01-15 大唐移动通信设备有限公司 SIP message handling method and device
CN103516723B (en) * 2013-09-22 2017-08-11 大唐移动通信设备有限公司 SIP message processing method and device

Also Published As

Publication number Publication date
CN101465860A (en) 2009-06-24

Similar Documents

Publication Publication Date Title
CN101465860B (en) Method and device for subscribing and notifying terminal state
CN103036926B (en) Business push system and method
CN110808948B (en) Remote procedure calling method, device and system
EP1734782A1 (en) A method of dual transfer mode handover
CN102111426A (en) Method, system and device for implementing point-to-point technology
CN110336702A (en) A kind of system and implementation method of message-oriented middleware
CN102257793A (en) A method and arrangement for handling resource data
CN104852991A (en) Distributed push server system and data push method using the system
CN103262582A (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN103220328A (en) Data synchronous distribution method and device
CN102404710B (en) Method, device and system for contract signing data management of machine type communication device
CN112134763A (en) Method, system, equipment and medium for transmitting layered messages among cluster nodes
CN111901881A (en) Transmission method and device
CN111752803A (en) Method, device and medium for collecting and reporting buried point data
CN102195786B (en) Intelligent data exchange platform and method
KR101236729B1 (en) Apparatus and method of automatically selecting packet transmission method for data distribution service
CN105376155A (en) Intelligent route system and method based on distributed cluster framework
CN101548514B (en) Method for exchanging messages in a mobile radio network
CN101001213B (en) Short message transmission system and method
CN101695049A (en) Method and device for processing businesses in monitoring system
CN110635927B (en) Node switching method, network node and network system
CN102868771A (en) Converged address book based contact synchronizing method, device and system
CN102457824B (en) Event processing method and device
CN115412609A (en) Service processing method, device, server and storage medium
CN114598662A (en) Message queue cluster federal management system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1131287

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120523

Termination date: 20150114

EXPY Termination of patent right or utility model
REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1131287

Country of ref document: HK