WO2015113409A1 - Method, apparatus and system for state subscription - Google Patents

Method, apparatus and system for state subscription Download PDF

Info

Publication number
WO2015113409A1
WO2015113409A1 PCT/CN2014/088957 CN2014088957W WO2015113409A1 WO 2015113409 A1 WO2015113409 A1 WO 2015113409A1 CN 2014088957 W CN2014088957 W CN 2014088957W WO 2015113409 A1 WO2015113409 A1 WO 2015113409A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
status information
information corresponding
presence server
status
Prior art date
Application number
PCT/CN2014/088957
Other languages
French (fr)
Chinese (zh)
Inventor
陈飞
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015113409A1 publication Critical patent/WO2015113409A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, apparatus, and system for status subscription.
  • the state subscription method based on the presence of the Presence service is widely used in the field of ICT (Information Communication Technology), in which Presence acquires presence information (such as user status, in real time according to certain access criteria according to certain access criteria. Communication, personal settings, etc.), and a way to show other users.
  • Presence technology plays a very important role in this instant messaging.
  • instant messaging services can be based on functions such as “user multiple status settings” (such as users set to “call”, “meeting in progress” and other status), provide “subscribe to other people's status information”, etc.
  • a variety of rich value-added services providing efficient and convenient solutions for personal, business users in the office, conference, communications and other fields.
  • the terminal needs to subscribe to the status of other terminals, a list subscription message is sent according to the contact information in the terminal, so that the status messages of the multiple terminals are subscribed at the same time. Since the terminal and other terminals sequentially perform state subscription, a large number of subscription sessions will be generated inside the system, wherein the subscription sessions may include subscriptions between PSs (Presence Servers) in the same site, different Subscriptions between PSs between sites, as well as status change notifications.
  • PSs Presence Servers
  • the number of internal terminals in the system is 10000, and the average status of each terminal subscribes to 150 other terminals, and the total number of subscription sessions generated within the system is: 10000 ⁇ 150 ⁇ (3- 1) / 3;
  • the number of status notifications generated within the system is: the total number of status announcements of the terminal ⁇ 150 ⁇ (3-1) / 3. Therefore, when a large number of terminals simultaneously initiate a status subscription, the processing performance of the entire system and the network traffic are highly demanded.
  • Embodiments of the present invention provide a method, apparatus, and system for status subscription, which can be reduced
  • the number of subscriptions and status notifications generated internally by the system when there are fewer status subscriptions reduces the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • an embodiment of the present invention provides a method for status subscription, where the method includes:
  • the first presence server receives status information issued by the first terminal that belongs to the first presence server;
  • the first presence server broadcasts status information issued by the first terminal to other presence servers, and the other presence servers include a second presence server, so that the second presence server is attributable to the second presence server.
  • the second terminal subscribes to the status information corresponding to the first terminal, the second terminal is notified of the status information corresponding to the first terminal, and the status information corresponding to the first terminal includes the first terminal. status information.
  • the method further includes:
  • the first presence server receives the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
  • the first presence server acquires state information corresponding to the third terminal, and returns state information corresponding to the third terminal to the second presence server;
  • the first presence server broadcasts status information corresponding to the third terminal to the other presentation server.
  • the obtained status information corresponding to the third terminal includes status information that is sent by the third terminal;
  • the obtained status information corresponding to the third terminal includes the description information of the user of the third terminal.
  • an embodiment of the present invention provides a method for status subscription, where the method includes:
  • the second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the state information of the contact in the contact list;
  • the second presence server receives state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server;
  • the second presence server When the second presence server receives the status information corresponding to the first terminal and determines that the first terminal is a terminal of a contact in the contact list, notifying the second terminal of the first Status information corresponding to the terminal.
  • the method further includes:
  • the second presence server determines that the third terminal is a terminal of the contact in the contact list, does not store state information corresponding to the third terminal, and determines that the third terminal belongs to the first
  • the query message is sent to the first presence server, where the query message is used to query status information corresponding to the third terminal;
  • the second presence server notifies the second terminal of the status information corresponding to the third terminal.
  • an embodiment of the present invention provides a first presentation server, including: a receiving module and a broadcast module;
  • the receiving module is configured to receive status information advertised by the first terminal that belongs to the first presence server, and transmit status information advertised by the first terminal to the broadcast module;
  • the broadcast module is configured to receive status information that is sent by the first terminal from the receiving module, and broadcast the status information that is sent by the first terminal to another presentation server, where the other presentation server includes a second presence server.
  • the other presentation server includes a second presence server.
  • the status information includes status information issued by the first terminal.
  • the receiving module is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
  • the first presence server further includes:
  • a processing module configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presentation server;
  • the broadcast module is further configured to: after the processing module acquires the state information corresponding to the third terminal, broadcast the state information corresponding to the third terminal to the other presence server.
  • the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal;
  • the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
  • an embodiment of the present invention provides a second presentation server, including: a receiving module and a sending module;
  • the receiving module is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a status of a contact in the contact list.
  • Information and is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server;
  • the sending module is configured to receive status information corresponding to the first terminal at the receiving module, and determine that the first terminal is a terminal of a contact in the contact list And notifying the second terminal of the status information corresponding to the first terminal.
  • the sending module is further configured to: after the receiving module receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is a contact in the contact list The terminal does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, and sends a query message to the first presence server, where the query message is used. Querying status information corresponding to the third terminal;
  • the receiving module is further configured to receive status information corresponding to the third terminal returned by the first presence server;
  • the sending module is further configured to notify the second status information corresponding to the third terminal after the receiving module receives the status information corresponding to the third terminal returned by the first terminal.
  • a fifth aspect of the present invention provides a state subscription system, including:
  • the first presence server is configured to receive state information issued by a first terminal that belongs to the first presence server; broadcast the state information to other presence servers, where the other presence servers include the second presence server In order to notify the second terminal of the status information corresponding to the first terminal, when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal,
  • the status information corresponding to the first terminal includes status information that is sent by the first terminal;
  • the second presence server is configured to receive a subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact in the contact list.
  • Status information ; receiving status information corresponding to the first terminal that is broadcast by the first presence server and belonging to the first presence server; receiving status information corresponding to the first terminal, and determining that the first terminal is When the terminal of the contact in the contact list is notified to the second terminal, the status information corresponding to the first terminal is notified.
  • the first presence server is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
  • the status information corresponding to the third terminal is returned to the second presentation server, and the status information corresponding to the third terminal is broadcasted to the other presentation server;
  • the second presence server is further configured to: determine, by the terminal that the third terminal is a contact in the contact list, does not store state information corresponding to the third terminal, and determine that the third terminal belongs to And sending, by the first presence server, the query message to the first presence server, where the query message is used to query status information corresponding to the third terminal; and receive the third terminal returned by the first presence server Corresponding state information; notifying the second terminal of the state information corresponding to the third terminal.
  • a method, device, and system for status subscription provided by an embodiment of the present invention, receiving, by a first presence server, status information issued by a first terminal that belongs to the first presence server; the first presence server
  • the status information issued by the first terminal is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the second terminal at the second terminal belonging to the second presence server.
  • the status information corresponding to the first terminal is notified to the second terminal by the status information corresponding to the terminal, and the status information corresponding to the first terminal includes the status information that is sent by the first terminal.
  • the first presentation server can broadcast the status information corresponding to the first terminal to the other presentation server, so that the other presentation server notifies the other terminal of the first terminal when the other terminal subscribes to the status information corresponding to the first terminal. Status information. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • FIG. 1 is a schematic flowchart of a method for status subscription according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a method for status subscription according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic flowchart of a method for status subscription according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic flowchart of a method for status subscription according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic flowchart diagram of a method for status subscription according to Embodiment 5 of the present invention.
  • FIG. 6 is a schematic flowchart diagram of a method for status subscription according to Embodiment 6 of the present invention.
  • FIG. 7 is a schematic flowchart diagram of a method for status subscription according to Embodiment 7 of the present invention.
  • FIG. 8 is a schematic flowchart diagram of a method for status subscription according to Embodiment 8 of the present invention.
  • FIG. 9 is a schematic structural diagram 1 of a first presentation server according to Embodiment 9 of the present invention.
  • FIG. 10 is a second schematic structural diagram of a first presentation server according to Embodiment 9 of the present invention.
  • FIG. 11 is a schematic structural diagram of a second presentation server according to Embodiment 10 of the present invention.
  • FIG. 12 is a schematic structural diagram of a first terminal according to Embodiment 11 of the present invention.
  • FIG. 13 is a schematic structural diagram of a second terminal according to Embodiment 12 of the present invention.
  • FIG. 14 is a schematic structural diagram 1 of another first presence server according to Embodiment 13 of the present invention.
  • FIG. 15 is a second schematic structural diagram of a first presentation server according to Embodiment 13 of the present invention.
  • FIG. 16 is a schematic structural diagram of another second presentation server according to Embodiment 14 of the present invention.
  • FIG. 17 is a schematic structural diagram of another first terminal according to Embodiment 15 of the present invention.
  • FIG. 18 is a schematic structural diagram of another second terminal according to Embodiment 16 of the present invention.
  • system and “network” are used interchangeably herein.
  • the term “and/or” in this context is merely an association describing the associated object, indicating that there may be three relationships, for example, A and / or B, which may indicate that A exists separately, and both A and B exist, respectively. B these three situations.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the first terminal, the second terminal, and the third terminal which are described in the embodiments of the present invention, may be user equipments, and may be other terminals that can be used to send status information to request other terminal status information, which is not limited by the present invention.
  • the first terminal, the second terminal, and the third terminal of the present invention may be the same entity terminal, and the terminal may be used as the first terminal to implement the function of the first terminal, or may be used as the second terminal to implement the second terminal.
  • the function of the terminal can also be used as the third terminal to implement the function of the third terminal, and the invention is also not limited.
  • the embodiment of the present invention describes the specific embodiment of the present invention by taking the first terminal, the second terminal, and the third terminal as user equipments as an example.
  • An embodiment of the present invention provides a method for status subscription. As shown in FIG. 1, the method includes:
  • the first presence server receives the first end attributed to the first presence server. Status information published by the terminal.
  • a list subscription message is sent according to the contact information in the terminal, so that the status messages of the multiple terminals are subscribed at the same time. Since the terminal and other terminals sequentially perform state subscription, a large number of subscription sessions will be generated inside the system, wherein the subscription sessions may include subscriptions between PSs in the same site, and between PSs between different sites. Subscriptions, as well as status change notifications. Therefore, when a large number of terminals simultaneously initiate a status subscription, the processing performance of the entire system and the network traffic are highly demanded.
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription.
  • the embodiment of the present invention can be applied to a scenario in which all terminals are mutually authorized (such as an enterprise network scenario), wherein mutual authorization means that all terminals are mutually trusted relationship states, and any one terminal can be In the case of other terminal authorization, the status of other terminals is directly obtained without going through the subscription authorization rule judging process.
  • the first presence server receives status information issued by the first terminal belonging to the first presence server.
  • the first terminal belongs to the first presence server, and the first presence server is capable of receiving the status information issued by the first terminal that belongs to the first presence server.
  • the method for the first terminal to release the status information includes the first terminal publishing the status information of the first terminal to the first presence server through a SIP (Session Initiation Protocol).
  • the status information that is sent by the first terminal may include an online status corresponding to the first terminal (for example, whether the first terminal is online, a busy, idle state, etc. displayed when the first terminal is online), and a setting corresponding to the first terminal.
  • the information (such as the personalized signature set by the user of the first terminal on the first terminal, etc.) is not limited by the present invention.
  • the first presence server broadcasts status information issued by the first terminal to other presence servers, where the other presence servers include a second presence server, so that the second presence server is attributable to the second
  • the second terminal of the presence server subscribes to the state information corresponding to the first terminal
  • the second terminal is notified of the state information corresponding to the first terminal, and the state information corresponding to the first terminal includes the first terminal.
  • Status information published by the terminal is published by the terminal.
  • the first presence server After the first presence server receives the status information issued by the first terminal that belongs to the first presence server, the first presence server broadcasts the status information issued by the first terminal to other presentation servers, and the other presentation servers include the second presence server, so that When the second terminal that belongs to the second presence server subscribes to the state information corresponding to the first terminal, the second presence server notifies the second terminal of the state information corresponding to the first terminal.
  • the status information corresponding to the first terminal includes status information that is sent by the first terminal.
  • the status information corresponding to the first terminal may include status information advertised by the first terminal, description information corresponding to the first terminal, and the like, and the description information of the user of the first terminal may include basic information of the user of the first terminal ( For example, the nickname, birthday, avatar, and the like of the user of the first terminal, the geographic location of the user of the first terminal, and the fixed number of the work number.
  • the first presentation server broadcasts the status information of the first terminal to other presentation servers, and the first presentation server may broadcast the status information of the first terminal to the other presentation server for the first time, or may be After the first terminal releases the updated status information, the first presence server broadcasts the updated status information to other presentation servers, which is not limited by the present invention.
  • the second presentation server notifies the second terminal of the status information corresponding to the first terminal when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal is performed in the following embodiments. Detailed description will not be repeated here.
  • the first presence server receives the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
  • the second presence server If the second presence server does not store the state information corresponding to the third terminal that belongs to the first presence server, the second presence server sends the query message to the first presence server, and the first presence server receives the query message sent by the second presence server.
  • the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
  • the status information corresponding to the third terminal may include the status information of the third terminal, the description information corresponding to the third terminal, and the like
  • the description information of the user of the third terminal may include the basic information of the user of the third terminal ( For example, the nickname, birthday, avatar, and the like of the user of the third terminal, the geographic location of the user of the third terminal, and the fixed number of the work number.
  • the status information advertised by the third terminal may include an online status corresponding to the third terminal. (for example, whether the third terminal is online, the busy or idle state displayed by the third terminal in the case of online), the setting information corresponding to the third terminal (such as the personalized signature set by the user of the third terminal on the third terminal, etc.)
  • the invention is not limited.
  • the first presence server acquires state information corresponding to the third terminal, and returns status information corresponding to the third terminal to the second presence server.
  • the first presence server After the first presentation server receives the query message sent by the second presence server, the first presence server acquires the state information corresponding to the third terminal, and returns the state information corresponding to the third terminal to the second presence server.
  • the first presence server broadcasts status information corresponding to the third terminal to the other presence server.
  • the first presence server can also broadcast the status information corresponding to the third terminal to other presentation servers, so that when the terminal belongs to other presentation servers
  • the other presentation server may not request the status information corresponding to the third terminal from the first presentation server, and may directly read the status information corresponding to the third terminal from the other presentation server. And sent to the terminal requesting the status information corresponding to the third terminal.
  • the obtained status information corresponding to the third terminal includes status information that is sent by the third terminal.
  • the obtained status information corresponding to the third terminal includes the description information of the user of the third terminal.
  • the embodiment of the present invention provides a state subscription method, where the first presence server receives the state information advertised by the first terminal that belongs to the first presence server, and the first presence server releases the state of the first terminal.
  • the information is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the state information corresponding to the first terminal at the second terminal belonging to the second presence server.
  • the second presence server subscribes to the state information corresponding to the first terminal at the second terminal belonging to the second presence server.
  • notifying the second terminal of the status information corresponding to the first terminal where the status information corresponding to the first terminal includes status information that is sent by the first terminal.
  • the first presence server can broadcast the status information corresponding to the first terminal
  • the other presentation server is configured to notify other terminals of the status information corresponding to the first terminal when the other terminal subscribes to the status information corresponding to the first terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • An embodiment of the present invention provides a method for status subscription. As shown in FIG. 2, the method includes:
  • the second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the status information of the contact in the contact list. .
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription.
  • the embodiment of the present invention can be applied to a scenario in which all terminals are mutually authorized (such as an enterprise network scenario), wherein mutual authorization means that all terminals are mutually trusted relationship states, and any one terminal can be In the case of other terminal authorization, the status of other terminals is directly obtained without going through the subscription authorization rule judging process.
  • the second presence server receives the subscription message sent by the second terminal belonging to the second presence server.
  • the subscription message includes an identifier of the contact list for subscribing to status information of the contact in the contact list.
  • the second presence server receives status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
  • the second presence server After the second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, the second presence server receives the state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
  • the second presence server receives the status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presentation server, and may be the first presentation server to broadcast the status information of the first terminal for the first time.
  • the first presentation server may update after the first terminal issues the updated status information.
  • the subsequent status information is broadcast to the second presence server, and the present invention is not limited.
  • the status information corresponding to the first terminal may include status information advertised by the first terminal, description information corresponding to the first terminal, and the like, and the description information of the user of the first terminal may include basic information of the user of the first terminal ( For example, the nickname, birthday, avatar, and the like of the user of the first terminal, the geographic location of the user of the first terminal, and the fixed number of the work number.
  • the status information that is sent by the first terminal may include an online status corresponding to the first terminal (for example, whether the first terminal is online, a busy or idle state displayed when the first terminal is online), and setting information corresponding to the first terminal. (For example, the personalized signature set by the user of the first terminal on the first terminal, etc.), the invention is not limited.
  • step S201 there is no execution order relationship between the step S201 and the step S202.
  • the step S201 may be performed first, or the step S202 may be performed first, and the invention is not limited.
  • the second presence server notifies the second terminal of the status information when receiving the status information corresponding to the first terminal and determining that the first terminal is a terminal of a contact in the contact list. Status information corresponding to the first terminal.
  • the second presence server determines that the third terminal is a terminal of the contact in the contact list, does not store state information corresponding to the third terminal, and determines that the third terminal belongs to the terminal.
  • the first presentation server sends a query message to the first presence server, where the query message is used to query status information corresponding to the third terminal.
  • the second presence server determines that the state information corresponding to the third terminal is not stored in the following two situations: one is that the second presence server fails or restarts, and the state information corresponding to the originally stored third terminal is lost.
  • the third terminal has never issued status information to the first presence server that belongs to the home, so the first presence server has never broadcasted the status information corresponding to the third terminal to other presentation servers.
  • the second presence server sends a query message to the first presence server, and the query message is used to query the state information corresponding to the third terminal.
  • the second presence server receives status information corresponding to the third terminal returned by the first presence server.
  • the second presence server After the second presentation server sends the query message to the first presence server, the second presence server receives the state information corresponding to the third terminal returned by the first presence server.
  • the status information corresponding to the third terminal may include the status information of the third terminal, the description information corresponding to the third terminal, and the like
  • the description information of the user of the third terminal may include the basic information of the user of the third terminal ( For example, the nickname, birthday, avatar, and the like of the user of the third terminal, the geographic location of the user of the third terminal, and the fixed number of the work number.
  • the status information that is sent by the third terminal may include an online status corresponding to the third terminal (for example, whether the third terminal is online, a busy or idle state displayed when the third terminal is online), and setting information corresponding to the third terminal. (For example, the personalized signature set by the user of the third terminal on the third terminal, etc.), the invention is not limited.
  • the second presence server receives the status information corresponding to the third terminal returned by the first presence server, including State information issued by the third terminal.
  • the second presentation server receives the status information corresponding to the third terminal returned by the first presence server, including the user of the third terminal. Descriptive information.
  • the second presence server notifies the second terminal of status information corresponding to the third terminal.
  • the second presentation server After the second presentation server receives the status information corresponding to the third terminal returned by the first presentation server, the second presentation server notifies the second terminal of the status information of the third terminal, thereby completing the status of the second terminal to the third terminal. subscription.
  • An embodiment of the present invention provides a method for a status subscription, where a second presence server receives a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used for a subscription.
  • State information of a contact in the contact list the second presence server receives state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server; the second presence server After receiving the status information corresponding to the first terminal and determining that the first terminal is a terminal of a contact in the contact list, notifying the second terminal of status information corresponding to the first terminal.
  • An embodiment of the present invention provides a method for status subscription. As shown in FIG. 3, the method includes:
  • the first terminal issues the status information that is sent by the first terminal to the first presence server.
  • the method for the first terminal to release the status information that is sent by the first terminal includes: the first terminal publishing the status information of the first terminal by using the SIP.
  • the embodiment of the present invention provides a method for a state subscription, in which the first terminal issues the state information advertised by the first terminal to the first presence server, so that the second terminal acquires the state information advertised by the first terminal.
  • the first presentation server can broadcast the status information corresponding to the first terminal to the other presentation server, so that the other presentation server notifies the other terminal of the first terminal when the other terminal subscribes to the status information corresponding to the first terminal. Status information. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • An embodiment of the present invention provides a method for status subscription. As shown in FIG. 4, the method includes:
  • the second terminal sends a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact list. Status information for contacts in .
  • the second terminal belongs to the second presence server.
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription.
  • the embodiment of the present invention can be applied to a scenario in which all terminals are mutually authorized (such as an enterprise network scenario), wherein mutual authorization means that all terminals are mutually trusted relationship states, and any one terminal can be In the case of other terminal authorization, the status of other terminals is directly obtained without going through the subscription authorization rule judging process.
  • the second terminal When the second terminal requests to subscribe to the state of the first terminal, first, the second terminal needs to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and subscribes.
  • the message includes an identification of the contact list for subscribing to status information of the contacts in the contact list.
  • the status information corresponding to the first terminal may include status information advertised by the first terminal, description information corresponding to the first terminal, and the like, and the description information of the user of the first terminal may include basic information of the user of the first terminal ( For example, the nickname, birthday, avatar, and the like of the user of the first terminal, the geographic location of the user of the first terminal, and the fixed number of the work number.
  • the status information that is sent by the first terminal may include an online status corresponding to the first terminal (for example, whether the first terminal is online, a busy or idle state displayed when the first terminal is online), and setting information corresponding to the first terminal. (For example, the personalized signature set by the user of the first terminal on the first terminal, etc.), the invention is not limited.
  • the second terminal receives state information corresponding to the first terminal sent by the second presence server.
  • the second terminal After the second terminal sends the status subscription message to the second presence server, the second terminal receives the status information corresponding to the first terminal sent by the second presence server.
  • An embodiment of the present invention provides a method for a status subscription, in which a second terminal sends a status subscription message to a second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes contacting.
  • the identifier of the person list is used to subscribe to the status information of the contact in the contact list; the second terminal receives the status information corresponding to the first terminal sent by the second presence server.
  • An embodiment of the present invention provides a method for a state subscription, where the first terminal performs a state subscription process, and the second terminal belongs to the first PS and the second terminal issues a second.
  • the status information corresponding to the terminal is described as an example of the first PS. As shown in FIG. 5, the method includes:
  • the second terminal issues state information corresponding to the second terminal to the first PS.
  • a list subscription message is sent according to the contact information in the terminal, so that the status messages of the multiple terminals are subscribed at the same time. Since the terminal and other terminals sequentially perform state subscription, a large number of subscription sessions will be generated inside the system, wherein the subscription sessions may include subscriptions between PSs in the same site, and between PSs between different sites. Subscriptions, as well as status change notifications. Therefore, when a large number of terminals simultaneously initiate a status subscription, the processing performance of the entire system and the network traffic are highly demanded.
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted, and any one terminal can directly acquire the status of other terminals without being subscribed. Authorization rule judgment process.
  • the second terminal issues the status information corresponding to the second terminal to the first PS.
  • the second terminal may periodically or periodically release the status information corresponding to the second terminal by using the SIP.
  • the periodic or non-periodical release of the state information corresponding to the second terminal means that the second terminal can periodically release the state information corresponding to the second terminal according to the preset rule of the user (for example, the second terminal every second time)
  • the second terminal re-publishes the status information corresponding to the second terminal when the status information corresponding to the second terminal is updated.
  • the status information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal ( For example, the nickname, birthday, avatar, and the like of the user of the second terminal, the geographic location of the user of the second terminal, and the fixed number of the work number.
  • the status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (eg the user of the second terminal is in the second end The personalized signature set on the side, etc.), the invention is not limited.
  • the first PS acquires state information corresponding to the second terminal.
  • the first PS stores and broadcasts status information corresponding to the second terminal.
  • the first PS After the second terminal belongs to the first PS, after the second terminal issues the state information corresponding to the second terminal to the first PS, the first PS acquires the state information corresponding to the second terminal, and stores and broadcasts the corresponding information of the second terminal. status information.
  • the purpose of the first PS to broadcast the status information corresponding to the second terminal is to enable other PSs to receive and store the status information corresponding to the second terminal.
  • the status information corresponding to the second terminal may be directly read from the PS and sent to the terminal requesting the status information corresponding to the second terminal.
  • the second terminal periodically or non-periodically releases the state information corresponding to the second terminal, and the first PS may update the location.
  • the state information corresponding to the second terminal is described, and the updated state information corresponding to the second terminal is re-broadcast, which is not limited in the present invention.
  • the first terminal sends a status subscription message to the first PS.
  • the first terminal When the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message.
  • the first PS acquires a status subscription message sent by the first terminal.
  • the first PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
  • the first PS determines, according to the status subscription message, whether the state information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS reads the status information corresponding to the second terminal pre-stored in the first PS.
  • the second terminal issues the status information corresponding to the second terminal to the first PS, or the first PS receives the other information.
  • the status information corresponding to the second terminal of the PS broadcast is stored. Therefore, the status information corresponding to the second terminal is pre-stored in the first PS, and the first PS directly reads the status information corresponding to the second terminal pre-stored in the first PS.
  • the first PS sends the status information corresponding to the second terminal to the first terminal.
  • the first terminal receives status information corresponding to the second terminal sent by the first PS.
  • the first terminal After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
  • the embodiment of the present invention provides a method for a state subscription, in which the first terminal and the second terminal mutually authorize, and the second terminal releases the state information corresponding to the second terminal to the first PS; the first PS acquires the second message issued by the second terminal.
  • Status information corresponding to the terminal the first PS stores and broadcasts status information corresponding to the second terminal; the first terminal sends a status subscription message to the first PS; the first PS acquires a status subscription message sent by the first terminal; And subscribing to the message, determining whether the state information corresponding to the second terminal is pre-stored in the first PS; if the state information corresponding to the second terminal is pre-stored in the first PS, the first PS reads the second terminal pre-stored in the first PS Corresponding state information; the first PS sends the state information corresponding to the second terminal to the first terminal; the first terminal receives the state information corresponding to the second terminal sent by the first PS.
  • the embodiment of the present invention provides a state subscription method, where the first terminal performs the state subscription process, and the second terminal belongs to the first PS, and the second terminal does not issue the state information corresponding to the second terminal to the first The PS, or the situation in which the status information corresponding to the second terminal stored in the first PS is lost due to a fault or the like is taken as an example.
  • the method includes:
  • the first terminal sends a status subscription message to the first PS.
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted. Status, any terminal can directly obtain the status of other terminals without going through the subscription authorization rule judgment process.
  • the first terminal when the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message, where the first The terminal belongs to the first PS.
  • the first PS acquires a status subscription message sent by the first terminal.
  • the first presence server PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
  • the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS queries the attribution of the second terminal.
  • the second terminal has never issued the status information corresponding to the second terminal to the first PS, or the second terminal that the first PS has not received other PS broadcasts.
  • the first PS acquires state information corresponding to the second terminal.
  • the first terminal and the second terminal are jointly assigned to the first PS, and the first PS acquires the state information corresponding to the second terminal.
  • the first PS can only query when the status information published by the second terminal cannot be queried.
  • User description information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal (for example, User's nickname, birthday, avatar, etc. of the second terminal Data), fixed location information such as the geographic location and job number of the user of the second terminal.
  • the status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (such as the personalized signature set by the user of the second terminal on the second terminal, etc.).
  • the first PS sends the status information corresponding to the second terminal to the first terminal.
  • the first terminal receives status information corresponding to the second terminal sent by the first PS.
  • the first terminal After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
  • the first PS stores and broadcasts status information corresponding to the second terminal.
  • the first PS After the first terminal receives the status information corresponding to the second terminal that is sent by the first PS, the first PS is further configured to store and broadcast the status information corresponding to the second terminal.
  • the purpose of the first PS to broadcast the status information corresponding to the second terminal is to enable other PSs to receive and store the status information corresponding to the second terminal.
  • the status information corresponding to the second terminal may be directly read from the PS and sent to the terminal requesting the status information corresponding to the second terminal.
  • step S608 can be performed after the first PS queries the status information corresponding to the second terminal, and there is no execution relationship with the steps S606 and S607, and the present invention is not limited.
  • the embodiment of the present invention provides a method for a state subscription, where the first terminal and the second terminal mutually authorize, and the first terminal sends a status subscription message to the first PS; the first PS acquires a status subscription message sent by the first terminal; The PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS; if the status information corresponding to the second terminal is not pre-stored in the first PS, the first PS queries the attribution of the second terminal; The second terminal belongs to the first PS, and the first PS acquires the state information corresponding to the second terminal; the first PS sends the state information corresponding to the second terminal to the first terminal; and the first terminal receives the second terminal corresponding to the first PS.
  • the first PS stores and broadcasts status information corresponding to the second terminal.
  • the embodiment of the present invention provides a method for a state subscription, in which the first terminal performs a state subscription process, and the second terminal belongs to the second PS, and the second terminal issues the state information corresponding to the second terminal to the second PS.
  • the method includes:
  • the second terminal issues status information corresponding to the second terminal to the second PS.
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted, and any one terminal can directly acquire the status of other terminals without being subscribed. Authorization rule judgment process.
  • the second terminal issues the status information corresponding to the second terminal to the second PS.
  • the second terminal may periodically or periodically release the status information corresponding to the second terminal by using the SIP.
  • the periodic or non-periodical release of the state information corresponding to the second terminal means that the second terminal can periodically release the state information corresponding to the second terminal according to the preset rule of the user (for example, the second terminal every second time)
  • the second terminal issues the status information corresponding to the second terminal.
  • the status information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal ( For example, the nickname, birthday, avatar, and the like of the user of the second terminal, the geographic location of the user of the second terminal, and the fixed number of the work number.
  • the status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (The personalized signature set by the user of the second terminal on the second terminal, etc.), the invention is not limited.
  • the second PS acquires state information corresponding to the second terminal that is sent by the second terminal.
  • the second PS stores and broadcasts status information corresponding to the second terminal.
  • the second PS After the second terminal belongs to the second PS, after the second terminal issues the status information corresponding to the second terminal to the second PS, the second PS acquires the status information corresponding to the second terminal issued by the second terminal, and stores and broadcasts the status information. Status information corresponding to the second terminal, wherein the second PS broadcasts the status information corresponding to the second terminal, so that the other PS can also receive and store the status information corresponding to the second terminal, and when other terminals request the PS When the status information corresponding to the second terminal is used, the status information corresponding to the second terminal may be directly read from the PS and sent to the terminal requesting the status information corresponding to the second terminal.
  • the second terminal periodically or non-periodically releases the status information corresponding to the second terminal, and the second PS may update the status information and re-broadcast.
  • the updated status information is not limited by the present invention.
  • the first PS acquires state information corresponding to the second terminal of the second PS broadcast.
  • the first PS stores state information corresponding to the second terminal.
  • the second PS broadcasts the state information corresponding to the second terminal, so that the first PS can also acquire and store the state information corresponding to the second terminal that is advertised by the second terminal, so that if another terminal requests the second terminal to correspond to the first PS,
  • the status information corresponding to the second terminal may be directly read from the first PS and sent to the terminal requesting the status information corresponding to the second terminal.
  • the first terminal sends a status subscription message to the first PS.
  • the first terminal When the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message, where the first terminal belongs to In the first PS.
  • the first PS acquires a status subscription message sent by the first terminal.
  • the first presence server PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
  • the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the second terminal issues the status information corresponding to the second terminal to the first PS, or the status of the second terminal that the first PS receives the other PS broadcast.
  • the information is stored in the first PS.
  • the first PS directly stores the status information corresponding to the second terminal.
  • the first PS directly reads the status information corresponding to the second terminal pre-stored in the first PS.
  • the first PS sends the status information corresponding to the second terminal to the first terminal.
  • the first terminal receives status information corresponding to the second terminal sent by the first PS.
  • the first terminal After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
  • An embodiment of the present invention provides a method for a state subscription, where the first terminal and the second terminal mutually authorize, and the second terminal releases the state information corresponding to the second terminal to the second PS; the second PS acquires the second terminal issued by the second terminal.
  • Status information corresponding to the terminal the second PS stores and broadcasts the status information corresponding to the second terminal; the first PS acquires the status information corresponding to the second terminal broadcasted by the second PS; the first PS stores the status information corresponding to the second terminal; a terminal sends a status subscription message to the first PS; the first PS acquires a status subscription message sent by the first terminal; the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS; Pre-stored state information corresponding to the second terminal in the PS, the first PS reads the state information corresponding to the second terminal pre-stored in the first PS; the first PS sends the state information corresponding to the second terminal to the first terminal; The first terminal receives status information corresponding
  • An embodiment of the present invention provides a method for status subscription, where the first terminal performs a state subscription process, and the second terminal belongs to the second PS, and the second terminal does not issue the first For example, the status information corresponding to the second terminal is sent to the second PS, or the status information corresponding to the second terminal stored in the first PS is lost due to a fault or the like. As shown in FIG. 8, the method includes:
  • the first terminal sends a status subscription message to the first PS.
  • the embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted, and any one terminal can directly acquire the status of other terminals without being subscribed. Authorization rule judgment process.
  • the first terminal when the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message, where the first The terminal belongs to the first PS.
  • the first PS acquires a status subscription message sent by the first terminal.
  • the first presence server PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
  • the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
  • the first PS queries the attribution of the second terminal.
  • the second terminal has never issued the status information corresponding to the second terminal to the first PS, or the second terminal that the first PS has not received other PS broadcasts.
  • the method for the first PS to query the attribution of the second terminal is specifically that the first PS queries the attribution of the second terminal by using the policy policy.
  • the first PS sends a status query message to the second PS.
  • the second PS receives a status query message sent by the first PS.
  • the second PS determines, according to the status query message, whether the status information corresponding to the second terminal is pre-stored in the second PS.
  • the second PS After the second PS receives the status query message sent by the first PS, the second PS determines, according to the status query message, whether the status information corresponding to the second terminal is pre-stored in the second PS.
  • the second terminal issues the status information corresponding to the second terminal to the second PS. Therefore, the status information corresponding to the second terminal is pre-stored in the second PS.
  • the second PS may directly read the status information corresponding to the second terminal pre-stored in the second PS.
  • the second PS acquires the status information corresponding to the second terminal.
  • the second PS needs to query the status information corresponding to the second terminal.
  • the first PS can only query when the status information published by the second terminal cannot be queried.
  • User description information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal (for example, Fixed information such as the user's nickname, birthday, and avatar of the second terminal, the geographic location of the user of the second terminal, and the job number.
  • the status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (such as the personalized signature set by the user of the second terminal on the second terminal, etc.).
  • the second PS sends the status information corresponding to the second terminal to the first PS.
  • the second PS After the second PS queries the status information corresponding to the second terminal according to the status query message, the second PS sends the status information corresponding to the second terminal to the first PS.
  • the first PS receives status information corresponding to the second terminal sent by the second PS.
  • the first PS sends the status information corresponding to the second terminal to the first terminal.
  • the first terminal receives status information corresponding to the second terminal sent by the first PS.
  • the first terminal After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
  • the first PS stores state information corresponding to the second terminal.
  • the first PS After receiving the status information corresponding to the second terminal sent by the first PS, the first PS is further configured to store the status information corresponding to the second terminal.
  • step S814 can be performed after the first PS receives the status information corresponding to the second terminal that is sent by the second PS, and there is no execution relationship with the steps S812 and S813, and the present invention is not limited.
  • An embodiment of the present invention provides a method for a state subscription, in which a first terminal sends a status subscription message to a first PS; a first PS acquires a status subscription message sent by the first terminal; and the first PS determines a first PS according to the status subscription message.
  • the first PS queries the attribution of the second terminal; if the second terminal belongs to the second PS, the first The PS sends a status query message to the second PS; the second PS receives the status query message sent by the first PS; the second PS determines, according to the status query message, whether the status information corresponding to the second terminal is pre-stored in the second PS; The second PS stores the status information corresponding to the second terminal, and the second PS reads the status information corresponding to the second terminal pre-stored in the second PS; if the second PS does not pre-store the status information corresponding to the second terminal, The second PS acquires the status information corresponding to the second terminal; the second PS sends the status information corresponding to the second terminal to the first PS; the first PS receives the status information corresponding to the second terminal sent by the second PS; The first terminal corresponds to the first terminal, and the first The PS sends a status query message to the second PS; if the status information corresponding to the second terminal is not pre-stored in the first PS, the first PS queries the
  • the first PS stores the state information corresponding to the second terminal.
  • the embodiment of the present invention provides a first presence server.
  • the first presence server includes a receiving module 10 and a broadcast module 11.
  • the receiving module 10 is configured to receive status information issued by the first terminal that belongs to the first presence server, and transmit status information that is sent by the first terminal to the broadcast module.
  • the broadcast module 11 is configured to receive status information that is sent by the first terminal from the receiving module 10, and broadcast status information that is sent by the first terminal to other presentation servers, where the other presentation servers include the second Presenting a server, so that the second presence server notifies the second terminal of the corresponding location of the first terminal when the second terminal that belongs to the second presence server subscribes to the state information corresponding to the first terminal Status information, the status information corresponding to the first terminal includes status information that is sent by the first terminal.
  • the receiving module 10 is further configured to receive the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
  • the first presence server further includes:
  • the processing module 12 is configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presence server.
  • the broadcast module 11 is further configured to: after the processing module 12 acquires the status information corresponding to the third terminal, broadcast the status information corresponding to the third terminal to the other presence server.
  • the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal.
  • the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
  • An embodiment of the present invention provides a first presence server, where the first presence server includes a receiving module and a broadcast module, and the receiving module is configured to receive status information that is sent by the first terminal that belongs to the first presence server. And transmitting the status information that is sent by the first terminal to the broadcast module, where the broadcast module is configured to receive status information that is sent by the first terminal from the receiving module, and release the first terminal.
  • the status information is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the state corresponding to the first terminal at the second terminal belonging to the second presence server.
  • the information about the first terminal is notified to the second terminal, and the status information corresponding to the first terminal includes status information that is sent by the first terminal.
  • the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • the embodiment of the present invention provides a second presentation server.
  • the second presentation server includes a receiving module 20 and a sending module 21.
  • the receiving module 20 is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a contact in the contact list.
  • the status information is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
  • the sending module 21 is configured to: when the receiving module 20 receives the status information corresponding to the first terminal, and determines that the first terminal is a terminal of a contact in the contact list, The second terminal notifies the status information corresponding to the first terminal.
  • the sending module 21 is further configured to: after the receiving module 20 receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is the contact The terminal of the contact in the list does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first When the server is presented, the query message is sent to the first presence server, and the query message is used to query status information corresponding to the third terminal.
  • the receiving module 20 is further configured to receive status information corresponding to the third terminal returned by the first presence server.
  • the sending module 21 is further configured to: after the receiving module 20 receives the status information corresponding to the third terminal returned by the first presence server, notify the status information corresponding to the third terminal to the The second terminal.
  • the embodiment of the present invention provides a second presentation server, where the second presentation server includes a receiving module and a sending module, and the receiving module is configured to receive a subscription message sent by the second terminal that belongs to the second presence server.
  • the subscription message includes an identifier of a contact list for subscribing to status information of a contact in the contact list, and is configured to receive a first terminal that is broadcast by the first presence server and belongs to the first presence server.
  • Corresponding state information; the sending module configured to: when the receiving module receives the state information corresponding to the first terminal and determines that the first terminal is a terminal of a contact in the contact list, The second terminal notifies the status information corresponding to the first terminal.
  • the embodiment of the present invention provides a first terminal. As shown in FIG. 12, the first terminal includes a sending module 30.
  • the sending module 30 is configured to release the status information issued by the first terminal to the first presence server.
  • An embodiment of the present invention provides a first terminal, where the first terminal includes a sending module, configured to advertise the state information advertised by the first terminal to the first presence server, so that the second terminal obtains the first terminal to be released. Status information.
  • the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated internally by the system at the time of state subscription is reduced, thereby reducing the simultaneous initiation status of a large number of terminals. The pressure on the system when you subscribe.
  • the embodiment of the present invention provides a second terminal.
  • the second terminal includes a sending module 40 and a receiving module 41.
  • the sending module 40 is configured to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes an identifier of the contact list for subscription. Status information for contacts in the contact list.
  • the receiving module 41 is configured to receive status information corresponding to the first terminal sent by the second presence server.
  • the embodiment of the present invention provides a second terminal, where the second terminal includes a sending module and a receiving module, and the sending module is configured to send a status subscription message to the second presence server, so that the second presence server subscribes the message according to the status.
  • the subscription message includes an identifier of the contact list, and is used to subscribe to the status information of the contact in the contact list;
  • the receiving module is configured to receive the first terminal sent by the second presence server Corresponding status information.
  • the embodiment of the present invention provides a first presence server.
  • the first presence server includes a receiver 50 and a transmitter 51.
  • the receiver 50 is configured to receive status information that is sent by the first terminal that belongs to the first presence server, and transmit status information that is sent by the first terminal to the broadcast module.
  • the transmitter 51 is configured to receive status information that is sent by the first terminal from the receiver 50, and broadcast status information that is sent by the first terminal to other presence servers, where the other presence servers include a second Presenting a server to facilitate the second presentation And notifying, by the second terminal, the status information corresponding to the first terminal, where the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal, where the first terminal corresponds
  • the status information includes status information issued by the first terminal.
  • the receiver 50 is further configured to receive the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
  • the first presence server further includes:
  • the processor 52 is configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presence server.
  • the transmitter 51 is further configured to: after the processor 52 acquires the status information corresponding to the third terminal, broadcast the status information corresponding to the third terminal to the other presence server.
  • the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal.
  • the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
  • An embodiment of the present invention provides a first presence server, where the first presence server includes a receiver and a transmitter, and the receiver is configured to receive status information that is sent by the first terminal that is belong to the first presence server. Transmitting the status information issued by the first terminal to the broadcast module, and the transmitter is configured to receive status information that is sent by the first terminal from the receiver 50, and release the first terminal Status information is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the first terminal corresponding to the second terminal at the second terminal belonging to the second presence server.
  • the status information is sent to the second terminal to the status information corresponding to the first terminal, and the status information corresponding to the first terminal includes status information that is sent by the first terminal.
  • the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Terminal status information. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • the embodiment of the present invention provides a second presentation server.
  • the second presentation server includes a receiver 60 and a transmitter 61.
  • the receiver 60 is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a contact in the contact list.
  • the status information is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
  • the transmitter 61 is configured to: when the receiver 60 receives the status information corresponding to the first terminal and determines that the first terminal is a terminal of a contact in the contact list, The second terminal notifies the status information corresponding to the first terminal.
  • the transmitter 61 is further configured to: after the receiver 60 receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is the contact The terminal of the contact in the list does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, and sends an inquiry message to the first presence server.
  • the query message is used to query status information corresponding to the third terminal.
  • the receiver 60 is further configured to receive status information corresponding to the third terminal returned by the first presence server.
  • the transmitter 61 is further configured to: after the receiver 60 receives the status information corresponding to the third terminal returned by the first presence server, notify the status information corresponding to the third terminal to the The second terminal.
  • An embodiment of the present invention provides a second presence server, where the second presence server includes a receiver and a sender, and the receiver is configured to receive a subscription message sent by a second terminal that belongs to the second presence server.
  • the subscription message includes an identifier of a contact list for subscribing to status information of a contact in the contact list, and is configured to receive a first terminal that is broadcast by the first presence server and belongs to the first presence server.
  • Corresponding status information the transmitter, configured to receive the first terminal at the receiver Corresponding state information and determining that the first terminal is a terminal of a contact in the contact list, notifying the second terminal of status information corresponding to the first terminal.
  • the embodiment of the present invention provides a first terminal. As shown in FIG. 17, the first terminal includes a transmitter 70.
  • the sender 70 is configured to issue status information that is sent by the first terminal to the first presence server.
  • An embodiment of the present invention provides a first terminal, where the first terminal includes a transmitter, and is configured to advertise the state information advertised by the first terminal to the first presence server, so that the second terminal obtains the first terminal to be released. Status information.
  • the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • the embodiment of the present invention provides a second terminal.
  • the second terminal includes a transmitter 80 and a receiver 81.
  • the sender 80 is configured to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes an identifier of the contact list for subscription. Status information for contacts in the contact list.
  • the receiver 81 is configured to receive status information corresponding to the first terminal sent by the second presence server.
  • An embodiment of the present invention provides a second terminal, where the second terminal includes a transmitter and a receiver.
  • the sender is configured to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes the identifier of the contact list.
  • the status information of the contact in the contact list; the receiver is configured to receive status information corresponding to the first terminal sent by the second presence server.
  • An embodiment of the present invention provides a system for status subscription, including a first presence server and a second presence server.
  • the first presence server is configured to receive state information issued by a first terminal that belongs to the first presence server; broadcast the state information to other presence servers, where the other presence servers include the second presence server In order to notify the second terminal of the status information corresponding to the first terminal, when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal,
  • the status information corresponding to the first terminal includes status information that is sent by the first terminal.
  • the second presence server is configured to receive a subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact in the contact list.
  • Status information ; receiving status information corresponding to the first terminal that is broadcast by the first presence server and belonging to the first presence server; receiving status information corresponding to the first terminal, and determining that the first terminal is When the terminal of the contact in the contact list is notified to the second terminal, the status information corresponding to the first terminal is notified.
  • the first presence server is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server; And the state information corresponding to the third terminal is returned to the second presence server; and the state information corresponding to the third terminal is broadcasted to the other presence server.
  • the second presence server is further configured to determine that the third terminal is the contact list When the terminal of the contact in the contact does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, sends a query message to the first presence server, The query message is used to query the state information corresponding to the third terminal; the state information corresponding to the third terminal returned by the first presence server is received; and the state information corresponding to the third terminal is notified to the second terminal.
  • An embodiment of the present invention provides a system for status subscription, where the state subscription system includes a first presence server and a second presence server.
  • the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in various embodiments of the present invention can be integrated into one process
  • each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Abstract

A method, apparatus and system for state subscription relate to the field of communications, can reduce the number of subscriptions and the number of state notifications generated inside the system during state subscriptions and also reduce the pressure on the system resulting from the fact that state subscriptions are concurrently initiated by a large number of terminals. The method comprises: a first presence server receiving state information published by a first terminal belonging to the first presence server; the first presence server broadcasting the state information published by the first terminal to other presence servers including a second presence server, so that the second presence server, when subscribing, on a second terminal belong to the second presence server, for state information corresponding to the first terminal, notifies the second terminal of the state information corresponding to the first terminal, the state information corresponding to the first terminal comprising the state information published by the first terminal.

Description

一种状态订阅的方法、装置及系统Method, device and system for state subscription 技术领域Technical field
本发明涉及通信领域,尤其涉及一种状态订阅的方法、装置及系统。The present invention relates to the field of communications, and in particular, to a method, apparatus, and system for status subscription.
背景技术Background technique
基于呈现Presence业务的状态订阅方法被广泛应用于ICT(Information Communication Technology,信息通信技术)领域,其中,Presence是以某种通信方式,按照一定的接入准则,实时获取presence信息(如用户状态、通信能力、个人设置等信息),并展现给其它用户的一种方法。目前,随着互联网的普及,越来越多的人喜欢通过即时通信的方式来与别人保持联系。Presence技术在这种即时通信中扮演着非常重要的角色。依靠Presence技术,即时通信业务能以“用户多种状态设置”等功能为基础(如用户设置为“打电话中”、“会议进行中”等多种状态),提供“订阅他人状态信息”等多种丰富的增值服务,为个人/企业用户的办公、会议、通信等多领域提供高效便捷的解决方案。The state subscription method based on the presence of the Presence service is widely used in the field of ICT (Information Communication Technology), in which Presence acquires presence information (such as user status, in real time according to certain access criteria according to certain access criteria. Communication, personal settings, etc.), and a way to show other users. At present, with the popularity of the Internet, more and more people like to keep in touch with others through instant messaging. Presence technology plays a very important role in this instant messaging. Relying on Presence technology, instant messaging services can be based on functions such as “user multiple status settings” (such as users set to “call”, “meeting in progress” and other status), provide “subscribe to other people's status information”, etc. A variety of rich value-added services, providing efficient and convenient solutions for personal, business users in the office, conference, communications and other fields.
然而,在现有技术中,当终端需要订阅其他终端的状态时,会根据终端内的联系人信息发出一个列表订阅消息,这样就同时订阅了多个终端的状态消息。由于该终端和其他终端之间依次进行状态订阅,因此,在系统内部将产生大量的订阅会话,其中,这些订阅会话可以包括同一站点内的PS(Presence Server,呈现服务器)之间的订阅、不同站点间的PS之间的订阅,以及状态变更通知。示例性的,以3个PS为例,系统内部终端的个数为10000,平均每个终端订阅150个其他终端的状态信息,则系统内部产生的订阅会话总数为:10000×150×(3-1)/3;系统内部产生的状态通知数为:终端总的状态发布次数×150×(3-1)/3。因此,在大量终端同时发起状态订阅时,对整个系统的处理性能以及网络流量要求很高。However, in the prior art, when the terminal needs to subscribe to the status of other terminals, a list subscription message is sent according to the contact information in the terminal, so that the status messages of the multiple terminals are subscribed at the same time. Since the terminal and other terminals sequentially perform state subscription, a large number of subscription sessions will be generated inside the system, wherein the subscription sessions may include subscriptions between PSs (Presence Servers) in the same site, different Subscriptions between PSs between sites, as well as status change notifications. Exemplarily, taking 3 PS as an example, the number of internal terminals in the system is 10000, and the average status of each terminal subscribes to 150 other terminals, and the total number of subscription sessions generated within the system is: 10000×150×(3- 1) / 3; The number of status notifications generated within the system is: the total number of status announcements of the terminal × 150 × (3-1) / 3. Therefore, when a large number of terminals simultaneously initiate a status subscription, the processing performance of the entire system and the network traffic are highly demanded.
发明内容Summary of the invention
本发明的实施例提供一种状态订阅的方法、装置及系统,能够减 少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。Embodiments of the present invention provide a method, apparatus, and system for status subscription, which can be reduced The number of subscriptions and status notifications generated internally by the system when there are fewer status subscriptions reduces the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,本发明实施例提供一种状态订阅的方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for status subscription, where the method includes:
第一呈现服务器接收归属于所述第一呈现服务器的第一终端发布的状态信息;The first presence server receives status information issued by the first terminal that belongs to the first presence server;
所述第一呈现服务器将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The first presence server broadcasts status information issued by the first terminal to other presence servers, and the other presence servers include a second presence server, so that the second presence server is attributable to the second presence server. When the second terminal subscribes to the status information corresponding to the first terminal, the second terminal is notified of the status information corresponding to the first terminal, and the status information corresponding to the first terminal includes the first terminal. status information.
在第一种可能的实现方式中,根据第一方面,所述方法还包括:In a first possible implementation, according to the first aspect, the method further includes:
所述第一呈现服务器接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;The first presence server receives the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
所述第一呈现服务器获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;The first presence server acquires state information corresponding to the third terminal, and returns state information corresponding to the third terminal to the second presence server;
所述第一呈现服务器将所述第三终端对应的状态信息广播给所述其它呈现服务器。The first presence server broadcasts status information corresponding to the third terminal to the other presentation server.
在第二种可能的实现方式中,结合第一方面或第一种可能的实现方式,In a second possible implementation manner, combining the first aspect or the first possible implementation manner,
如果所述第一呈现服务器存储了所述第三终端发布的状态信息,获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息;If the first presentation server stores the status information that is sent by the third terminal, the obtained status information corresponding to the third terminal includes status information that is sent by the third terminal;
如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。 If the first presence server does not store the status information that is sent by the third terminal, the obtained status information corresponding to the third terminal includes the description information of the user of the third terminal.
第二方面,本发明实施例提供一种状态订阅的方法,所述方法包括:In a second aspect, an embodiment of the present invention provides a method for status subscription, where the method includes:
第二呈现服务器接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息;The second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the state information of the contact in the contact list;
所述第二呈现服务器接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;The second presence server receives state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server;
所述第二呈现服务器在接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。When the second presence server receives the status information corresponding to the first terminal and determines that the first terminal is a terminal of a contact in the contact list, notifying the second terminal of the first Status information corresponding to the terminal.
在第一种可能的实现方式中,根据第二方面,在所述第二呈现服务器接收归属于所述第二呈现服务器的所述第二终端发送的订阅消息之后,所述方法还包括:In a first possible implementation, after the second presence server receives the subscription message sent by the second terminal of the second presence server, the method further includes:
所述第二呈现服务器在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;The second presence server determines that the third terminal is a terminal of the contact in the contact list, does not store state information corresponding to the third terminal, and determines that the third terminal belongs to the first When the server is presented, the query message is sent to the first presence server, where the query message is used to query status information corresponding to the third terminal;
所述第二呈现服务器接收所述第一呈现服务器返回的所述第三终端对应的状态信息;Receiving, by the second presence server, status information corresponding to the third terminal returned by the first presence server;
所述第二呈现服务器将所述第三终端对应的状态信息通知给所述第二终端。The second presence server notifies the second terminal of the status information corresponding to the third terminal.
第三方面,本发明实施例提供一种第一呈现服务器,包括:接收模块和广播模块;In a third aspect, an embodiment of the present invention provides a first presentation server, including: a receiving module and a broadcast module;
所述接收模块,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息,并将所述第一终端发布的状态信息传输至所述广播模块;The receiving module is configured to receive status information advertised by the first terminal that belongs to the first presence server, and transmit status information advertised by the first terminal to the broadcast module;
所述广播模块,用于从所述接收模块接收所述第一终端发布的状态信息,并将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务 器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The broadcast module is configured to receive status information that is sent by the first terminal from the receiving module, and broadcast the status information that is sent by the first terminal to another presentation server, where the other presentation server includes a second presence server. To facilitate the second rendering service Notifying the second terminal of status information corresponding to the first terminal, where the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal, where the first terminal corresponds The status information includes status information issued by the first terminal.
在第一种可能的实现方式中,根据第三方面,In a first possible implementation, according to the third aspect,
所述接收模块,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;The receiving module is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
所述第一呈现服务器还包括:The first presence server further includes:
处理模块,用于获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;a processing module, configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presentation server;
所述广播模块,还用于在所述处理模块获取到所述第三终端对应的状态信息后,将所述第三终端对应的状态信息广播给所述其它呈现服务器。The broadcast module is further configured to: after the processing module acquires the state information corresponding to the third terminal, broadcast the state information corresponding to the third terminal to the other presence server.
在第二种可能的实现方式中,结合第三方面或第一种可能的实现方式,In a second possible implementation, in combination with the third aspect or the first possible implementation,
如果所述第一呈现服务器存储了所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息;If the first presentation server stores the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal;
如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。If the first presence server does not store the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
第四方面,本发明实施例提供一种第二呈现服务器,包括:接收模块和发送模块;In a fourth aspect, an embodiment of the present invention provides a second presentation server, including: a receiving module and a sending module;
所述接收模块,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息,并用于接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;The receiving module is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a status of a contact in the contact list. Information, and is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server;
所述发送模块,用于在所述接收模块接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终 端时,向所述第二终端通知所述第一终端对应的状态信息。The sending module is configured to receive status information corresponding to the first terminal at the receiving module, and determine that the first terminal is a terminal of a contact in the contact list And notifying the second terminal of the status information corresponding to the first terminal.
在第一种可能的实现方式中,根据第四方面,In a first possible implementation manner, according to the fourth aspect,
所述发送模块,还用于在所述接收模块接收到归属于所述第二呈现服务器的所述第二终端发送的订阅消息之后,在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;The sending module is further configured to: after the receiving module receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is a contact in the contact list The terminal does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, and sends a query message to the first presence server, where the query message is used. Querying status information corresponding to the third terminal;
所述接收模块,还用于接收所述第一呈现服务器返回的所述第三终端对应的状态信息;The receiving module is further configured to receive status information corresponding to the third terminal returned by the first presence server;
所述发送模块,还用于在所述接收模块接收到所述第一呈现服务器返回的所述第三终端对应的状态信息后,将所述第三终端对应的状态信息通知给所述第二终端。The sending module is further configured to notify the second status information corresponding to the third terminal after the receiving module receives the status information corresponding to the third terminal returned by the first terminal.
第五方面,本发明实施例一种状态订阅的系统,包括:A fifth aspect of the present invention provides a state subscription system, including:
第一呈现服务器以及第二呈现服务器;a first presence server and a second presence server;
所述第一呈现服务器,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息;将所述状态信息广播给其它呈现服务器,所述其它呈现服务器包括所述第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息;The first presence server is configured to receive state information issued by a first terminal that belongs to the first presence server; broadcast the state information to other presence servers, where the other presence servers include the second presence server In order to notify the second terminal of the status information corresponding to the first terminal, when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal, The status information corresponding to the first terminal includes status information that is sent by the first terminal;
所述第二呈现服务器,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息;接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;在接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。The second presence server is configured to receive a subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact in the contact list. Status information; receiving status information corresponding to the first terminal that is broadcast by the first presence server and belonging to the first presence server; receiving status information corresponding to the first terminal, and determining that the first terminal is When the terminal of the contact in the contact list is notified to the second terminal, the status information corresponding to the first terminal is notified.
在第一种可能的实现方式中,根据第五方面, In a first possible implementation manner, according to the fifth aspect,
所述第一呈现服务器,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;将所述第三终端对应的状态信息广播给所述其它呈现服务器;The first presence server is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server; The status information corresponding to the third terminal is returned to the second presentation server, and the status information corresponding to the third terminal is broadcasted to the other presentation server;
所述第二呈现服务器,还用于在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;接收所述第一呈现服务器返回的所述第三终端对应的状态信息;将所述第三终端对应的状态信息通知给所述第二终端。The second presence server is further configured to: determine, by the terminal that the third terminal is a contact in the contact list, does not store state information corresponding to the third terminal, and determine that the third terminal belongs to And sending, by the first presence server, the query message to the first presence server, where the query message is used to query status information corresponding to the third terminal; and receive the third terminal returned by the first presence server Corresponding state information; notifying the second terminal of the state information corresponding to the third terminal.
本发明实施例所提供的一种状态订阅的方法、装置及系统,通过第一呈现服务器接收归属于所述第一呈现服务器的第一终端发布的状态信息;所述第一呈现服务器将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端对应的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了第一终端对应的状态信息时向其他终端通知第一终端对应的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。A method, device, and system for status subscription provided by an embodiment of the present invention, receiving, by a first presence server, status information issued by a first terminal that belongs to the first presence server; the first presence server The status information issued by the first terminal is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the second terminal at the second terminal belonging to the second presence server. The status information corresponding to the first terminal is notified to the second terminal by the status information corresponding to the terminal, and the status information corresponding to the first terminal includes the status information that is sent by the first terminal. The first presentation server can broadcast the status information corresponding to the first terminal to the other presentation server, so that the other presentation server notifies the other terminal of the first terminal when the other terminal subscribes to the status information corresponding to the first terminal. Status information. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明实施例1所提供的一种状态订阅的方法的流程示意图;1 is a schematic flowchart of a method for status subscription according to Embodiment 1 of the present invention;
图2为本发明实施例2所提供的一种状态订阅的方法的流程示意图;2 is a schematic flowchart of a method for status subscription according to Embodiment 2 of the present invention;
图3为本发明实施例3所提供的一种状态订阅的方法的流程示意图;3 is a schematic flowchart of a method for status subscription according to Embodiment 3 of the present invention;
图4为本发明实施例4所提供的一种状态订阅的方法的流程示意图;4 is a schematic flowchart of a method for status subscription according to Embodiment 4 of the present invention;
图5为本发明实施例5所提供的一种状态订阅的方法的流程示意图;FIG. 5 is a schematic flowchart diagram of a method for status subscription according to Embodiment 5 of the present invention;
图6为本发明实施例6所提供的一种状态订阅的方法的流程示意图;FIG. 6 is a schematic flowchart diagram of a method for status subscription according to Embodiment 6 of the present invention;
图7为本发明实施例7所提供的一种状态订阅的方法的流程示意图;FIG. 7 is a schematic flowchart diagram of a method for status subscription according to Embodiment 7 of the present invention;
图8为本发明实施例8所提供的一种状态订阅的方法的流程示意图;FIG. 8 is a schematic flowchart diagram of a method for status subscription according to Embodiment 8 of the present invention;
图9为本发明实施例9所提供的一种第一呈现服务器的结构示意图一;9 is a schematic structural diagram 1 of a first presentation server according to Embodiment 9 of the present invention;
图10为本发明实施例9所提供的一种第一呈现服务器的结构示意图二;FIG. 10 is a second schematic structural diagram of a first presentation server according to Embodiment 9 of the present invention; FIG.
图11为本发明实施例10所提供的一种第二呈现服务器的结构示意图;FIG. 11 is a schematic structural diagram of a second presentation server according to Embodiment 10 of the present invention;
图12为本发明实施例11所提供的一种第一终端的结构示意图;FIG. 12 is a schematic structural diagram of a first terminal according to Embodiment 11 of the present invention; FIG.
图13为本发明实施例12所提供的一种第二终端的结构示意图;FIG. 13 is a schematic structural diagram of a second terminal according to Embodiment 12 of the present invention;
图14为本发明实施例13所提供的另一种第一呈现服务器的结构示意图一;14 is a schematic structural diagram 1 of another first presence server according to Embodiment 13 of the present invention;
图15为本发明实施例13所提供的另一种第一呈现服务器的结构示意图二; 15 is a second schematic structural diagram of a first presentation server according to Embodiment 13 of the present invention;
图16为本发明实施例14所提供的另一种第二呈现服务器的结构示意图;FIG. 16 is a schematic structural diagram of another second presentation server according to Embodiment 14 of the present invention;
图17为本发明实施例15所提供的另一种第一终端的结构示意图;FIG. 17 is a schematic structural diagram of another first terminal according to Embodiment 15 of the present invention;
图18为本发明实施例16所提供的另一种第二终端的结构示意图。FIG. 18 is a schematic structural diagram of another second terminal according to Embodiment 16 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。Additionally, the terms "system" and "network" are used interchangeably herein. The term "and/or" in this context is merely an association describing the associated object, indicating that there may be three relationships, for example, A and / or B, which may indicate that A exists separately, and both A and B exist, respectively. B these three situations. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
本发明实施例所描述的第一终端、第二终端和第三终端可以是用户设备,也可以是其他可以用于发送状态订阅信息请求其他终端的状态信息的终端,本发明不做限制。本发明涉及到的第一终端、第二终端和第三终端可以为同一实体终端,该终端既可以用作第一终端,实现第一终端的功能;也可以用作第二终端,实现第二终端的功能;还可以用作第三终端,实现第三终端的功能,本发明同样不做限制。本发明实施例是以第一终端、第二终端和第三终端是用户设备为例,来进行本发明具体实施例描述的。The first terminal, the second terminal, and the third terminal, which are described in the embodiments of the present invention, may be user equipments, and may be other terminals that can be used to send status information to request other terminal status information, which is not limited by the present invention. The first terminal, the second terminal, and the third terminal of the present invention may be the same entity terminal, and the terminal may be used as the first terminal to implement the function of the first terminal, or may be used as the second terminal to implement the second terminal. The function of the terminal can also be used as the third terminal to implement the function of the third terminal, and the invention is also not limited. The embodiment of the present invention describes the specific embodiment of the present invention by taking the first terminal, the second terminal, and the third terminal as user equipments as an example.
实施例1Example 1
本发明实施例提供一种状态订阅的方法,如图1所示,所述方法包括:An embodiment of the present invention provides a method for status subscription. As shown in FIG. 1, the method includes:
S101、第一呈现服务器接收归属于所述第一呈现服务器的第一终 端发布的状态信息。S101. The first presence server receives the first end attributed to the first presence server. Status information published by the terminal.
在现有技术中,当终端需要订阅其他终端的状态时,会根据终端内的联系人信息发出一个列表订阅消息,这样就同时订阅了多个终端的状态消息。由于该终端和其他终端之间依次进行状态订阅,因此,在系统内部将产生大量的订阅会话,其中,这些订阅会话可以包括同一站点内的PS之间的订阅、不同站点间的PS之间的订阅,以及状态变更通知。因此,在大量终端同时发起状态订阅时,对整个系统的处理性能以及网络流量要求很高。In the prior art, when the terminal needs to subscribe to the status of other terminals, a list subscription message is sent according to the contact information in the terminal, so that the status messages of the multiple terminals are subscribed at the same time. Since the terminal and other terminals sequentially perform state subscription, a large number of subscription sessions will be generated inside the system, wherein the subscription sessions may include subscriptions between PSs in the same site, and between PSs between different sites. Subscriptions, as well as status change notifications. Therefore, when a large number of terminals simultaneously initiate a status subscription, the processing performance of the entire system and the network traffic are highly demanded.
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例可以应用在所有终端之间相互授权的场景中(如企业网络场景),其中,相互授权表示所有终端是相互信任的关系状态,任意一个终端都能够在不经其它终端授权的情况下直接获取其他终端的状态,而无需经过订阅授权规则判断过程。The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the embodiment of the present invention can be applied to a scenario in which all terminals are mutually authorized (such as an enterprise network scenario), wherein mutual authorization means that all terminals are mutually trusted relationship states, and any one terminal can be In the case of other terminal authorization, the status of other terminals is directly obtained without going through the subscription authorization rule judging process.
首先,第一呈现服务器接收归属于第一呈现服务器的第一终端发布的状态信息。First, the first presence server receives status information issued by the first terminal belonging to the first presence server.
具体的,第一终端归属于第一呈现服务器,第一呈现服务器则能够接收归属于第一呈现服务器的第一终端发布的状态信息。第一终端发布状态信息的方法具体包括第一终端通过SIP(Session Initiation Protocol,会话发起协议)向第一呈现服务器发布第一终端发布的状态信息。Specifically, the first terminal belongs to the first presence server, and the first presence server is capable of receiving the status information issued by the first terminal that belongs to the first presence server. The method for the first terminal to release the status information includes the first terminal publishing the status information of the first terminal to the first presence server through a SIP (Session Initiation Protocol).
具体的,第一终端发布的状态信息可以包括第一终端对应的在线状态(例如第一终端是否在线、第一终端在在线的情况下显示的忙碌、空闲等状态)、第一终端对应的设置信息(如第一终端的用户在第一终端上设置的个性签名等),本发明不做限制。Specifically, the status information that is sent by the first terminal may include an online status corresponding to the first terminal (for example, whether the first terminal is online, a busy, idle state, etc. displayed when the first terminal is online), and a setting corresponding to the first terminal. The information (such as the personalized signature set by the user of the first terminal on the first terminal, etc.) is not limited by the present invention.
S102、所述第一呈现服务器将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终 端发布的状态信息。S102. The first presence server broadcasts status information issued by the first terminal to other presence servers, where the other presence servers include a second presence server, so that the second presence server is attributable to the second When the second terminal of the presence server subscribes to the state information corresponding to the first terminal, the second terminal is notified of the state information corresponding to the first terminal, and the state information corresponding to the first terminal includes the first terminal. Status information published by the terminal.
在第一呈现服务器接收归属于第一呈现服务器的第一终端发布的状态信息后,第一呈现服务器将第一终端发布的状态信息广播给其它呈现服务器,其它呈现服务器包括第二呈现服务器,以便于第二呈现服务器在归属于第二呈现服务器的第二终端订阅了第一终端对应的状态信息时向第二终端通知第一终端对应的状态信息。其中,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。After the first presence server receives the status information issued by the first terminal that belongs to the first presence server, the first presence server broadcasts the status information issued by the first terminal to other presentation servers, and the other presentation servers include the second presence server, so that When the second terminal that belongs to the second presence server subscribes to the state information corresponding to the first terminal, the second presence server notifies the second terminal of the state information corresponding to the first terminal. The status information corresponding to the first terminal includes status information that is sent by the first terminal.
所述第一终端对应的状态信息,可以包括第一终端发布的状态信息、第一终端对应的描述信息等,所述第一终端的用户的描述信息可以包括第一终端的用户的基本资料(例如第一终端的用户的昵称、生日、头像等资料)、第一终端的用户的地理位置、工号等固定信息。The status information corresponding to the first terminal may include status information advertised by the first terminal, description information corresponding to the first terminal, and the like, and the description information of the user of the first terminal may include basic information of the user of the first terminal ( For example, the nickname, birthday, avatar, and the like of the user of the first terminal, the geographic location of the user of the first terminal, and the fixed number of the work number.
需要说明的是,第一呈现服务器将第一终端发布的状态信息广播给其它呈现服务器,既可以是第一呈现服务器将第一终端第一次发布的状态信息广播给其它呈现服务器,也可以是第一终端发布了更新后的状态信息后,第一呈现服务器将更新后的状态信息广播给其它呈现服务器,本发明不做限制。It should be noted that the first presentation server broadcasts the status information of the first terminal to other presentation servers, and the first presentation server may broadcast the status information of the first terminal to the other presentation server for the first time, or may be After the first terminal releases the updated status information, the first presence server broadcasts the updated status information to other presentation servers, which is not limited by the present invention.
具体的,第二呈现服务器如何在归属于第二呈现服务器的第二终端订阅了第一终端对应的状态信息时向第二终端通知第一终端对应的状态信息的方法将在下述实施例中进行详细描述,此处不再赘述。Specifically, how the second presentation server notifies the second terminal of the status information corresponding to the first terminal when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal is performed in the following embodiments. Detailed description will not be repeated here.
S103、所述第一呈现服务器接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息。S103. The first presence server receives the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
若第二呈现服务器内没有存储归属于第一呈现服务器的第三终端对应的状态信息,则第二呈现服务器发送查询消息至第一呈现服务器,第一呈现服务器接收第二呈现服务器发送的查询消息,查询消息用于查询归属于第一呈现服务器的第三终端对应的状态信息。If the second presence server does not store the state information corresponding to the third terminal that belongs to the first presence server, the second presence server sends the query message to the first presence server, and the first presence server receives the query message sent by the second presence server. The query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
具体的,第三终端对应的状态信息可以包括第三终端发布的状态信息、第三终端对应的描述信息等,所述第三终端的用户的描述信息可以包括第三终端的用户的基本资料(例如第三终端的用户的昵称、生日、头像等资料)、第三终端的用户的地理位置、工号等固定信息。其中,第三终端发布的状态信息可以包括第三终端对应的在线状态 (例如第三终端是否在线、第三终端在在线的情况下显示的忙碌、空闲等状态)、第三终端对应的设置信息(如第三终端的用户在第三终端上设置的个性签名等),本发明不做限制。Specifically, the status information corresponding to the third terminal may include the status information of the third terminal, the description information corresponding to the third terminal, and the like, and the description information of the user of the third terminal may include the basic information of the user of the third terminal ( For example, the nickname, birthday, avatar, and the like of the user of the third terminal, the geographic location of the user of the third terminal, and the fixed number of the work number. The status information advertised by the third terminal may include an online status corresponding to the third terminal. (for example, whether the third terminal is online, the busy or idle state displayed by the third terminal in the case of online), the setting information corresponding to the third terminal (such as the personalized signature set by the user of the third terminal on the third terminal, etc.) The invention is not limited.
S104、所述第一呈现服务器获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器。S104. The first presence server acquires state information corresponding to the third terminal, and returns status information corresponding to the third terminal to the second presence server.
在第一呈现服务器接收到第二呈现服务器发送的查询消息后,第一呈现服务器获取第三终端对应的状态信息,并将第三终端对应的状态信息返回给第二呈现服务器。After the first presentation server receives the query message sent by the second presence server, the first presence server acquires the state information corresponding to the third terminal, and returns the state information corresponding to the third terminal to the second presence server.
S105、所述第一呈现服务器将所述第三终端对应的状态信息广播给所述其它呈现服务器。S105. The first presence server broadcasts status information corresponding to the third terminal to the other presence server.
在第一呈现服务器将第三终端对应的状态信息返回给第二呈现服务器后,第一呈现服务器还能够将第三终端对应的状态信息广播给其它呈现服务器,以使得当归属于其它呈现服务器的终端向其它呈现服务器请求第三终端对应的状态信息时,其它呈现服务器可以不用再向第一呈现服务器请求第三终端对应的状态信息,直接可以从其它呈现服务器内读取第三终端对应的状态信息,并发送给请求第三终端对应的状态信息的终端。After the first presence server returns the status information corresponding to the third terminal to the second presence server, the first presence server can also broadcast the status information corresponding to the third terminal to other presentation servers, so that when the terminal belongs to other presentation servers When requesting the status information corresponding to the third terminal from the other presentation server, the other presentation server may not request the status information corresponding to the third terminal from the first presentation server, and may directly read the status information corresponding to the third terminal from the other presentation server. And sent to the terminal requesting the status information corresponding to the third terminal.
需要补充的是,如果所述第一呈现服务器存储了所述第三终端发布的状态信息,获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息;It is to be noted that, if the first presentation server stores the status information that is sent by the third terminal, the obtained status information corresponding to the third terminal includes status information that is sent by the third terminal.
如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。If the first presence server does not store the status information that is sent by the third terminal, the obtained status information corresponding to the third terminal includes the description information of the user of the third terminal.
本发明实施例提供一种状态订阅的方法,通过第一呈现服务器接收归属于所述第一呈现服务器的第一终端发布的状态信息;所述第一呈现服务器将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端对应的状态信息广播 给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了第一终端对应的状态信息时向其他终端通知第一终端对应的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。The embodiment of the present invention provides a state subscription method, where the first presence server receives the state information advertised by the first terminal that belongs to the first presence server, and the first presence server releases the state of the first terminal. The information is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the state information corresponding to the first terminal at the second terminal belonging to the second presence server. And notifying the second terminal of the status information corresponding to the first terminal, where the status information corresponding to the first terminal includes status information that is sent by the first terminal. With this scheme, since the first presence server can broadcast the status information corresponding to the first terminal The other presentation server is configured to notify other terminals of the status information corresponding to the first terminal when the other terminal subscribes to the status information corresponding to the first terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例2Example 2
本发明实施例提供一种状态订阅的方法,如图2所示,所述方法包括:An embodiment of the present invention provides a method for status subscription. As shown in FIG. 2, the method includes:
S201、第二呈现服务器接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息。S201. The second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the status information of the contact in the contact list. .
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例可以应用在所有终端之间相互授权的场景中(如企业网络场景),其中,相互授权表示所有终端是相互信任的关系状态,任意一个终端都能够在不经其它终端授权的情况下直接获取其他终端的状态,而无需经过订阅授权规则判断过程。The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the embodiment of the present invention can be applied to a scenario in which all terminals are mutually authorized (such as an enterprise network scenario), wherein mutual authorization means that all terminals are mutually trusted relationship states, and any one terminal can be In the case of other terminal authorization, the status of other terminals is directly obtained without going through the subscription authorization rule judging process.
首先,第二呈现服务器接收归属于第二呈现服务器的第二终端发送的订阅消息。其中,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息。First, the second presence server receives the subscription message sent by the second terminal belonging to the second presence server. The subscription message includes an identifier of the contact list for subscribing to status information of the contact in the contact list.
S202、所述第二呈现服务器接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息。S202. The second presence server receives status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
在第二呈现服务器接收归属于第二呈现服务器的第二终端发送的订阅消息后,第二呈现服务器接收第一呈现服务器广播的归属于第一呈现服务器的第一终端对应的状态信息。After the second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, the second presence server receives the state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
需要说明的是,第二呈现服务器接收第一呈现服务器广播的归属于第一呈现服务器的第一终端对应的状态信息,既可以是第一呈现服务器将第一终端第一次发布的状态信息广播给第二呈现服务器的,也可以是第一终端发布了更新后的状态信息后,第一呈现服务器将更新 后的状态信息广播给第二呈现服务器的,本发明不做限制。It should be noted that the second presence server receives the status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presentation server, and may be the first presentation server to broadcast the status information of the first terminal for the first time. For the second presentation server, the first presentation server may update after the first terminal issues the updated status information. The subsequent status information is broadcast to the second presence server, and the present invention is not limited.
具体的,第一终端对应的状态信息可以包括第一终端发布的状态信息、第一终端对应的描述信息等,所述第一终端的用户的描述信息可以包括第一终端的用户的基本资料(例如第一终端的用户的昵称、生日、头像等资料)、第一终端的用户的地理位置、工号等固定信息。其中,第一终端发布的状态信息可以包括第一终端对应的在线状态(例如第一终端是否在线、第一终端在在线的情况下显示的忙碌、空闲等状态)、第一终端对应的设置信息(如第一终端的用户在第一终端上设置的个性签名等),本发明不做限制。Specifically, the status information corresponding to the first terminal may include status information advertised by the first terminal, description information corresponding to the first terminal, and the like, and the description information of the user of the first terminal may include basic information of the user of the first terminal ( For example, the nickname, birthday, avatar, and the like of the user of the first terminal, the geographic location of the user of the first terminal, and the fixed number of the work number. The status information that is sent by the first terminal may include an online status corresponding to the first terminal (for example, whether the first terminal is online, a busy or idle state displayed when the first terminal is online), and setting information corresponding to the first terminal. (For example, the personalized signature set by the user of the first terminal on the first terminal, etc.), the invention is not limited.
需要说明的是,步骤S201和步骤S202之间不存在执行先后的关系,本发明实施例既可以先执行步骤S201,也可以先执行步骤S202,本发明不做限制。It should be noted that there is no execution order relationship between the step S201 and the step S202. In the embodiment of the present invention, the step S201 may be performed first, or the step S202 may be performed first, and the invention is not limited.
S203、所述第二呈现服务器在接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。S203. The second presence server notifies the second terminal of the status information when receiving the status information corresponding to the first terminal and determining that the first terminal is a terminal of a contact in the contact list. Status information corresponding to the first terminal.
S204、所述第二呈现服务器在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息。S204. The second presence server determines that the third terminal is a terminal of the contact in the contact list, does not store state information corresponding to the third terminal, and determines that the third terminal belongs to the terminal. The first presentation server sends a query message to the first presence server, where the query message is used to query status information corresponding to the third terminal.
需要说明的是,第二呈现服务器确定自身没有存储第三终端对应的状态信息共包括两种情况:一种是第二呈现服务器出现故障或者重启导致原来存储着的第三终端对应的状态信息丢失;一种是第三终端从未向归属的第一呈现服务器发布过状态信息,因此第一呈现服务器也从未向其他呈现服务器广播过第三终端对应的状态信息。在这两种情况下,第二呈现服务器向第一呈现服务器发送查询消息,查询消息用于查询第三终端对应的状态信息。It should be noted that the second presence server determines that the state information corresponding to the third terminal is not stored in the following two situations: one is that the second presence server fails or restarts, and the state information corresponding to the originally stored third terminal is lost. One is that the third terminal has never issued status information to the first presence server that belongs to the home, so the first presence server has never broadcasted the status information corresponding to the third terminal to other presentation servers. In both cases, the second presence server sends a query message to the first presence server, and the query message is used to query the state information corresponding to the third terminal.
S205、所述第二呈现服务器接收所述第一呈现服务器返回的所述第三终端对应的状态信息。S205. The second presence server receives status information corresponding to the third terminal returned by the first presence server.
在第二呈现服务器向第一呈现服务器发送查询消息后,第二呈现服务器接收第一呈现服务器返回的第三终端对应的状态信息。 After the second presentation server sends the query message to the first presence server, the second presence server receives the state information corresponding to the third terminal returned by the first presence server.
具体的,第三终端对应的状态信息可以包括第三终端发布的状态信息、第三终端对应的描述信息等,所述第三终端的用户的描述信息可以包括第三终端的用户的基本资料(例如第三终端的用户的昵称、生日、头像等资料)、第三终端的用户的地理位置、工号等固定信息。其中,第三终端发布的状态信息可以包括第三终端对应的在线状态(例如第三终端是否在线、第三终端在在线的情况下显示的忙碌、空闲等状态)、第三终端对应的设置信息(如第三终端的用户在第三终端上设置的个性签名等),本发明不做限制。Specifically, the status information corresponding to the third terminal may include the status information of the third terminal, the description information corresponding to the third terminal, and the like, and the description information of the user of the third terminal may include the basic information of the user of the third terminal ( For example, the nickname, birthday, avatar, and the like of the user of the third terminal, the geographic location of the user of the third terminal, and the fixed number of the work number. The status information that is sent by the third terminal may include an online status corresponding to the third terminal (for example, whether the third terminal is online, a busy or idle state displayed when the third terminal is online), and setting information corresponding to the third terminal. (For example, the personalized signature set by the user of the third terminal on the third terminal, etc.), the invention is not limited.
需要补充的是,如果所述第一呈现服务器存储了所述第三终端发布的状态信息,所述第二呈现服务器接收所述第一呈现服务器返回的所述第三终端对应的状态信息包括所述第三终端发布的状态信息。It is to be noted that if the first presence server stores the status information of the third terminal, the second presence server receives the status information corresponding to the third terminal returned by the first presence server, including State information issued by the third terminal.
如果所述第一呈现服务器没有存储所述第三终端发布的状态信息所述第二呈现服务器接收所述第一呈现服务器返回的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。If the first presence server does not store the status information issued by the third terminal, the second presentation server receives the status information corresponding to the third terminal returned by the first presence server, including the user of the third terminal. Descriptive information.
S206、所述第二呈现服务器将所述第三终端对应的状态信息通知给所述第二终端。S206. The second presence server notifies the second terminal of status information corresponding to the third terminal.
在第二呈现服务器接收第一呈现服务器返回的第三终端对应的状态信息后,第二呈现服务器将第三终端的状态信息通知给第二终端,从而完成了第二终端对第三终端状态的订阅。After the second presentation server receives the status information corresponding to the third terminal returned by the first presentation server, the second presentation server notifies the second terminal of the status information of the third terminal, thereby completing the status of the second terminal to the third terminal. subscription.
本发明实施例提供一种状态订阅的方法,通过第二呈现服务器接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息;所述第二呈现服务器接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;所述第二呈现服务器在接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。通过该方案,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a method for a status subscription, where a second presence server receives a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used for a subscription. State information of a contact in the contact list; the second presence server receives state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server; the second presence server After receiving the status information corresponding to the first terminal and determining that the first terminal is a terminal of a contact in the contact list, notifying the second terminal of status information corresponding to the first terminal. Through this scheme, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例3 Example 3
本发明实施例提供一种状态订阅的方法,如图3所示,所述方法包括:An embodiment of the present invention provides a method for status subscription. As shown in FIG. 3, the method includes:
S301、第一终端发布所述第一终端发布的状态信息至第一呈现服务器。S301. The first terminal issues the status information that is sent by the first terminal to the first presence server.
具体的,第一终端发布第一终端发布的状态信息的方法具体包括第一终端通过SIP发布第一终端的状态信息。Specifically, the method for the first terminal to release the status information that is sent by the first terminal includes: the first terminal publishing the status information of the first terminal by using the SIP.
本发明实施例提供一种状态订阅的方法,通过第一终端发布第一终端发布的状态信息至第一呈现服务器,以使得第二终端获取第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端对应的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了第一终端对应的状态信息时向其他终端通知第一终端对应的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。The embodiment of the present invention provides a method for a state subscription, in which the first terminal issues the state information advertised by the first terminal to the first presence server, so that the second terminal acquires the state information advertised by the first terminal. The first presentation server can broadcast the status information corresponding to the first terminal to the other presentation server, so that the other presentation server notifies the other terminal of the first terminal when the other terminal subscribes to the status information corresponding to the first terminal. Status information. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例4Example 4
本发明实施例提供一种状态订阅的方法,如图4所示,所述方法包括:An embodiment of the present invention provides a method for status subscription. As shown in FIG. 4, the method includes:
S401、第二终端发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息。S401. The second terminal sends a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact list. Status information for contacts in .
其中,第二终端归属于第二呈现服务器。The second terminal belongs to the second presence server.
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例可以应用在所有终端之间相互授权的场景中(如企业网络场景),其中,相互授权表示所有终端是相互信任的关系状态,任意一个终端都能够在不经其它终端授权的情况下直接获取其他终端的状态,而无需经过订阅授权规则判断过程。 The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the embodiment of the present invention can be applied to a scenario in which all terminals are mutually authorized (such as an enterprise network scenario), wherein mutual authorization means that all terminals are mutually trusted relationship states, and any one terminal can be In the case of other terminal authorization, the status of other terminals is directly obtained without going through the subscription authorization rule judging process.
在第二终端请求订阅第一终端的状态时,首先,第二终端需要发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息。When the second terminal requests to subscribe to the state of the first terminal, first, the second terminal needs to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and subscribes. The message includes an identification of the contact list for subscribing to status information of the contacts in the contact list.
具体的,第一终端对应的状态信息可以包括第一终端发布的状态信息、第一终端对应的描述信息等,所述第一终端的用户的描述信息可以包括第一终端的用户的基本资料(例如第一终端的用户的昵称、生日、头像等资料)、第一终端的用户的地理位置、工号等固定信息。其中,第一终端发布的状态信息可以包括第一终端对应的在线状态(例如第一终端是否在线、第一终端在在线的情况下显示的忙碌、空闲等状态)、第一终端对应的设置信息(如第一终端的用户在第一终端上设置的个性签名等),本发明不做限制。Specifically, the status information corresponding to the first terminal may include status information advertised by the first terminal, description information corresponding to the first terminal, and the like, and the description information of the user of the first terminal may include basic information of the user of the first terminal ( For example, the nickname, birthday, avatar, and the like of the user of the first terminal, the geographic location of the user of the first terminal, and the fixed number of the work number. The status information that is sent by the first terminal may include an online status corresponding to the first terminal (for example, whether the first terminal is online, a busy or idle state displayed when the first terminal is online), and setting information corresponding to the first terminal. (For example, the personalized signature set by the user of the first terminal on the first terminal, etc.), the invention is not limited.
S402、第二终端接收第二呈现服务器发送的第一终端对应的状态信息。S402. The second terminal receives state information corresponding to the first terminal sent by the second presence server.
在第二终端发送状态订阅消息至第二呈现服务器后,第二终端接收第二呈现服务器发送的第一终端对应的状态信息。After the second terminal sends the status subscription message to the second presence server, the second terminal receives the status information corresponding to the first terminal sent by the second presence server.
具体的,第二呈现服务器根据状态订阅消息,如何查询第一终端对应的状态信息的过程已在上述实施例中进行了详细描述,此处不再赘述。Specifically, the process of querying the status information of the first terminal by the second presence server according to the status subscription message has been described in detail in the foregoing embodiment, and details are not described herein again.
本发明实施例提供一种状态订阅的方法,通过第二终端发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息;第二终端接收第二呈现服务器发送的第一终端对应的状态信息。通过该方案,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a method for a status subscription, in which a second terminal sends a status subscription message to a second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes contacting. The identifier of the person list is used to subscribe to the status information of the contact in the contact list; the second terminal receives the status information corresponding to the first terminal sent by the second presence server. Through this scheme, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例5Example 5
本发明实施例提供一种状态订阅的方法,具体以第一终端进行状态订阅的全过程,且第二终端归属于第一PS、第二终端发布过第二 终端对应的状态信息至第一PS为例进行说明,如图5所示,所述方法包括:An embodiment of the present invention provides a method for a state subscription, where the first terminal performs a state subscription process, and the second terminal belongs to the first PS and the second terminal issues a second. The status information corresponding to the terminal is described as an example of the first PS. As shown in FIG. 5, the method includes:
S501、第二终端发布第二终端对应的状态信息至第一PS。S501. The second terminal issues state information corresponding to the second terminal to the first PS.
在现有技术中,当终端需要订阅其他终端的状态时,会根据终端内的联系人信息发出一个列表订阅消息,这样就同时订阅了多个终端的状态消息。由于该终端和其他终端之间依次进行状态订阅,因此,在系统内部将产生大量的订阅会话,其中,这些订阅会话可以包括同一站点内的PS之间的订阅、不同站点间的PS之间的订阅,以及状态变更通知。因此,在大量终端同时发起状态订阅时,对整个系统的处理性能以及网络流量要求很高。In the prior art, when the terminal needs to subscribe to the status of other terminals, a list subscription message is sent according to the contact information in the terminal, so that the status messages of the multiple terminals are subscribed at the same time. Since the terminal and other terminals sequentially perform state subscription, a large number of subscription sessions will be generated inside the system, wherein the subscription sessions may include subscriptions between PSs in the same site, and between PSs between different sites. Subscriptions, as well as status change notifications. Therefore, when a large number of terminals simultaneously initiate a status subscription, the processing performance of the entire system and the network traffic are highly demanded.
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例的实现建立在所有终端相互授权的条件下,其中,相互授权表示所有终端是相互信任的状态,任意一个终端都能够直接获取其他终端的状态,而无需经过订阅授权规则判断过程。The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted, and any one terminal can directly acquire the status of other terminals without being subscribed. Authorization rule judgment process.
首先,第二终端发布第二终端对应的状态信息至第一PS。First, the second terminal issues the status information corresponding to the second terminal to the first PS.
具体的,第二终端可以通过SIP周期性或者非周期性的发布第二终端对应的状态信息。Specifically, the second terminal may periodically or periodically release the status information corresponding to the second terminal by using the SIP.
需要说明的是,周期性或者非周期性的发布第二终端对应的状态信息是指第二终端可以根据用户的预设规则,定时发布第二终端对应的状态信息(例如第二终端每隔两小时发布一次第二终端对应的状态信息),或者当第二终端对应的状态信息发生更新时,第二终端重新发布第二终端对应的状态信息。It should be noted that the periodic or non-periodical release of the state information corresponding to the second terminal means that the second terminal can periodically release the state information corresponding to the second terminal according to the preset rule of the user (for example, the second terminal every second time) The second terminal re-publishes the status information corresponding to the second terminal when the status information corresponding to the second terminal is updated.
具体的,第二终端对应的状态信息可以包括第二终端发布的状态信息、第二终端对应的描述信息等,所述第二终端的用户的描述信息可以包括第二终端的用户的基本资料(例如第二终端的用户的昵称、生日、头像等资料)、第二终端的用户的地理位置、工号等固定信息。其中,第二终端发布的状态信息可以包括第二终端对应的在线状态(例如第二终端是否在线、第二终端在在线的情况下显示的忙碌、空闲等状态)、第二终端对应的设置信息(如第二终端的用户在第二终 端上设置的个性签名等),本发明不做限制。Specifically, the status information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal ( For example, the nickname, birthday, avatar, and the like of the user of the second terminal, the geographic location of the user of the second terminal, and the fixed number of the work number. The status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (eg the user of the second terminal is in the second end The personalized signature set on the side, etc.), the invention is not limited.
S502、第一PS获取第二终端对应的状态信息。S502. The first PS acquires state information corresponding to the second terminal.
S503、第一PS存储并广播第二终端对应的状态信息。S503. The first PS stores and broadcasts status information corresponding to the second terminal.
由于第二终端归属于第一PS,因此,在第二终端发布第二终端对应的状态信息至第一PS后,第一PS获取第二终端对应的状态信息,存储并广播第二终端对应的状态信息。其中,第一PS广播第二终端对应的状态信息的目的是为了让其他PS也能够接收并存储第二终端对应的状态信息,当有其他终端向这些PS请求第二终端对应的状态信息时,可以直接从该PS内读取第二终端对应的状态信息,并发送给请求第二终端对应的状态信息的终端。After the second terminal belongs to the first PS, after the second terminal issues the state information corresponding to the second terminal to the first PS, the first PS acquires the state information corresponding to the second terminal, and stores and broadcasts the corresponding information of the second terminal. status information. The purpose of the first PS to broadcast the status information corresponding to the second terminal is to enable other PSs to receive and store the status information corresponding to the second terminal. When other terminals request the status information corresponding to the second terminal from the PS, The status information corresponding to the second terminal may be directly read from the PS and sent to the terminal requesting the status information corresponding to the second terminal.
需要说明的是,可选的,当第一PS存储并广播第二终端对应的状态信息后,第二终端周期性或者非周期性的发布第二终端对应的状态信息,第一PS可以更新所述第二终端对应的状态信息,并重新广播更新后的所述第二终端对应的状态信息,本发明不做限制。It should be noted that, after the first PS stores and broadcasts the state information corresponding to the second terminal, the second terminal periodically or non-periodically releases the state information corresponding to the second terminal, and the first PS may update the location. The state information corresponding to the second terminal is described, and the updated state information corresponding to the second terminal is re-broadcast, which is not limited in the present invention.
S504、第一终端发送状态订阅消息至第一PS。S504. The first terminal sends a status subscription message to the first PS.
在第一终端请求订阅第二终端的状态时,第一终端发送状态订阅消息至第一PS,以使得第一PS根据状态订阅消息,查询第二终端对应的状态信息。When the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message.
S505、第一PS获取第一终端发送的状态订阅消息。S505. The first PS acquires a status subscription message sent by the first terminal.
第一PS获取第一终端发送的状态订阅消息,第一终端归属于第一PS。The first PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
S506、第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。S506. The first PS determines, according to the status subscription message, whether the state information corresponding to the second terminal is pre-stored in the first PS.
在第一PS获取第一终端发送的状态订阅消息后,第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
S507、若第一PS内预存了第二终端对应的状态信息,第一PS则读取预存于第一PS内的第二终端对应的状态信息。S507. If the status information corresponding to the second terminal is pre-stored in the first PS, the first PS reads the status information corresponding to the second terminal pre-stored in the first PS.
若第一PS内预存了第二终端对应的状态信息,则说明第二终端向第一PS发布过第二终端对应的状态信息,或者第一PS接收过其他 PS广播的第二终端对应的状态信息,因此,第一PS内预存着第二终端对应的状态信息,第一PS直接读取预存于第一PS内的第二终端对应的状态信息即可。If the status information corresponding to the second terminal is pre-stored in the first PS, the second terminal issues the status information corresponding to the second terminal to the first PS, or the first PS receives the other information. The status information corresponding to the second terminal of the PS broadcast is stored. Therefore, the status information corresponding to the second terminal is pre-stored in the first PS, and the first PS directly reads the status information corresponding to the second terminal pre-stored in the first PS.
S508、第一PS发送第二终端对应的状态信息至第一终端。S508. The first PS sends the status information corresponding to the second terminal to the first terminal.
S509、第一终端接收第一PS发送的第二终端对应的状态信息。S509. The first terminal receives status information corresponding to the second terminal sent by the first PS.
在第一PS发送第二终端对应的状态信息至第一终端后,第一终端接收第一PS发送的第二终端对应的状态信息。After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
本发明实施例提供一种状态订阅的方法,第一终端和第二终端相互授权,通过第二终端发布第二终端对应的状态信息至第一PS;第一PS获取第二终端发布的第二终端对应的状态信息;第一PS存储并广播第二终端对应的状态信息;第一终端发送状态订阅消息至第一PS;第一PS获取第一终端发送的状态订阅消息;第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息;若第一PS内预存了第二终端对应的状态信息,第一PS则读取预存于第一PS内的第二终端对应的状态信息;第一PS发送第二终端对应的状态信息至第一终端;第一终端接收第一PS发送的第二终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。The embodiment of the present invention provides a method for a state subscription, in which the first terminal and the second terminal mutually authorize, and the second terminal releases the state information corresponding to the second terminal to the first PS; the first PS acquires the second message issued by the second terminal. Status information corresponding to the terminal; the first PS stores and broadcasts status information corresponding to the second terminal; the first terminal sends a status subscription message to the first PS; the first PS acquires a status subscription message sent by the first terminal; And subscribing to the message, determining whether the state information corresponding to the second terminal is pre-stored in the first PS; if the state information corresponding to the second terminal is pre-stored in the first PS, the first PS reads the second terminal pre-stored in the first PS Corresponding state information; the first PS sends the state information corresponding to the second terminal to the first terminal; the first terminal receives the state information corresponding to the second terminal sent by the first PS. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例6Example 6
本发明实施例提供一种状态订阅的方法,具体以第一终端进行状态订阅的全过程,且第二终端归属于第一PS、第二终端未发布过第二终端对应的状态信息至第一PS,或者第一PS内存储的第二终端对应的状态信息由于故障等原因丢失的情况为例进行说明,如图6所示,所述方法包括:The embodiment of the present invention provides a state subscription method, where the first terminal performs the state subscription process, and the second terminal belongs to the first PS, and the second terminal does not issue the state information corresponding to the second terminal to the first The PS, or the situation in which the status information corresponding to the second terminal stored in the first PS is lost due to a fault or the like is taken as an example. As shown in FIG. 6, the method includes:
S601、第一终端发送状态订阅消息至第一PS。S601. The first terminal sends a status subscription message to the first PS.
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例的实现建立在所有终端相互授权的条件下,其中,相互授权表示所有终端是相互信任的 状态,任意一个终端都能够直接获取其他终端的状态,而无需经过订阅授权规则判断过程。The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted. Status, any terminal can directly obtain the status of other terminals without going through the subscription authorization rule judgment process.
首先,在第一终端请求订阅第二终端的状态时,第一终端发送状态订阅消息至第一PS,以使得第一PS根据状态订阅消息,查询第二终端对应的状态信息,其中,第一终端归属于第一PS。First, when the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message, where the first The terminal belongs to the first PS.
S602、第一PS获取第一终端发送的状态订阅消息。S602. The first PS acquires a status subscription message sent by the first terminal.
第一呈现服务器PS获取第一终端发送的状态订阅消息,第一终端归属于第一PS。The first presence server PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
S603、第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。S603. The first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
在第一PS获取第一终端发送的状态订阅消息后,第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
S604、若第一PS内未预存第二终端对应的状态信息,第一PS则查询第二终端的归属。S604. If the status information corresponding to the second terminal is not pre-stored in the first PS, the first PS queries the attribution of the second terminal.
若第一PS内未预存第二终端对应的状态信息,则说明第二终端从未向第一PS发布过第二终端对应的状态信息,或者第一PS未接收过其他PS广播的第二终端对应的状态信息,或者第一PS以前存储过第二终端对应的状态信息,但是第一PS发生过故障导致存储的第二终端对应的状态信息丢失。因此,第一PS首先需要查询第二终端的归属。If the status information corresponding to the second terminal is not pre-stored in the first PS, the second terminal has never issued the status information corresponding to the second terminal to the first PS, or the second terminal that the first PS has not received other PS broadcasts. Corresponding state information, or the first PS previously stored state information corresponding to the second terminal, but the first PS has failed to cause the stored state information corresponding to the second terminal to be lost. Therefore, the first PS first needs to query the attribution of the second terminal.
S605、若第二终端归属于第一PS,第一PS则获取第二终端对应的状态信息。S605. If the second terminal belongs to the first PS, the first PS acquires state information corresponding to the second terminal.
若第二终端归属于第一PS,则说明第一终端和第二终端共同归属于第一PS,第一PS获取第二终端对应的状态信息。If the second terminal belongs to the first PS, the first terminal and the second terminal are jointly assigned to the first PS, and the first PS acquires the state information corresponding to the second terminal.
需要补充的是,若第一PS发生了故障,或是PS服务刚启动,第二终端尚未发布过状态信息的情况下,无法查询到第二终端发布的状态信息时,第一PS只能查询到第二终端对应的用户描述信息。其中,第二终端对应的状态信息可以包括第二终端发布的状态信息、第二终端对应的描述信息等,所述第二终端的用户的描述信息可以包括第二终端的用户的基本资料(例如第二终端的用户的昵称、生日、头像等 资料)、第二终端的用户的地理位置、工号等固定信息。其中,第二终端发布的状态信息可以包括第二终端对应的在线状态(例如第二终端是否在线、第二终端在在线的情况下显示的忙碌、空闲等状态)、第二终端对应的设置信息(如第二终端的用户在第二终端上设置的个性签名等)。It should be added that if the first PS fails, or the PS service has just started, and the second terminal has not released the status information, the first PS can only query when the status information published by the second terminal cannot be queried. User description information corresponding to the second terminal. The status information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal (for example, User's nickname, birthday, avatar, etc. of the second terminal Data), fixed location information such as the geographic location and job number of the user of the second terminal. The status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (such as the personalized signature set by the user of the second terminal on the second terminal, etc.).
S606、第一PS发送第二终端对应的状态信息至第一终端。S606. The first PS sends the status information corresponding to the second terminal to the first terminal.
S607、第一终端接收第一PS发送的第二终端对应的状态信息。S607. The first terminal receives status information corresponding to the second terminal sent by the first PS.
在第一PS发送第二终端对应的状态信息至第一终端后,第一终端接收第一PS发送的第二终端对应的状态信息。After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
S608、第一PS存储并广播第二终端对应的状态信息。S608. The first PS stores and broadcasts status information corresponding to the second terminal.
在第一终端接收第一PS发送的第二终端对应的状态信息后,第一PS还能够存储并广播第二终端对应的状态信息。其中,第一PS广播第二终端对应的状态信息的目的是为了让其他PS也能够接收并存储第二终端对应的状态信息,当有其他终端向这些PS请求第二终端对应的状态信息时,可以直接从该PS内读取第二终端对应的状态信息,并发送给请求第二终端对应的状态信息的终端。After the first terminal receives the status information corresponding to the second terminal that is sent by the first PS, the first PS is further configured to store and broadcast the status information corresponding to the second terminal. The purpose of the first PS to broadcast the status information corresponding to the second terminal is to enable other PSs to receive and store the status information corresponding to the second terminal. When other terminals request the status information corresponding to the second terminal from the PS, The status information corresponding to the second terminal may be directly read from the PS and sent to the terminal requesting the status information corresponding to the second terminal.
需要说明的是,步骤S608在第一PS查询到第二终端对应的状态信息后就可以执行,与步骤S606和S607不存在执行先后的关系,本发明不做限制。It should be noted that the step S608 can be performed after the first PS queries the status information corresponding to the second terminal, and there is no execution relationship with the steps S606 and S607, and the present invention is not limited.
本发明实施例提供一种状态订阅的方法,第一终端和第二终端相互授权,通过第一终端发送状态订阅消息至第一PS;第一PS获取第一终端发送的状态订阅消息;第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息;若第一PS内未预存第二终端对应的状态信息,第一PS则查询第二终端的归属;若第二终端归属于第一PS,则第一PS获取第二终端对应的状态信息;第一PS发送第二终端对应的状态信息至第一终端;第一终端接收第一PS发送的第二终端对应的状态信息;第一PS存储并广播第二终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。 The embodiment of the present invention provides a method for a state subscription, where the first terminal and the second terminal mutually authorize, and the first terminal sends a status subscription message to the first PS; the first PS acquires a status subscription message sent by the first terminal; The PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS; if the status information corresponding to the second terminal is not pre-stored in the first PS, the first PS queries the attribution of the second terminal; The second terminal belongs to the first PS, and the first PS acquires the state information corresponding to the second terminal; the first PS sends the state information corresponding to the second terminal to the first terminal; and the first terminal receives the second terminal corresponding to the first PS. Status information; the first PS stores and broadcasts status information corresponding to the second terminal. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例7Example 7
本发明实施例提供一种状态订阅的方法,具体以第一终端进行状态订阅的全过程,且第二终端归属于第二PS、第二终端发布过第二终端对应的状态信息至第二PS为例进行说明,如图7所示,所述方法包括:The embodiment of the present invention provides a method for a state subscription, in which the first terminal performs a state subscription process, and the second terminal belongs to the second PS, and the second terminal issues the state information corresponding to the second terminal to the second PS. As an example, as shown in FIG. 7, the method includes:
S701、第二终端发布第二终端对应的状态信息至第二PS。S701. The second terminal issues status information corresponding to the second terminal to the second PS.
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例的实现建立在所有终端相互授权的条件下,其中,相互授权表示所有终端是相互信任的状态,任意一个终端都能够直接获取其他终端的状态,而无需经过订阅授权规则判断过程。The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted, and any one terminal can directly acquire the status of other terminals without being subscribed. Authorization rule judgment process.
首先,第二终端发布第二终端对应的状态信息至第二PS。First, the second terminal issues the status information corresponding to the second terminal to the second PS.
具体的,第二终端可以通过SIP周期性或者非周期性的发布第二终端对应的状态信息。Specifically, the second terminal may periodically or periodically release the status information corresponding to the second terminal by using the SIP.
需要说明的是,周期性或者非周期性的发布第二终端对应的状态信息是指第二终端可以根据用户的预设规则,定时发布第二终端对应的状态信息(例如第二终端每隔两小时发布一次第二终端对应的状态信息),或者当第二终端对应的状态信息发生更新时,第二终端发布第二终端对应的状态信息。It should be noted that the periodic or non-periodical release of the state information corresponding to the second terminal means that the second terminal can periodically release the state information corresponding to the second terminal according to the preset rule of the user (for example, the second terminal every second time) When the status information corresponding to the second terminal is released once, or when the status information corresponding to the second terminal is updated, the second terminal issues the status information corresponding to the second terminal.
具体的,第二终端对应的状态信息可以包括第二终端发布的状态信息、第二终端对应的描述信息等,所述第二终端的用户的描述信息可以包括第二终端的用户的基本资料(例如第二终端的用户的昵称、生日、头像等资料)、第二终端的用户的地理位置、工号等固定信息。其中,第二终端发布的状态信息可以包括第二终端对应的在线状态(例如第二终端是否在线、第二终端在在线的情况下显示的忙碌、空闲等状态)、第二终端对应的设置信息(如第二终端的用户在第二终端上设置的个性签名等),本发明不做限制。Specifically, the status information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal ( For example, the nickname, birthday, avatar, and the like of the user of the second terminal, the geographic location of the user of the second terminal, and the fixed number of the work number. The status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (The personalized signature set by the user of the second terminal on the second terminal, etc.), the invention is not limited.
S702、第二PS获取第二终端发布的第二终端对应的状态信息。 S702. The second PS acquires state information corresponding to the second terminal that is sent by the second terminal.
S703、第二PS存储并广播第二终端对应的状态信息。S703. The second PS stores and broadcasts status information corresponding to the second terminal.
由于第二终端归属于第二PS,因此,在第二终端发布第二终端对应的状态信息至第二PS后,第二PS获取第二终端发布的第二终端对应的状态信息,存储并广播第二终端对应的状态信息,其中,第二PS广播第二终端对应的状态信息的目的是为了让其他PS也能够接收并存储第二终端对应的状态信息,当有其他终端向这些PS请求第二终端对应的状态信息时,可以直接从该PS内读取第二终端对应的状态信息,并发送给请求第二终端对应的状态信息的终端。After the second terminal belongs to the second PS, after the second terminal issues the status information corresponding to the second terminal to the second PS, the second PS acquires the status information corresponding to the second terminal issued by the second terminal, and stores and broadcasts the status information. Status information corresponding to the second terminal, wherein the second PS broadcasts the status information corresponding to the second terminal, so that the other PS can also receive and store the status information corresponding to the second terminal, and when other terminals request the PS When the status information corresponding to the second terminal is used, the status information corresponding to the second terminal may be directly read from the PS and sent to the terminal requesting the status information corresponding to the second terminal.
需要说明的是,可选的,当第二PS存储并广播状态信息后,第二终端周期性或者非周期性的发布第二终端对应的状态信息,第二PS可以更新状态信息,并重新广播更新后的状态信息,本发明不做限制。It should be noted that, after the second PS stores and broadcasts the status information, the second terminal periodically or non-periodically releases the status information corresponding to the second terminal, and the second PS may update the status information and re-broadcast. The updated status information is not limited by the present invention.
S704、第一PS获取第二PS广播的第二终端对应的状态信息。S704. The first PS acquires state information corresponding to the second terminal of the second PS broadcast.
S705、第一PS存储第二终端对应的状态信息。S705. The first PS stores state information corresponding to the second terminal.
第二PS广播第二终端对应的状态信息,以使得第一PS也能获取并存储第二终端发布的第二终端对应的状态信息,这样,若有其他终端向第一PS请求第二终端对应的状态信息时,可以直接从第一PS内读取第二终端对应的状态信息,并发送给请求第二终端对应的状态信息的终端。无需经过复杂的订阅授权规则判断过程,从而减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。The second PS broadcasts the state information corresponding to the second terminal, so that the first PS can also acquire and store the state information corresponding to the second terminal that is advertised by the second terminal, so that if another terminal requests the second terminal to correspond to the first PS, When the status information is obtained, the status information corresponding to the second terminal may be directly read from the first PS and sent to the terminal requesting the status information corresponding to the second terminal. There is no need to go through a complicated subscription authorization rule judging process, thereby reducing the number of subscriptions and status notifications generated within the system when the status is subscribed, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
S706、第一终端发送状态订阅消息至第一PS。S706. The first terminal sends a status subscription message to the first PS.
在第一终端请求订阅第二终端的状态时,第一终端发送状态订阅消息至第一PS,以使得第一PS根据状态订阅消息,查询第二终端对应的状态信息,其中,第一终端归属于第一PS。When the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message, where the first terminal belongs to In the first PS.
S707、第一PS获取第一终端发送的状态订阅消息。S707. The first PS acquires a status subscription message sent by the first terminal.
第一呈现服务器PS获取第一终端发送的状态订阅消息,第一终端归属于第一PS。The first presence server PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
S708、第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。 S708. The first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
在第一PS获取第一终端发送的状态订阅消息后,第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
S709、若第一PS内预存了第二终端对应的状态信息,第一PS则读取预存于第一PS内的第二终端对应的状态信息。S709: If the status information corresponding to the second terminal is pre-stored in the first PS, the first PS reads the status information corresponding to the second terminal pre-stored in the first PS.
若第一PS内预存了第二终端对应的状态信息,则说明第二终端向第一PS发布过第二终端对应的状态信息,或者第一PS接收过其他PS广播的第二终端对应的状态信息,因此,第一PS内预存着第二终端对应的状态信息,第一PS直接读取预存于第一PS内的第二终端对应的状态信息即可。If the status information corresponding to the second terminal is pre-stored in the first PS, the second terminal issues the status information corresponding to the second terminal to the first PS, or the status of the second terminal that the first PS receives the other PS broadcast. The information is stored in the first PS. The first PS directly stores the status information corresponding to the second terminal. The first PS directly reads the status information corresponding to the second terminal pre-stored in the first PS.
S710、第一PS发送第二终端对应的状态信息至第一终端。S710. The first PS sends the status information corresponding to the second terminal to the first terminal.
S711、第一终端接收第一PS发送的第二终端对应的状态信息。S711. The first terminal receives status information corresponding to the second terminal sent by the first PS.
在第一PS发送第二终端对应的状态信息至第一终端后,第一终端接收第一PS发送的第二终端对应的状态信息。After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
本发明实施例提供一种状态订阅的方法,第一终端和第二终端相互授权,通过第二终端发布第二终端对应的状态信息至第二PS;第二PS获取第二终端发布的第二终端对应的状态信息;第二PS存储并广播第二终端对应的状态信息;第一PS获取第二PS广播的第二终端对应的状态信息;第一PS存储第二终端对应的状态信息;第一终端发送状态订阅消息至第一PS;第一PS获取第一终端发送的状态订阅消息;第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息;若第一PS内预存了第二终端对应的状态信息,第一PS则读取预存于第一PS内的第二终端对应的状态信息;第一PS发送第二终端对应的状态信息至第一终端;第一终端接收第一PS发送的第二终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a method for a state subscription, where the first terminal and the second terminal mutually authorize, and the second terminal releases the state information corresponding to the second terminal to the second PS; the second PS acquires the second terminal issued by the second terminal. Status information corresponding to the terminal; the second PS stores and broadcasts the status information corresponding to the second terminal; the first PS acquires the status information corresponding to the second terminal broadcasted by the second PS; the first PS stores the status information corresponding to the second terminal; a terminal sends a status subscription message to the first PS; the first PS acquires a status subscription message sent by the first terminal; the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS; Pre-stored state information corresponding to the second terminal in the PS, the first PS reads the state information corresponding to the second terminal pre-stored in the first PS; the first PS sends the state information corresponding to the second terminal to the first terminal; The first terminal receives status information corresponding to the second terminal sent by the first PS. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例8Example 8
本发明实施例提供一种状态订阅的方法,具体以第一终端进行状态订阅的全过程,且第二终端归属于第二PS、第二终端未发布过第 二终端对应的状态信息至第二PS,或者第一PS内存储的第二终端对应的状态信息由于故障等原因丢失的情况为例进行说明,如图8所示,所述方法包括:An embodiment of the present invention provides a method for status subscription, where the first terminal performs a state subscription process, and the second terminal belongs to the second PS, and the second terminal does not issue the first For example, the status information corresponding to the second terminal is sent to the second PS, or the status information corresponding to the second terminal stored in the first PS is lost due to a fault or the like. As shown in FIG. 8, the method includes:
S801、第一终端发送状态订阅消息至第一PS。S801. The first terminal sends a status subscription message to the first PS.
本发明实施例提供一种状态订阅的方法,能够减少状态订阅时系统内部产生的订阅数和状态通知数,减小在大量终端同时发起状态订阅时对系统的压力。需要说明的是,本发明实施例的实现建立在所有终端相互授权的条件下,其中,相互授权表示所有终端是相互信任的状态,任意一个终端都能够直接获取其他终端的状态,而无需经过订阅授权规则判断过程。The embodiment of the invention provides a method for state subscription, which can reduce the number of subscriptions and status notifications generated by the system during state subscription, and reduce the pressure on the system when a large number of terminals simultaneously initiate state subscription. It should be noted that the implementation of the embodiment of the present invention is established under the condition that all terminals mutually authorize, wherein mutual authorization means that all terminals are mutually trusted, and any one terminal can directly acquire the status of other terminals without being subscribed. Authorization rule judgment process.
首先,在第一终端请求订阅第二终端的状态时,第一终端发送状态订阅消息至第一PS,以使得第一PS根据状态订阅消息,查询第二终端对应的状态信息,其中,第一终端归属于第一PS。First, when the first terminal requests to subscribe to the state of the second terminal, the first terminal sends a status subscription message to the first PS, so that the first PS queries the status information corresponding to the second terminal according to the status subscription message, where the first The terminal belongs to the first PS.
S802、第一PS获取第一终端发送的状态订阅消息。S802. The first PS acquires a status subscription message sent by the first terminal.
第一呈现服务器PS获取第一终端发送的状态订阅消息,第一终端归属于第一PS。The first presence server PS acquires a status subscription message sent by the first terminal, and the first terminal belongs to the first PS.
S803、第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。S803. The first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
在第一PS获取第一终端发送的状态订阅消息后,第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息。After the first PS acquires the status subscription message sent by the first terminal, the first PS determines, according to the status subscription message, whether the status information corresponding to the second terminal is pre-stored in the first PS.
S804、若第一PS内未预存第二终端对应的状态信息,第一PS则查询第二终端的归属。S804. If the status information corresponding to the second terminal is not pre-stored in the first PS, the first PS queries the attribution of the second terminal.
若第一PS内未预存第二终端对应的状态信息,则说明第二终端从未向第一PS发布过第二终端对应的状态信息,或者第一PS未接收过其他PS广播的第二终端对应的状态信息,或者第一PS以前存储过第二终端对应的状态信息,但是第一PS发生过故障导致存储的第二终端对应的状态信息丢失。因此,第一PS首先需要查询第二终端的归属。If the status information corresponding to the second terminal is not pre-stored in the first PS, the second terminal has never issued the status information corresponding to the second terminal to the first PS, or the second terminal that the first PS has not received other PS broadcasts. Corresponding state information, or the first PS previously stored state information corresponding to the second terminal, but the first PS has failed to cause the stored state information corresponding to the second terminal to be lost. Therefore, the first PS first needs to query the attribution of the second terminal.
第一PS查询第二终端的归属的方法具体为第一PS通过策略Policy查询第二终端的归属。 The method for the first PS to query the attribution of the second terminal is specifically that the first PS queries the attribution of the second terminal by using the policy policy.
S805、若第二终端归属于第二PS,第一PS则发送状态查询消息至第二PS。S805. If the second terminal belongs to the second PS, the first PS sends a status query message to the second PS.
S806、第二PS接收第一PS发送的状态查询消息。S806. The second PS receives a status query message sent by the first PS.
S807、第二PS根据状态查询消息,判断第二PS内是否预存了第二终端对应的状态信息。S807. The second PS determines, according to the status query message, whether the status information corresponding to the second terminal is pre-stored in the second PS.
在第二PS接收到第一PS发送的状态查询消息后,第二PS根据状态查询消息,判断第二PS内是否预存了第二终端对应的状态信息。After the second PS receives the status query message sent by the first PS, the second PS determines, according to the status query message, whether the status information corresponding to the second terminal is pre-stored in the second PS.
S808、若第二PS内预存了第二终端对应的状态信息,第二PS则读取预存于第二PS内的第二终端对应的状态信息。S808: If the status information corresponding to the second terminal is pre-stored in the second PS, the second PS reads the status information corresponding to the second terminal pre-stored in the second PS.
若第二PS内预存了第二终端对应的状态信息,则说明第二终端向第二PS发布过第二终端对应的状态信息,因此,第二PS内预存着第二终端对应的状态信息,第二PS直接读取预存于第二PS内的第二终端对应的状态信息即可。If the status information corresponding to the second terminal is pre-stored in the second PS, the second terminal issues the status information corresponding to the second terminal to the second PS. Therefore, the status information corresponding to the second terminal is pre-stored in the second PS. The second PS may directly read the status information corresponding to the second terminal pre-stored in the second PS.
S809、若第二PS内未预存第二终端对应的状态信息,第二PS则获取第二终端对应的状态信息。S809. If the status information corresponding to the second terminal is not pre-stored in the second PS, the second PS acquires the status information corresponding to the second terminal.
若第二PS内未预存第二终端对应的状态信息,则说明第二PS内没有存储第二终端对应的状态信息,第二PS无法直接读取到第二终端对应的状态信息。因此,第二PS需要查询第二终端对应的状态信息。If the status information corresponding to the second terminal is not pre-stored in the second PS, the status information corresponding to the second terminal is not stored in the second PS, and the second PS cannot directly read the status information corresponding to the second terminal. Therefore, the second PS needs to query the status information corresponding to the second terminal.
需要补充的是,若第一PS发生了故障,或是PS服务刚启动,第二终端尚未发布过状态信息的情况下,无法查询到第二终端发布的状态信息时,第一PS只能查询到第二终端对应的用户描述信息。其中,第二终端对应的状态信息可以包括第二终端发布的状态信息、第二终端对应的描述信息等,所述第二终端的用户的描述信息可以包括第二终端的用户的基本资料(例如第二终端的用户的昵称、生日、头像等资料)、第二终端的用户的地理位置、工号等固定信息。其中,第二终端发布的状态信息可以包括第二终端对应的在线状态(例如第二终端是否在线、第二终端在在线的情况下显示的忙碌、空闲等状态)、第二终端对应的设置信息(如第二终端的用户在第二终端上设置的个性签名等)。 It should be added that if the first PS fails, or the PS service has just started, and the second terminal has not released the status information, the first PS can only query when the status information published by the second terminal cannot be queried. User description information corresponding to the second terminal. The status information corresponding to the second terminal may include status information advertised by the second terminal, description information corresponding to the second terminal, and the like, and the description information of the user of the second terminal may include basic information of the user of the second terminal (for example, Fixed information such as the user's nickname, birthday, and avatar of the second terminal, the geographic location of the user of the second terminal, and the job number. The status information that is sent by the second terminal may include an online status corresponding to the second terminal (for example, whether the second terminal is online, a busy or idle state displayed when the second terminal is online), and setting information corresponding to the second terminal. (such as the personalized signature set by the user of the second terminal on the second terminal, etc.).
S810、第二PS发送第二终端对应的状态信息至第一PS。S810. The second PS sends the status information corresponding to the second terminal to the first PS.
在第二PS根据状态查询消息,查询到第二终端对应的状态信息后,第二PS发送第二终端对应的状态信息至第一PS。After the second PS queries the status information corresponding to the second terminal according to the status query message, the second PS sends the status information corresponding to the second terminal to the first PS.
S811、第一PS接收第二PS发送的第二终端对应的状态信息。S811. The first PS receives status information corresponding to the second terminal sent by the second PS.
S812、第一PS发送第二终端对应的状态信息至第一终端。S812. The first PS sends the status information corresponding to the second terminal to the first terminal.
S813、第一终端接收第一PS发送的第二终端对应的状态信息。S813. The first terminal receives status information corresponding to the second terminal sent by the first PS.
在第一PS发送第二终端对应的状态信息至第一终端后,第一终端接收第一PS发送的第二终端对应的状态信息。After the first PS sends the status information corresponding to the second terminal to the first terminal, the first terminal receives the status information corresponding to the second terminal sent by the first PS.
S814、第一PS存储第二终端对应的状态信息。S814. The first PS stores state information corresponding to the second terminal.
在第一终端接收第一PS发送的第二终端对应的状态信息后,第一PS还能够存储第二终端对应的状态信息。After receiving the status information corresponding to the second terminal sent by the first PS, the first PS is further configured to store the status information corresponding to the second terminal.
需要说明的是,步骤S814在第一PS接收到第二PS发送的第二终端对应的状态信息后就可以执行,与步骤S812和S813不存在执行先后的关系,本发明不做限制。It should be noted that the step S814 can be performed after the first PS receives the status information corresponding to the second terminal that is sent by the second PS, and there is no execution relationship with the steps S812 and S813, and the present invention is not limited.
本发明实施例提供一种状态订阅的方法,通过第一终端发送状态订阅消息至第一PS;第一PS获取第一终端发送的状态订阅消息;第一PS根据状态订阅消息,判断第一PS内是否预存了第二终端对应的状态信息;若第一PS内未预存第二终端对应的状态信息,第一PS则查询第二终端的归属;若第二终端归属于第二PS,第一PS则发送状态查询消息至第二PS;第二PS接收第一PS发送的状态查询消息;第二PS根据状态查询消息,判断第二PS内是否预存了第二终端对应的状态信息;若第二PS内预存了第二终端对应的状态信息,第二PS则读取预存于第二PS内的第二终端对应的状态信息;若第二PS内未预存第二终端对应的状态信息,第二PS则获取第二终端对应的状态信息;第二PS发送第二终端对应的状态信息至第一PS;第一PS接收第二PS发送的第二终端对应的状态信息;第一PS发送第二终端对应的状态信息至第一终端;第一终端接收第一PS发送的第二终端对应的状态信息;第一PS存储第二终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。 An embodiment of the present invention provides a method for a state subscription, in which a first terminal sends a status subscription message to a first PS; a first PS acquires a status subscription message sent by the first terminal; and the first PS determines a first PS according to the status subscription message. Whether the status information corresponding to the second terminal is pre-stored in the first PS; if the status information corresponding to the second terminal is not pre-stored in the first PS, the first PS queries the attribution of the second terminal; if the second terminal belongs to the second PS, the first The PS sends a status query message to the second PS; the second PS receives the status query message sent by the first PS; the second PS determines, according to the status query message, whether the status information corresponding to the second terminal is pre-stored in the second PS; The second PS stores the status information corresponding to the second terminal, and the second PS reads the status information corresponding to the second terminal pre-stored in the second PS; if the second PS does not pre-store the status information corresponding to the second terminal, The second PS acquires the status information corresponding to the second terminal; the second PS sends the status information corresponding to the second terminal to the first PS; the first PS receives the status information corresponding to the second terminal sent by the second PS; The first terminal corresponds to the first terminal, and the first terminal receives the state information corresponding to the second terminal sent by the first PS. The first PS stores the state information corresponding to the second terminal. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例9Example 9
本发明实施例提供一种第一呈现服务器,如图9所示,所述第一呈现服务器包括接收模块10和广播模块11。The embodiment of the present invention provides a first presence server. As shown in FIG. 9, the first presence server includes a receiving module 10 and a broadcast module 11.
所述接收模块10,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息,并将所述第一终端发布的状态信息传输至所述广播模块。The receiving module 10 is configured to receive status information issued by the first terminal that belongs to the first presence server, and transmit status information that is sent by the first terminal to the broadcast module.
所述广播模块11,用于从所述接收模块10接收所述第一终端发布的状态信息,并将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The broadcast module 11 is configured to receive status information that is sent by the first terminal from the receiving module 10, and broadcast status information that is sent by the first terminal to other presentation servers, where the other presentation servers include the second Presenting a server, so that the second presence server notifies the second terminal of the corresponding location of the first terminal when the second terminal that belongs to the second presence server subscribes to the state information corresponding to the first terminal Status information, the status information corresponding to the first terminal includes status information that is sent by the first terminal.
进一步地,所述接收模块10,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息。Further, the receiving module 10 is further configured to receive the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
如图10所示,所述第一呈现服务器还包括:As shown in FIG. 10, the first presence server further includes:
处理模块12,用于获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器。The processing module 12 is configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presence server.
所述广播模块11,还用于在所述处理模块12获取到所述第三终端对应的状态信息后,将所述第三终端对应的状态信息广播给所述其它呈现服务器。The broadcast module 11 is further configured to: after the processing module 12 acquires the status information corresponding to the third terminal, broadcast the status information corresponding to the third terminal to the other presence server.
进一步地,如果所述第一呈现服务器存储了所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息。Further, if the first presence server stores the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal.
如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。 If the first presence server does not store the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
本发明实施例提供一种第一呈现服务器,所述第一呈现服务器包括接收模块和广播模块;所述接收模块,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息,并将所述第一终端发布的状态信息传输至所述广播模块;所述广播模块,用于从所述接收模块接收所述第一终端发布的状态信息,并将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了所述第一终端的状态信息时向其他终端通知所述第一终端的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a first presence server, where the first presence server includes a receiving module and a broadcast module, and the receiving module is configured to receive status information that is sent by the first terminal that belongs to the first presence server. And transmitting the status information that is sent by the first terminal to the broadcast module, where the broadcast module is configured to receive status information that is sent by the first terminal from the receiving module, and release the first terminal. The status information is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the state corresponding to the first terminal at the second terminal belonging to the second presence server. The information about the first terminal is notified to the second terminal, and the status information corresponding to the first terminal includes status information that is sent by the first terminal. With the solution, the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例10Example 10
本发明实施例提供一种第二呈现服务器,如图11所示,所述第二呈现服务器包括接收模块20和发送模块21。The embodiment of the present invention provides a second presentation server. As shown in FIG. 11, the second presentation server includes a receiving module 20 and a sending module 21.
所述接收模块20,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息,并用于接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息。The receiving module 20 is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a contact in the contact list. The status information is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
所述发送模块21,用于在所述接收模块20接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。The sending module 21 is configured to: when the receiving module 20 receives the status information corresponding to the first terminal, and determines that the first terminal is a terminal of a contact in the contact list, The second terminal notifies the status information corresponding to the first terminal.
进一步地,所述发送模块21,还用于在所述接收模块20接收到归属于所述第二呈现服务器的所述第二终端发送的订阅消息之后,在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一 呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息。Further, the sending module 21 is further configured to: after the receiving module 20 receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is the contact The terminal of the contact in the list does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first When the server is presented, the query message is sent to the first presence server, and the query message is used to query status information corresponding to the third terminal.
所述接收模块20,还用于接收所述第一呈现服务器返回的所述第三终端对应的状态信息。The receiving module 20 is further configured to receive status information corresponding to the third terminal returned by the first presence server.
所述发送模块21,还用于在所述接收模块20接收到所述第一呈现服务器返回的所述第三终端对应的状态信息后,将所述第三终端对应的状态信息通知给所述第二终端。The sending module 21 is further configured to: after the receiving module 20 receives the status information corresponding to the third terminal returned by the first presence server, notify the status information corresponding to the third terminal to the The second terminal.
本发明实施例提供一种第二呈现服务器,所述第二呈现服务器包括接收模块和发送模块;所述接收模块,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息,并用于接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;所述发送模块,用于在所述接收模块接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。The embodiment of the present invention provides a second presentation server, where the second presentation server includes a receiving module and a sending module, and the receiving module is configured to receive a subscription message sent by the second terminal that belongs to the second presence server. The subscription message includes an identifier of a contact list for subscribing to status information of a contact in the contact list, and is configured to receive a first terminal that is broadcast by the first presence server and belongs to the first presence server. Corresponding state information; the sending module, configured to: when the receiving module receives the state information corresponding to the first terminal and determines that the first terminal is a terminal of a contact in the contact list, The second terminal notifies the status information corresponding to the first terminal. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例11Example 11
本发明实施例提供一种第一终端,如图12所示,所述第一终端包括发送模块30。The embodiment of the present invention provides a first terminal. As shown in FIG. 12, the first terminal includes a sending module 30.
发送模块30,用于发布所述第一终端发布的状态信息至第一呈现服务器。The sending module 30 is configured to release the status information issued by the first terminal to the first presence server.
本发明实施例提供一种第一终端,所述第一终端包括发送模块,用于发布所述第一终端发布的状态信息至第一呈现服务器,以使得第二终端获取所述第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了所述第一终端的状态信息时向其他终端通知所述第一终端的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态 订阅时对系统的压力。An embodiment of the present invention provides a first terminal, where the first terminal includes a sending module, configured to advertise the state information advertised by the first terminal to the first presence server, so that the second terminal obtains the first terminal to be released. Status information. With the solution, the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated internally by the system at the time of state subscription is reduced, thereby reducing the simultaneous initiation status of a large number of terminals. The pressure on the system when you subscribe.
实施例12Example 12
本发明实施例提供一种第二终端,如图13所示,所述第二终端包括发送模块40和接收模块41。The embodiment of the present invention provides a second terminal. As shown in FIG. 13, the second terminal includes a sending module 40 and a receiving module 41.
所述发送模块40,用于发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息。The sending module 40 is configured to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes an identifier of the contact list for subscription. Status information for contacts in the contact list.
所述接收模块41,用于接收第二呈现服务器发送的第一终端对应的状态信息。The receiving module 41 is configured to receive status information corresponding to the first terminal sent by the second presence server.
本发明实施例提供一种第二终端,所述第二终端包括发送模块和接收模块;所述发送模块,用于发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息;所述接收模块,用于接收第二呈现服务器发送的第一终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。The embodiment of the present invention provides a second terminal, where the second terminal includes a sending module and a receiving module, and the sending module is configured to send a status subscription message to the second presence server, so that the second presence server subscribes the message according to the status. Querying the status information corresponding to the first terminal, the subscription message includes an identifier of the contact list, and is used to subscribe to the status information of the contact in the contact list; the receiving module is configured to receive the first terminal sent by the second presence server Corresponding status information. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例13Example 13
本发明实施例提供一种第一呈现服务器,如图14所示,所述第一呈现服务器包括接收器50和发送器51。The embodiment of the present invention provides a first presence server. As shown in FIG. 14, the first presence server includes a receiver 50 and a transmitter 51.
所述接收器50,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息,并将所述第一终端发布的状态信息传输至所述广播模块。The receiver 50 is configured to receive status information that is sent by the first terminal that belongs to the first presence server, and transmit status information that is sent by the first terminal to the broadcast module.
所述发送器51,用于从所述接收器50接收所述第一终端发布的状态信息,并将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现 服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The transmitter 51 is configured to receive status information that is sent by the first terminal from the receiver 50, and broadcast status information that is sent by the first terminal to other presence servers, where the other presence servers include a second Presenting a server to facilitate the second presentation And notifying, by the second terminal, the status information corresponding to the first terminal, where the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal, where the first terminal corresponds The status information includes status information issued by the first terminal.
进一步地,所述接收器50,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息。Further, the receiver 50 is further configured to receive the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server.
如图15所示,所述第一呈现服务器还包括:As shown in FIG. 15, the first presence server further includes:
处理器52,用于获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器。The processor 52 is configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presence server.
所述发送器51,还用于在所述处理器52获取到所述第三终端对应的状态信息后,将所述第三终端对应的状态信息广播给所述其它呈现服务器。The transmitter 51 is further configured to: after the processor 52 acquires the status information corresponding to the third terminal, broadcast the status information corresponding to the third terminal to the other presence server.
进一步地,如果所述第一呈现服务器存储了所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息。Further, if the first presence server stores the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal.
如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。If the first presence server does not store the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
本发明实施例提供一种第一呈现服务器,所述第一呈现服务器包括接收器和发送器;所述接收器,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息,并将所述第一终端发布的状态信息传输至所述广播模块;所述发送器,用于从所述接收器50接收所述第一终端发布的状态信息,并将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了所述第一终端的状态信息时向其他终端通知所述第一终端的 状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a first presence server, where the first presence server includes a receiver and a transmitter, and the receiver is configured to receive status information that is sent by the first terminal that is belong to the first presence server. Transmitting the status information issued by the first terminal to the broadcast module, and the transmitter is configured to receive status information that is sent by the first terminal from the receiver 50, and release the first terminal Status information is broadcast to other presence servers, and the other presence servers include a second presence server, so that the second presence server subscribes to the first terminal corresponding to the second terminal at the second terminal belonging to the second presence server. The status information is sent to the second terminal to the status information corresponding to the first terminal, and the status information corresponding to the first terminal includes status information that is sent by the first terminal. With the solution, the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Terminal status information. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例14Example 14
本发明实施例提供一种第二呈现服务器,如图16所示,所述第二呈现服务器包括接收器60和发送器61。The embodiment of the present invention provides a second presentation server. As shown in FIG. 16, the second presentation server includes a receiver 60 and a transmitter 61.
所述接收器60,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息,并用于接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息。The receiver 60 is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a contact in the contact list. The status information is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server.
所述发送器61,用于在所述接收器60接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。The transmitter 61 is configured to: when the receiver 60 receives the status information corresponding to the first terminal and determines that the first terminal is a terminal of a contact in the contact list, The second terminal notifies the status information corresponding to the first terminal.
进一步地,所述发送器61,还用于在所述接收器60接收到归属于所述第二呈现服务器的所述第二终端发送的订阅消息之后,在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息。Further, the transmitter 61 is further configured to: after the receiver 60 receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is the contact The terminal of the contact in the list does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, and sends an inquiry message to the first presence server. The query message is used to query status information corresponding to the third terminal.
所述接收器60,还用于接收所述第一呈现服务器返回的所述第三终端对应的状态信息。The receiver 60 is further configured to receive status information corresponding to the third terminal returned by the first presence server.
所述发送器61,还用于在所述接收器60接收到所述第一呈现服务器返回的所述第三终端对应的状态信息后,将所述第三终端对应的状态信息通知给所述第二终端。The transmitter 61 is further configured to: after the receiver 60 receives the status information corresponding to the third terminal returned by the first presence server, notify the status information corresponding to the third terminal to the The second terminal.
本发明实施例提供一种第二呈现服务器,所述第二呈现服务器包括接收器和发送器;所述接收器,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息,并用于接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;所述发送器,用于在所述接收器接收到所述第一终端 对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a second presence server, where the second presence server includes a receiver and a sender, and the receiver is configured to receive a subscription message sent by a second terminal that belongs to the second presence server. The subscription message includes an identifier of a contact list for subscribing to status information of a contact in the contact list, and is configured to receive a first terminal that is broadcast by the first presence server and belongs to the first presence server. Corresponding status information; the transmitter, configured to receive the first terminal at the receiver Corresponding state information and determining that the first terminal is a terminal of a contact in the contact list, notifying the second terminal of status information corresponding to the first terminal. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例15Example 15
本发明实施例提供一种第一终端,如图17所示,所述第一终端包括发送器70。The embodiment of the present invention provides a first terminal. As shown in FIG. 17, the first terminal includes a transmitter 70.
发送器70,用于发布所述第一终端发布的状态信息至第一呈现服务器。The sender 70 is configured to issue status information that is sent by the first terminal to the first presence server.
本发明实施例提供一种第一终端,所述第一终端包括发送器,用于发布所述第一终端发布的状态信息至第一呈现服务器,以使得第二终端获取所述第一终端发布的状态信息。通过该方案,由于第一呈现服务器能够将第一终端的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了所述第一终端的状态信息时向其他终端通知所述第一终端的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a first terminal, where the first terminal includes a transmitter, and is configured to advertise the state information advertised by the first terminal to the first presence server, so that the second terminal obtains the first terminal to be released. Status information. With the solution, the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例16Example 16
本发明实施例提供一种第二终端,如图18所示,所述第二终端包括发送器80和接收器81。The embodiment of the present invention provides a second terminal. As shown in FIG. 18, the second terminal includes a transmitter 80 and a receiver 81.
所述发送器80,用于发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息。The sender 80 is configured to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes an identifier of the contact list for subscription. Status information for contacts in the contact list.
所述接收器81,用于接收第二呈现服务器发送的第一终端对应的状态信息。The receiver 81 is configured to receive status information corresponding to the first terminal sent by the second presence server.
本发明实施例提供一种第二终端,所述第二终端包括发送器和接 收器;所述发送器,用于发送状态订阅消息至第二呈现服务器,以使得第二呈现服务器根据状态订阅消息,查询第一终端对应的状态信息,订阅消息包括联系人列表的标识,用于订阅联系人列表中的联系人的状态信息;所述接收器,用于接收第二呈现服务器发送的第一终端对应的状态信息。通过该方案,能够减少状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a second terminal, where the second terminal includes a transmitter and a receiver. The sender is configured to send a status subscription message to the second presence server, so that the second presence server queries the status information corresponding to the first terminal according to the status subscription message, and the subscription message includes the identifier of the contact list. The status information of the contact in the contact list; the receiver is configured to receive status information corresponding to the first terminal sent by the second presence server. Through this solution, the number of subscriptions and status notifications generated internally by the system at the time of status subscription can be reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
实施例17Example 17
本发明实施例提供一种状态订阅的系统,包括第一呈现服务器以及第二呈现服务器。An embodiment of the present invention provides a system for status subscription, including a first presence server and a second presence server.
所述第一呈现服务器,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息;将所述状态信息广播给其它呈现服务器,所述其它呈现服务器包括所述第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The first presence server is configured to receive state information issued by a first terminal that belongs to the first presence server; broadcast the state information to other presence servers, where the other presence servers include the second presence server In order to notify the second terminal of the status information corresponding to the first terminal, when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal, The status information corresponding to the first terminal includes status information that is sent by the first terminal.
所述第二呈现服务器,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息;接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;在接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。The second presence server is configured to receive a subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact in the contact list. Status information; receiving status information corresponding to the first terminal that is broadcast by the first presence server and belonging to the first presence server; receiving status information corresponding to the first terminal, and determining that the first terminal is When the terminal of the contact in the contact list is notified to the second terminal, the status information corresponding to the first terminal is notified.
进一步地,所述第一呈现服务器,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;将所述第三终端对应的状态信息广播给所述其它呈现服务器。Further, the first presence server is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server; And the state information corresponding to the third terminal is returned to the second presence server; and the state information corresponding to the third terminal is broadcasted to the other presence server.
所述第二呈现服务器,还用于在确定第三终端为所述联系人列表 中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;接收所述第一呈现服务器返回的所述第三终端对应的状态信息;将所述第三终端对应的状态信息通知给所述第二终端。The second presence server is further configured to determine that the third terminal is the contact list When the terminal of the contact in the contact does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, sends a query message to the first presence server, The query message is used to query the state information corresponding to the third terminal; the state information corresponding to the third terminal returned by the first presence server is received; and the state information corresponding to the third terminal is notified to the second terminal.
本发明实施例提供一种状态订阅的系统,所述状态订阅的系统包括第一呈现服务器以及第二呈现服务器。通过该方案,由于第一呈现服务器能够将第一终端的状态信息广播给其它呈现服务器,以使得其他呈现服务器在其他终端订阅了所述第一终端的状态信息时向其他终端通知所述第一终端的状态信息。因此,减少了状态订阅时系统内部产生的订阅数和状态通知数,进而减小在大量终端同时发起状态订阅时对系统的压力。An embodiment of the present invention provides a system for status subscription, where the state subscription system includes a first presence server and a second presence server. With the solution, the first presence server can broadcast the status information of the first terminal to other presentation servers, so that the other presentation servers notify the other terminals of the first when the other terminal subscribes to the status information of the first terminal. Status information of the terminal. Therefore, the number of subscriptions and status notifications generated within the system at the time of status subscription is reduced, thereby reducing the pressure on the system when a large number of terminals simultaneously initiate a status subscription.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It will be clearly understood by those skilled in the art that for the convenience and brevity of the description, only the division of each functional module described above is exemplified. In practical applications, the above function assignment can be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above. For the specific working process of the system, the device and the unit described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理 单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in various embodiments of the present invention can be integrated into one process In the unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims (12)

  1. 一种状态订阅的方法,其特征在于,所述方法包括:A method for status subscription, characterized in that the method comprises:
    第一呈现服务器接收归属于所述第一呈现服务器的第一终端发布的状态信息;The first presence server receives status information issued by the first terminal that belongs to the first presence server;
    所述第一呈现服务器将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The first presence server broadcasts status information issued by the first terminal to other presence servers, and the other presence servers include a second presence server, so that the second presence server is attributable to the second presence server. When the second terminal subscribes to the status information corresponding to the first terminal, the second terminal is notified of the status information corresponding to the first terminal, and the status information corresponding to the first terminal includes the first terminal. status information.
  2. 根据权利要求1所述的状态订阅的方法,其特征在于,所述方法还包括:The method of claim 1 according to claim 1, wherein the method further comprises:
    所述第一呈现服务器接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;The first presence server receives the query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
    所述第一呈现服务器获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;The first presence server acquires state information corresponding to the third terminal, and returns state information corresponding to the third terminal to the second presence server;
    所述第一呈现服务器将所述第三终端对应的状态信息广播给所述其它呈现服务器。The first presence server broadcasts status information corresponding to the third terminal to the other presentation server.
  3. 根据权利要求2所述的状态订阅的方法,其特征在于,A method of status subscription according to claim 2, characterized in that
    如果所述第一呈现服务器存储了所述第三终端发布的状态信息,获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息;If the first presentation server stores the status information that is sent by the third terminal, the obtained status information corresponding to the third terminal includes status information that is sent by the third terminal;
    如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。If the first presence server does not store the status information that is sent by the third terminal, the obtained status information corresponding to the third terminal includes the description information of the user of the third terminal.
  4. 一种状态订阅的方法,其特征在于,所述方法包括:A method for status subscription, characterized in that the method comprises:
    第二呈现服务器接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息;The second presence server receives the subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the state information of the contact in the contact list;
    所述第二呈现服务器接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;The second presence server receives state information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server;
    所述第二呈现服务器在接收到所述第一终端对应的状态信息并 且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。Receiving, by the second presence server, status information corresponding to the first terminal and And determining, when the first terminal is a terminal of the contact in the contact list, notifying the second terminal of status information corresponding to the first terminal.
  5. 根据权利要求4所述的状态订阅的方法,其特征在于,在所述第二呈现服务器接收归属于所述第二呈现服务器的所述第二终端发送的订阅消息之后,所述方法还包括:The method of claim 4, wherein after the second presence server receives the subscription message sent by the second terminal of the second presence server, the method further includes:
    所述第二呈现服务器在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;The second presence server determines that the third terminal is a terminal of the contact in the contact list, does not store state information corresponding to the third terminal, and determines that the third terminal belongs to the first When the server is presented, the query message is sent to the first presence server, where the query message is used to query status information corresponding to the third terminal;
    所述第二呈现服务器接收所述第一呈现服务器返回的所述第三终端对应的状态信息;Receiving, by the second presence server, status information corresponding to the third terminal returned by the first presence server;
    所述第二呈现服务器将所述第三终端对应的状态信息通知给所述第二终端。The second presence server notifies the second terminal of the status information corresponding to the third terminal.
  6. 一种第一呈现服务器,其特征在于,包括:接收模块和广播模块;A first presentation server, comprising: a receiving module and a broadcast module;
    所述接收模块,用于接收归属于所述第一呈现服务器的第一终端发布的状态信息,并将所述第一终端发布的状态信息传输至所述广播模块;The receiving module is configured to receive status information advertised by the first terminal that belongs to the first presence server, and transmit status information advertised by the first terminal to the broadcast module;
    所述广播模块,用于从所述接收模块接收所述第一终端发布的状态信息,并将所述第一终端发布的状态信息广播给其它呈现服务器,所述其它呈现服务器包括第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息。The broadcast module is configured to receive status information that is sent by the first terminal from the receiving module, and broadcast the status information that is sent by the first terminal to another presentation server, where the other presentation server includes a second presence server. In order to notify the second terminal of the status information corresponding to the first terminal, when the second terminal that belongs to the second presence server subscribes to the status information corresponding to the first terminal, The status information corresponding to the first terminal includes status information that is sent by the first terminal.
  7. 根据权利要求6所述的第一呈现服务器,其特征在于,A first presence server according to claim 6 wherein:
    所述接收模块,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;The receiving module is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server;
    所述第一呈现服务器还包括:The first presence server further includes:
    处理模块,用于获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;a processing module, configured to acquire state information corresponding to the third terminal, and return status information corresponding to the third terminal to the second presentation server;
    所述广播模块,还用于在所述处理模块获取到所述第三终端对应 的状态信息后,将所述第三终端对应的状态信息广播给所述其它呈现服务器。The broadcast module is further configured to: acquire, by the processing module, the third terminal corresponding to After the status information, the status information corresponding to the third terminal is broadcast to the other presentation server.
  8. 根据权利要求7所述的第一呈现服务器,其特征在于,A first presence server according to claim 7, wherein
    如果所述第一呈现服务器存储了所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端发布的状态信息;If the first presentation server stores the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes status information that is sent by the third terminal;
    如果所述第一呈现服务器没有存储所述第三终端发布的状态信息,所述处理模块获取的所述第三终端对应的状态信息包括所述第三终端的用户的描述信息。If the first presence server does not store the status information of the third terminal, the status information corresponding to the third terminal acquired by the processing module includes description information of the user of the third terminal.
  9. 一种第二呈现服务器,其特征在于,包括:接收模块和发送模块;A second presentation server, comprising: a receiving module and a sending module;
    所述接收模块,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息,并用于接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;The receiving module is configured to receive a subscription message sent by a second terminal that belongs to the second presence server, where the subscription message includes an identifier of a contact list, and is used to subscribe to a status of a contact in the contact list. Information, and is used to receive status information corresponding to the first terminal that is broadcast by the first presence server and belongs to the first presence server;
    所述发送模块,用于在所述接收模块接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。The sending module is configured to: when the receiving module receives the state information corresponding to the first terminal, and determines that the first terminal is a terminal of a contact in the contact list, to the second terminal Notifying the status information corresponding to the first terminal.
  10. 根据权利要求9所述的第二呈现服务器,其特征在于,A second presentation server according to claim 9 wherein:
    所述发送模块,还用于在所述接收模块接收到归属于所述第二呈现服务器的所述第二终端发送的订阅消息之后,在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;The sending module is further configured to: after the receiving module receives the subscription message sent by the second terminal that belongs to the second presence server, determine that the third terminal is a contact in the contact list The terminal does not store the state information corresponding to the third terminal, and determines that the third terminal belongs to the first presence server, and sends a query message to the first presence server, where the query message is used. Querying status information corresponding to the third terminal;
    所述接收模块,还用于接收所述第一呈现服务器返回的所述第三终端对应的状态信息;The receiving module is further configured to receive status information corresponding to the third terminal returned by the first presence server;
    所述发送模块,还用于在所述接收模块接收到所述第一呈现服务器返回的所述第三终端对应的状态信息后,将所述第三终端对应的状态信息通知给所述第二终端。The sending module is further configured to notify the second status information corresponding to the third terminal after the receiving module receives the status information corresponding to the third terminal returned by the first terminal.
  11. 一种状态订阅的系统,其特征在于,包括:A state subscription system, comprising:
    第一呈现服务器以及第二呈现服务器;a first presence server and a second presence server;
    所述第一呈现服务器,用于接收归属于所述第一呈现服务器的第 一终端发布的状态信息;将所述状态信息广播给其它呈现服务器,所述其它呈现服务器包括所述第二呈现服务器,以便于所述第二呈现服务器在归属于所述第二呈现服务器的第二终端订阅了所述第一终端对应的状态信息时向所述第二终端通知所述第一终端对应的状态信息,所述第一终端对应的状态信息包括所述第一终端发布的状态信息;The first presence server is configured to receive a number that belongs to the first presence server Status information issued by a terminal; broadcasting the status information to other presence servers, the other presence servers including the second presence server, so that the second presence server is at the second belonging to the second presence server When the second terminal subscribes to the status information corresponding to the first terminal, the second terminal is notified of the status information corresponding to the first terminal, and the status information corresponding to the first terminal includes status information advertised by the first terminal. ;
    所述第二呈现服务器,用于接收归属于所述第二呈现服务器的第二终端发送的订阅消息,所述订阅消息包括联系人列表的标识,用于订阅所述联系人列表中的联系人的状态信息;接收所述第一呈现服务器广播的归属于所述第一呈现服务器的第一终端对应的状态信息;在接收到所述第一终端对应的状态信息并且确定所述第一终端为所述联系人列表中的联系人的终端时,向所述第二终端通知所述第一终端对应的状态信息。The second presence server is configured to receive a subscription message sent by the second terminal that belongs to the second presence server, where the subscription message includes an identifier of the contact list, and is used to subscribe to the contact in the contact list. Status information; receiving status information corresponding to the first terminal that is broadcast by the first presence server and belonging to the first presence server; receiving status information corresponding to the first terminal, and determining that the first terminal is When the terminal of the contact in the contact list is notified to the second terminal, the status information corresponding to the first terminal is notified.
  12. 根据权利要求11所述的状态订阅的系统,其特征在于,A state subscription system according to claim 11 wherein:
    所述第一呈现服务器,还用于接收所述第二呈现服务器发送的查询消息,所述查询消息用于查询归属于所述第一呈现服务器的第三终端对应的状态信息;获取所述第三终端对应的状态信息,并将所述第三终端对应的状态信息返回给所述第二呈现服务器;将所述第三终端对应的状态信息广播给所述其它呈现服务器;The first presence server is further configured to receive a query message sent by the second presence server, where the query message is used to query status information corresponding to the third terminal that belongs to the first presence server; The status information corresponding to the third terminal is returned to the second presentation server, and the status information corresponding to the third terminal is broadcasted to the other presentation server;
    所述第二呈现服务器,还用于在确定第三终端为所述联系人列表中的联系人的终端、自身没有存储所述第三终端对应的状态信息、并且确定所述第三终端归属于所述第一呈现服务器时,向所述第一呈现服务器发送查询消息,所述查询消息用于查询所述第三终端对应的状态信息;接收所述第一呈现服务器返回的所述第三终端对应的状态信息;将所述第三终端对应的状态信息通知给所述第二终端。 The second presence server is further configured to: determine, by the terminal that the third terminal is a contact in the contact list, does not store state information corresponding to the third terminal, and determine that the third terminal belongs to And sending, by the first presence server, the query message to the first presence server, where the query message is used to query status information corresponding to the third terminal; and receive the third terminal returned by the first presence server Corresponding state information; notifying the second terminal of the state information corresponding to the third terminal.
PCT/CN2014/088957 2014-01-29 2014-10-20 Method, apparatus and system for state subscription WO2015113409A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410043520.0 2014-01-29
CN201410043520.0A CN104811320A (en) 2014-01-29 2014-01-29 State subscription method, device and system

Publications (1)

Publication Number Publication Date
WO2015113409A1 true WO2015113409A1 (en) 2015-08-06

Family

ID=53695835

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088957 WO2015113409A1 (en) 2014-01-29 2014-10-20 Method, apparatus and system for state subscription

Country Status (2)

Country Link
CN (1) CN104811320A (en)
WO (1) WO2015113409A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817400B (en) * 2015-12-02 2020-05-12 中兴通讯股份有限公司 Method and device for notifying presence state
CN106453067A (en) * 2016-12-09 2017-02-22 Tcl集团股份有限公司 Method and system for displaying friend login states in instant messaging tool

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1747566A (en) * 2004-04-30 2006-03-15 华为技术有限公司 Subscribing, cancelling and state updating method for attendance service
CN101159910A (en) * 2007-10-30 2008-04-09 中兴通讯股份有限公司 Synchronous present state method and cluster server and terminal for implementing the method
CN101631140A (en) * 2009-08-03 2010-01-20 中兴通讯股份有限公司 Cluster server of instant communication system and method of inter-clusters communication
JP2010198352A (en) * 2009-02-25 2010-09-09 Nippon Telegr & Teleph Corp <Ntt> Presence service system and presence service method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1747566A (en) * 2004-04-30 2006-03-15 华为技术有限公司 Subscribing, cancelling and state updating method for attendance service
CN101159910A (en) * 2007-10-30 2008-04-09 中兴通讯股份有限公司 Synchronous present state method and cluster server and terminal for implementing the method
JP2010198352A (en) * 2009-02-25 2010-09-09 Nippon Telegr & Teleph Corp <Ntt> Presence service system and presence service method
CN101631140A (en) * 2009-08-03 2010-01-20 中兴通讯股份有限公司 Cluster server of instant communication system and method of inter-clusters communication

Also Published As

Publication number Publication date
CN104811320A (en) 2015-07-29

Similar Documents

Publication Publication Date Title
US8452959B2 (en) Method and system for registering a presence user with a presence service
CN101355797B (en) Method for obtaining user terminal equipment information and communication service function entity
US20030041101A1 (en) Presence watcher proxy
JP5550627B2 (en) Group communication in communication systems
EP2854431B1 (en) Device, method and mobile terminal for updating mobile social network user state
WO2007076673A1 (en) A method, system and device for sharing presence information
CN101827309A (en) Method, terminal, server and system for sending push massage
US11617063B2 (en) Method, apparatus, and system for changing association relationship between MCPTT user and MCPTT group
WO2012159389A1 (en) Method and device for obtaining contact information
CN112187495A (en) Communication method and communication system of terminal and server
EP2453681A1 (en) System and method for routing session initiation protocol conversation
CN108989270B (en) Authentication method, device and system
WO2015113409A1 (en) Method, apparatus and system for state subscription
CN103024687A (en) Method and equipment for establishing instant messaging
JP6345254B2 (en) Video communication termination method and apparatus
WO2018202079A1 (en) Information transmission method and device and storage medium
CN101374282B (en) Method and apparatus for displaying different states of wireless one-key-through user in different groups
WO2015060757A1 (en) Method and application server for executing a service-related operation for a device user
CN103460681A (en) Method for managing converged address book capability
US20150109956A1 (en) Method of setting pn on the basis of personal network usage information in heterogeneous network
EP1992086B1 (en) Method of roaming in broadcast service and apparatus thereof
WO2009054661A1 (en) Procedure for managing data synchronization under multiple devices environment
CN104270495A (en) Contact adding method, system and mobile terminals
WO2007066354A1 (en) A system and method to share digital data in a secure and fine grained controlled manner over a communication network
CN105376727A (en) Data card processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14880453

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14880453

Country of ref document: EP

Kind code of ref document: A1