WO2017092492A1 - Presence state notification method and device - Google Patents

Presence state notification method and device Download PDF

Info

Publication number
WO2017092492A1
WO2017092492A1 PCT/CN2016/100402 CN2016100402W WO2017092492A1 WO 2017092492 A1 WO2017092492 A1 WO 2017092492A1 CN 2016100402 W CN2016100402 W CN 2016100402W WO 2017092492 A1 WO2017092492 A1 WO 2017092492A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
friend
presence server
notification message
state
Prior art date
Application number
PCT/CN2016/100402
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 WO2017092492A1 publication Critical patent/WO2017092492A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of RCS converged message classes, and more particularly to a presentation status notification method and apparatus.
  • RCS ich Communication Suite
  • Presence or presence information is used to convey the ability and willingness of a user to communicate through a group of devices.
  • Commonly available timely communications are generally available to users in an optional state: online, busy, coming back soon, leaving, answering calls, eating out and showing offline.
  • These states are called “presentation states” and they represent the state in which the user is currently and the willingness of the user to communicate. At the same time, these states also reflect the ability to communicate with the user.
  • the presentation state of the user can be managed by a presence server (PS AS). For example, if the user is in the "offline" state, other users cannot communicate with the instant message.
  • PS AS presence server
  • the presence server needs to notify all friends of the user in real time.
  • the notification process of one of the simplest presentation states is as shown in FIG. 1: one user A subscribes to (SUBSCRIBE) the presentation state of another user B he is interested in, and after user B accepts the subscription request, each time user B's presentation state changes. After that, User B will post (PUBLISH) its own new presentation state, and this new presentation state will be given to User A by the presence server notification (NOTIFY).
  • the presence server corresponding to the user B In the case that the user B has multiple friends subscribed to the presence status of the user B, the presence server corresponding to the user B generates a plurality of user B's presence status notification messages, which are respectively sent to the plurality of friends of the user B.
  • the unstable signal in the mobile network leads to frequent state switching.
  • the status notification message will increase rapidly, and the notification message forwarding between each presentation server (PS AS, presence server) will become a bottleneck, affecting the user experience.
  • the embodiment of the present invention provides a method and apparatus for presenting a notification state, which can be improved.
  • an embodiment of the present invention provides a presentation status notification method, where the method includes:
  • the status change notification message corresponding to the first user is sent to each friend user by the presence server that is logged by each friend user.
  • the presentation status notification method further includes:
  • the presentation status notification method further includes:
  • the status change notification message of the first user is delivered to each of the friend users of the home present server.
  • the presenting server that determines that the buddy user of the first user belongs to send the status change notification message corresponding to the first user to the presence server to which the buddy user of the first user belongs by using the broadcast message the presenting The status notification method also includes:
  • the confirming whether the first user is in a stable state comprises:
  • the timer is started, and if the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, it is determined that the first user is in a stable state;
  • timer change timer is received within the predetermined time, if the state change notification message corresponding to the first user is received again, the timer is restarted, and it is determined again whether the first user is in a stable state.
  • the presenting Status notification methods include:
  • the second user belongs to a local server or other server.
  • an embodiment of the present invention further provides a presentation status notification device, which is disposed on a presence server, and the device includes:
  • a user receiving unit configured to receive state change information sent by the first user; wherein the state change information is used to notify the first user of a change in the presentation state;
  • the forwarding unit is configured to determine a presence server to which the friend user of the first user belongs, and send a status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs by using a broadcast message, so as to pass each friend user.
  • affiliated rendering server will be A status change notification message corresponding to a user is sent to each friend user.
  • the presence status notification device further includes:
  • a server receiving unit configured to receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second friend list corresponding to the second user, a subscription user corresponding to the second user in the present presentation server;
  • the sending unit is configured to send the second state change notification message to the subscribing user corresponding to the second user.
  • the forwarding unit is further configured to: send, to the buddy user of the home present server, a state change notification message of the first user to each of the buddy users of the home present server.
  • the presence status notification device further includes:
  • a steady state confirmation unit configured to confirm whether the first user is in a stable state; and in the case that the first user is in a stable state, performing, by the forwarding unit, the presence server that determines the friend user of the first user belongs to, by broadcasting The process of sending a status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs.
  • the steady state confirmation unit comprises:
  • the startup module is configured to start a timer. If the timer change time is reached, if the state change notification message corresponding to the first user is not received again, it is determined that the first user is in a stable state;
  • the re-judgment module is configured to restart the timer when the timer expires within a predetermined time and receive the state change notification message corresponding to the first user again, and determine whether the first user is in a stable state again.
  • the presence status notification device further includes:
  • a buddy list setting unit configured to establish a first buddy list for a first user belonging to the local server, wherein all buddy users of the first user are recorded in the first buddy list;
  • the second user When the first user belonging to the local server is in a friend relationship with the second user, The second user establishes a second buddy list, wherein the second buddy list records the buddy user of the second user in the local presence server, and the second user belongs to the local server or other server.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the state change information is used to notify the first user of the change of the presence state; determining the presence server to which the friend user of the first user belongs, for the friend user belonging to the other presence server, Sending, by using a broadcast message, a status change notification message corresponding to the first user to the presence server to which the friend user belongs, to send a status change notification message corresponding to the first user to each friend by using the presence server to which the friend user belongs. user.
  • the technical solution provided by the embodiment of the present invention includes: receiving a state change notification message corresponding to the first user; wherein the state change notification message is used to notify the first user of the change of the presence state; determining the first user
  • the presence server to which the buddy user belongs, for the buddy user belonging to the other presentation server sends a status change notification message corresponding to the first user to the presence server to which the buddy user belongs by using the broadcast message to pass the buddy user.
  • the belonging presentation server sends a status change notification message corresponding to the first user to each friend user.
  • the PS AS A to which the user A belongs does not need to generate a corresponding number of state change notification messages according to the number of friends of the user A, and respectively pass each friend.
  • the home PS AS sends a status change notification message to each friend of the user A, but merges multiple messages between the PS ASs into one broadcast message, and the PS AS A broadcasts the status of one user A to the PS AS to which each friend belongs.
  • the notification message is changed, and the friend AS of the user A in the local server is respectively notified by the PS AS to which the buddy belongs, thereby reducing the amount of message forwarding between the PS ASs, thereby reducing the amount of information forwarding of the PS AS and improving the PS.
  • the performance of the AS improves the user experience.
  • FIG. 1 is a flowchart of a method for notifying a presence status provided by the prior art
  • FIGS. 2A and 2B are flowcharts of a method for notifying a presence status according to an embodiment of the present invention
  • 3A, 3B, and 3C are flowcharts of a method for notifying a presence status according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a presentation status notification apparatus according to an embodiment of the present invention.
  • the present invention provides a presentation status notification method, and the method includes:
  • Step 200 The first presence server receives the state change information sent by the first user, where the state change information is used to notify the first user of the change of the presence state.
  • Step 400 Determine a presence server to which the buddy user of the first user belongs, and send a status change notification message corresponding to the first user to the presence server to which the buddy user of the first user belongs by using a broadcast message, so as to belong to each buddy user.
  • the presence server sends a status change notification message corresponding to the first user to each friend user.
  • the status change notification message of the first user is directly delivered to the buddy user belonging to the present presence server; for the buddy user belonging to other presentation servers, the broadcast message will be
  • the status change notification message corresponding to the first user is sent to the presence server to which the friend user of the first user belongs, to send the status change notification message corresponding to the first user to each friend user through the presence server to which each friend user belongs.
  • the embodiment of the present invention when the status change notification message is required to be sent to other presentation servers, the embodiment of the present invention forwards the status change notification message by using a merge status change notification message.
  • the broadcast message is sent to each of the different presentation servers, and a status change notification message corresponding to the first user is sent, and the status change notification message corresponding to the first user is distributed to all local friend users.
  • step 400 the status change notification message corresponding to the first user is sent to each friend user by using a presence server to which each friend user belongs:
  • Step 411 The first presence server generates a corresponding state change notification message.
  • Step 412 If the first user's friend user belongs to the first presence server, the first presence server sends a state change notification message to the friend user of the first user of the home local presence server.
  • Step 413 If the friend user of the first user belongs to another presence server, the first presence server sends a state change notification message to another presence server to which the friend user of the first user belongs.
  • User A belongs to the presence server A, and user A has 30 friends. Among them, the friends 1 to 10 and the user A belong to the presentation server A, the friends 11 to 20 belong to the presentation server B, and the friends 21 to 30 belong to the presentation.
  • the server C sends the status change notification message corresponding to the user A to the friend 1 to the friend 10 when the first presence server receives the status change notification message sent by the user A, and the presence server A changes the status corresponding to the user A.
  • the notification message is sent to the presence server B and the presence server C respectively, so that the status change notification message corresponding to the user A is sent to the friends 11 to 20 through the presence server B, and the status change notification message corresponding to the user A is sent by the presence server C.
  • the presentation status notification method further includes:
  • Step 700 Receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second buddy list corresponding to the second user, the subscription user corresponding to the second user in the presence server;
  • Step 800 Send the second state change notification message to a subscription user corresponding to the second user.
  • step 400 the status change notification message corresponding to the first user is sent to each friend user by using a presence server to which each friend user belongs:
  • Step 421 The first presence server generates a corresponding state change notification message.
  • Step 422 The first presence server sends a state change notification message to the friend user of the first user of the home local presence server.
  • Step 423 The first presence server sends the state change notification message to other presentation servers in the form of a broadcast message.
  • User A belongs to the presence server A, and user A has 30 friends. Among them, the friends 1 to 10 and the user A belong to the presentation server A, the friends 11 to 20 belong to the presentation server B, and the friends 21 to 30 belong to the presentation.
  • the server C sends the status change notification message corresponding to the user A to the friend 1 to the friend 10 when the first presence server receives the status change notification message sent by the user A.
  • the presence server A broadcasts the status change notification message through the broadcast. The message is sent to other presence servers, including the presence server B, the presence server C, the server D, and the presence server E,
  • the presence server B After receiving the status change notification message corresponding to the user A, the presence server B determines whether the local user includes the friend user (subscriber user) of the user A, and if so, sends the status change notification message corresponding to the user A to the user A. Friend user, if not, then The status change notification message corresponding to the user A is discarded. Since the buddy 11 to the buddy 20 are attributed to the presence server B, the presence server B sends the status change notification message corresponding to the user A to the buddy 11 to the buddy 20, and similarly, through the presence server. C sends the status change notification message corresponding to the user A to the friends 21 to 30.
  • the server D After receiving the status change notification message corresponding to the user A, the server D determines whether the local user includes the friend user (subscriber user) of the user A. If the result is determined, the status change notification message corresponding to the user A is sent to the user A. A friend, if not, discards the status change notification message corresponding to the user A. Since the user A has no friends attributed to the presence server C, the presence server C discards the status change notification message corresponding to the user A. Similarly, the presence server D will The status change notification message corresponding to user A is discarded.
  • the PS AS A to which the user A belongs when the status of the user A changes, the PS AS A to which the user A belongs generates 30 state change notification messages of the user A, and respectively sends them to the 30 friends of the user A, and the PS AS A forwards 10 notifications.
  • the message is sent to PS AS B, and PS AS A forwards 10 notification messages to PS AS C.
  • the presentation status notification method provided by the embodiment of the present invention combines multiple messages between the PS ASs into one broadcast message, and the PS AS A broadcasts a status change notification message of the user A to the PS AS B and the PS AS C respectively, and passes the PS.
  • AS B and PS AS C respectively use the presence status notification method of the user A of the user A in the local server to reduce the amount of message forwarding between the PS ASs, thereby reducing the amount of information forwarding of the PS AS and improving the PS AS. Performance improves the user experience.
  • the presentation status notification method includes:
  • Step 100 Establish a first buddy list for the first user that belongs to the local server, where all buddy users of the first user are recorded in the first buddy list;
  • the second user belongs to a local server or other server.
  • the corresponding correspondence is established and maintained.
  • a first buddy list and a second buddy list wherein the first buddy list is stored on the presence server corresponding to the user A, the first buddy list records all the buddy users of the user A, and the presentation server to which each buddy user belongs;
  • the second buddy list corresponding to the user A is stored in the presentation server to which the buddy users belong, and the buddy user in the local presence server is recorded in the second buddy list.
  • the default second user is the subscription user of the first user as an example, that is, for the first friend established for the first user.
  • the friend user of the first user in the local presence server is recorded, that is, the subscription user of the first user in the local presence server is recorded in the second friend list.
  • the same meaning is expressed by the buddy user and the subscribing user as an example.
  • the buddy user and the subscribing user can be distinguished, and the subscribing user is the buddy user's own self.
  • a certain first user can subscribe to the presentation status of some of the buddy users.
  • the first buddy list is set to Recording all subscribers of the first user
  • the second buddy list is set to record the subscribers of the first user in the local presence server
  • the presence server changes the status according to the subscription users recorded in the first buddy list and the second buddy list. The forwarding of notification messages.
  • the first buddy list and the second buddy list are described below in conjunction with a specific example.
  • User A has 30 buddies, user A has a corresponding buddy server A, and a first buddy list is stored in the first buddy server A, and 30 buddy users corresponding to user A and 30 buddy users respectively.
  • the first friend list records that the friends 1 to 10 are in the same presentation server A as the user A, the friends 11 to 20 are attributed to the presence server B, and the friends 21 to 30 are attributed to the presence server C, in the presence server A.
  • a second buddy list corresponding to the user A the second buddy list recording the friends 1 to 10 of the all the buddy users of the user A belonging to the presence server A;
  • the second buddy list corresponding to the user A is recorded, and the second buddy list records the buddy 11 to the buddy 20 belonging to the presence server B among all the buddy users of the user A; in the presence server C, the user is recorded.
  • a second buddy list corresponding to A the second buddy list records friends 21 to 30 belonging to the presence server C among all the buddy users of the user A.
  • the first buddy list is a friend relationship table
  • the second buddy list is a user attention table.
  • the PS AS A to which the user A belongs adds a new record in the friend relationship table.
  • User A, buddy B), and the PS AS B to which the buddy B belongs is also added a record (friend user A, user B) in the attention table corresponding to user A.
  • the presence server generates a corresponding state change notification message and sends the message to the other presentation server in the format of the broadcast message.
  • the URL of the broadcast message is set to the user A buddy list identifier, such as sip:userA_list@ps_serverb, and the presentation server B
  • the presence server B After receiving the notification message, it is determined according to the URL that the message is to be sent to the user A to all the friends on the local presence server, and the presence server B queries the second friend list of the local user A to obtain the friend user friend 11 of the user A.
  • the friend 20 is sent to the friend 11 to the friend 20 respectively.
  • the presentation status notification method before the step 400, the presentation status notification method further includes:
  • Step 300 confirm whether the first user is in a stable state; in the case that the first user is in a steady state, step 400 is performed; otherwise, jump to step 200;
  • step 300 the confirming whether the first user is in a stable state includes:
  • the timer is started, and if the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, it is determined that the first user is in a stable state;
  • timer change timer is received within the predetermined time, if the state change notification message corresponding to the first user is received again, the timer is restarted, and it is determined again whether the first user is in a stable state.
  • step 300 The process of confirming whether the first user is in a stable state in step 300 will be described below in conjunction with a specific example.
  • the state memory table is used to record the rendering state of the user in a steady state
  • the temporary state memory table is used to record the rendering state before the user's stable state
  • the presentation state of the record in the state memory table changes, and the presence server to which the user belongs will open the notification process of the user's state change.
  • the server caches the user state change information to the temporary state memory table, and sets a state duration timer (such as 2 minutes). If the timer expires (after 2 minutes), the state is maintained.
  • the system confirms that the status is the latest stable state of the terminal, retrieves the information from the temporary state memory table, updates the state memory table saved by the system, and proceeds to notify other friends of the process of the next step, and deletes the temporary User state change information cached in the state memory table. If the system receives the user's state change again before the timing is reached (within 2 minutes), the system considers that the user's state change is a temporary, transient state change, and deletes the previously cached from the temporary state memory table. The user state change information and the corresponding timer re-cache the latest state change information of the user to the temporary state memory table, set a corresponding timer, and wait for confirmation whether it is a steady state.
  • the user state is managed, the stable state of the user is identified, and the temporary user state change information is filtered out to avoid frequent switching of the state in the mobile network signal instability. And generating a large number of temporary state change notifications; on the other hand, when a user's presence state changes, and user A is in a stable state, a user A is broadcasted between the PS ASs through the first buddy list and the second buddy list.
  • the latest status message replaces the notification message sent by user A to each friend to reduce the amount of message forwarding between PS ASs, thereby reducing the amount of information forwarding between PS ASs, improving the performance of PS AS, and improving user experience.
  • FIG. 3A is a schematic diagram of a signaling interaction of a method for notifying a presence status according to an embodiment of the present invention.
  • the user A belongs to the PS AS A, and the method for notifying the presence status includes:
  • Step 11 When the presence status of the user A changes, the user A sends the state change information to the PS AS A to which the user A belongs.
  • Step 12 PS AS A caches the user state change information to the temporary state memory table, and sets a state duration timer (eg, 2 minutes);
  • Step 13 If the state is maintained after the timer expires (after 2 minutes), the switching change does not occur again, and the system confirms that the state is the latest stable state of the terminal; and proceeds to step 16 for subsequent processing;
  • Step 14 If the system receives the state change of the user again before the timing is reached (within 2 minutes), the previously cached user state change information and the corresponding timer are deleted from the temporary state memory table;
  • Step 15 PS AS A re-caches the latest state change information of the user to the temporary state memory table, and sets a corresponding timer, and proceeds to step 13;
  • Step 16 Extract the information from the temporary state memory table, update the user state saved by the system, delete the user state change information cached in the temporary state memory table, and proceed to the next step to notify other friend users.
  • FIG. 3B is a schematic diagram of the interaction of the presence status notification process in the case where the user A and the user A of the user A belong to the same presentation server according to an embodiment of the present invention.
  • the user A and his friends 1 to 10 belongs to the same PS AS A, and the presentation status notification method includes:
  • Step 21 user A sends the state change information to the PS AS A to which the user A belongs;
  • step 22 the PS AS A recognizes that the steady state of the user A changes through the user state management.
  • the change of the steady state of the user A by the user state management means that the PS AS A receives the state change information sent by the user A, and confirms that the user A is in a stable state.
  • Step 23 the PS AS A queries the second buddy list of the user A, and the buddy friends 1 to 10 of the user A belong to the PS AS A;
  • Step 241 the PS AS A generates a status change notification message corresponding to the user A and sends it to the user friend 1;
  • Step 242 the PS AS A generates a status change notification message corresponding to the user A and sends it to the user friend 2;
  • Step 249 the PS AS A generates a status change notification message corresponding to the user A and sends it to the user friend 9;
  • step 2410 the PS AS A generates a status change notification message corresponding to the user A and sends the status change notification message to the user friend 10.
  • steps 243 to 248 are omitted. It should be noted that the order of steps 241 to 2410 can be replaced.
  • FIG. 3C is a schematic diagram of interaction between the presence status notification process in the case where the user A and the user A of the user A belong to different presentation servers according to an embodiment of the present invention.
  • the user A belongs to the PS AS A, and the user belongs to the user.
  • the friend 11 to friend 20 of A belong to another PS AS B, and the presentation status notification method includes:
  • Step 31 user A sends the state change information to the PS AS A to which the user A belongs;
  • Step 32 The PS AS A identifies, by using user state management, that the steady state of the user A changes;
  • Step 33 the PS AS A queries the second buddy list of the user A, and finds that the buddy user friends 11 to 20 of the user A belong to the PS AS B;
  • Step 34 The PS AS A generates a status change notification message corresponding to the user A, and forwards the message to the PS AS B, where the destination URL of the status change notification message is the buddy list identifier of the user A, such as sip:userA_list@ps_serverb;
  • Step 35 After receiving the notification message, the PS AS B determines, according to the URL, that the message is to be sent to all the friends that the user A belongs to the server;
  • Step 36 The PS AS B queries the local user friend relationship, and obtains the user A's friend user. Friends 11 to friends 20;
  • Step 371 the PS AS B generates a status change notification message corresponding to the user A (the user A latest status notification notify) is sent to the user friend 11;
  • Step 372 the PS AS B generates a user A latest state notification notify issued to the user friend 12;
  • Step 379 the PS AS B generates a user A latest state notification notify issued to the user friend 19;
  • Step 3710 PS AS B generates user A's latest status notification notify issued to the user friend 20;
  • Steps 383 to 388 are omitted. It should be noted that the order of steps 381 to 3810 can be replaced.
  • the embodiment of the present invention further provides a presentation status notification device, which is disposed on a presentation server.
  • the presentation status notification device provided by the present invention includes:
  • the user receiving unit 20 is configured to receive the state change information sent by the first user, where the state change information is used to notify the first user of the change of the presence state;
  • the forwarding unit 40 is configured to determine a presence server to which the friend user of the first user belongs, and send, to the friend user belonging to the other presence server, a status change notification message corresponding to the first user to the friend user by using a broadcast message.
  • the presence server sends a status change notification message corresponding to the first user to each friend user through the presence server to which the friend user belongs.
  • the presentation status notification device further includes:
  • the server receiving unit 70 is configured to receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second friend list corresponding to the second user, the subscription user corresponding to the second user in the present presence server;
  • the sending unit 80 is configured to send the second state change notification message received by the server receiving unit 70 to the subscribing user corresponding to the second user.
  • the forwarding unit 40 is further configured to: send, to the buddy user of the home presenting server, a state change notification message of the first user to each of the buddy users of the home present server. And determining, according to the second buddy list corresponding to the first user, the subscription user corresponding to the first user in the present server; and transmitting the status change notification message of the first user to the subscription user corresponding to the first user.
  • the presentation status notification device further includes:
  • the steady state confirmation unit 30 is configured to confirm whether the first user is in a stable state; and in the case that the first user is in a stable state, performing, by using the forwarding unit, the presence server that determines the friend user of the first user belongs to The process of the broadcast message sending the status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs.
  • the steady state confirmation unit 30 includes:
  • the startup module 31 is configured to start a timer. If the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, the first user is determined to be in a stable state;
  • the re-judgment module 32 is configured to restart the timer when the timer expires within a predetermined time and receive the state change notification message corresponding to the first user again, and determine whether the first user is in a stable state again.
  • the presentation status notification device further includes:
  • the buddy list setting unit 10 is configured to establish a first buddy list for the first user belonging to the local server, wherein all the buddy users of the first user are recorded in the first buddy list;
  • the second user belongs to a local server or other server.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • S1 Receive state change information sent by the first user, where the state change information is used to notify the first user of the change of the presence state;
  • the presence server that the buddy user of the first user belongs to is determined, and the buddy user that belongs to the other presence server sends a status change notification message corresponding to the first user to the presence server to which the buddy user belongs. Sending, by the presence server to which the friend user belongs, a state change notification message corresponding to the first user to each friend user.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the PS AS A to which the user A belongs does not need to generate a corresponding number of state change notification messages according to the number of friends of the user A, and respectively pass each friend.
  • the home PS AS sends a status change notification message to each friend of the user A, but merges multiple messages between the PS ASs into one broadcast message, and the PS AS A broadcasts the status of one user A to the PS AS to which each friend belongs.
  • the notification message is changed, and the friend AS of the user A in the local server is respectively notified by the PS AS to which the buddy belongs, thereby reducing the amount of message forwarding between the PS ASs, thereby reducing the amount of information forwarding of the PS AS and improving the PS.
  • the performance of the AS improves the user experience.

Abstract

Disclosed are a presence state notification method and device. The method comprises: receiving a state change notification message corresponding to a first user, wherein the state change notification message is used for notifying a change in a presence state of the first user; determining a presence server to which a friend user of the first user belongs; and with regard to a friend user belonging to another presence server, sending, by means of a broadcast message, the state change notification message corresponding to the first user to the presence server to which the friend user belongs, so as to send the state change notification message corresponding to the first user to various friend users by means of the presence server to which the friend user belongs. By means of the solution of the present invention, the message forwarding amount between presence servers is reduced, thereby reducing the information forwarding amount of a presence server, improving the performance of the presence server and improving the user experience.

Description

一种呈现状态通知方法和装置Presentation status notification method and device 技术领域Technical field
本发明涉及RCS融合消息类领域,尤指一种呈现状态通知方法和装置。The present invention relates to the field of RCS converged message classes, and more particularly to a presentation status notification method and apparatus.
背景技术Background technique
RCS(融合通讯,Rich Communication Suite)定义了基于IMS与现有移动网络的一组业务能力,为移动用户提供增强型地址簿、内容共享、文件传输、增强型消息等功能。RCS (Rich Communication Suite) defines a set of service capabilities based on IMS and existing mobile networks, providing mobile users with enhanced address book, content sharing, file transfer, enhanced messaging and more.
在RCS中,呈现(presence或者presence information)用以传达某一用户通过一组设备进行通信的能力和意愿。常见的及时通信一般为用户提供的可选状态有:联机、忙碌、马上回来、离开、接听电话、外出就餐和显示为脱机。这些状态便称为“呈现状态”,它们表征了用户当前处于的某种状态和用户进行通信的意愿。同时,这些状态还反映出与该用户进行通信的能力。可以通过呈现服务器(PS AS)来管理用户的呈现状态。例如,若用户处于“脱机”状态的话,别的用户便不能用即时消息与之通信,当某一用户的状态变化,呈现服务器需要实时通知该用户的所有好友。In RCS, presence or presence information is used to convey the ability and willingness of a user to communicate through a group of devices. Commonly available timely communications are generally available to users in an optional state: online, busy, coming back soon, leaving, answering calls, eating out and showing offline. These states are called "presentation states" and they represent the state in which the user is currently and the willingness of the user to communicate. At the same time, these states also reflect the ability to communicate with the user. The presentation state of the user can be managed by a presence server (PS AS). For example, if the user is in the "offline" state, other users cannot communicate with the instant message. When the state of a certain user changes, the presence server needs to notify all friends of the user in real time.
一个最简单的呈现状态的通知过程如图1所示:一个用户A订阅(SUBSCRIBE)他感兴趣的另一用户B的呈现状态,用户B接受订阅请求之后,每次用户B的呈现状态发生变化之后,用户B会发布(PUBLISH)自己新的呈现状态,这个新的呈现状态会通过呈现服务器通知(NOTIFY)给用户A。The notification process of one of the simplest presentation states is as shown in FIG. 1: one user A subscribes to (SUBSCRIBE) the presentation state of another user B he is interested in, and after user B accepts the subscription request, each time user B's presentation state changes. After that, User B will post (PUBLISH) its own new presentation state, and this new presentation state will be given to User A by the presence server notification (NOTIFY).
在用户B有多个好友订阅用户B的呈现状态的情况下,用户B对应的呈现服务器会生成多个用户B的呈现状态通知消息,分别发送给用户B的多个好友。In the case that the user B has multiple friends subscribed to the presence status of the user B, the presence server corresponding to the user B generates a plurality of user B's presence status notification messages, which are respectively sent to the plurality of friends of the user B.
当用户规模达到一定数量,在移动网络信号不稳定导致状态切换频繁 时,状态通知消息会急增,各呈现服务器(PS AS,presence server)之间的通知消息转发就会成为瓶颈,影响用户体验。When the user scale reaches a certain amount, the unstable signal in the mobile network leads to frequent state switching. The status notification message will increase rapidly, and the notification message forwarding between each presentation server (PS AS, presence server) will become a bottleneck, affecting the user experience.
发明内容Summary of the invention
为了解决上述问题,本发明实施例提出了一种呈现状态通知方法和装置,能够提高。In order to solve the above problem, the embodiment of the present invention provides a method and apparatus for presenting a notification state, which can be improved.
为了达到上述目的,本发明实施例提出了一种呈现状态通知方法,所述方法包括:In order to achieve the above object, an embodiment of the present invention provides a presentation status notification method, where the method includes:
接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;Receiving state change information sent by the first user; wherein the state change information is used to notify the first user of a change in the presentation state;
确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器,以通过各个好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。Determining, by the buddy user belonging to the other presence server, the status change notification message corresponding to the first user to the presence server to which the buddy user of the first user belongs, The status change notification message corresponding to the first user is sent to each friend user by the presence server that is logged by each friend user.
优选地,所述呈现状态通知方法还包括:Preferably, the presentation status notification method further includes:
接收其他呈现服务器发送的第二用户对应的第二状态变化通知消息,根据第二用户对应的第二好友列表,确定本呈现服务器中第二用户对应的订阅用户;Receiving a second state change notification message corresponding to the second user sent by the other presence server, and determining, according to the second friend list corresponding to the second user, the subscription user corresponding to the second user in the presence server;
将所述第二状态变化通知消息发送给所述第二用户对应的订阅用户。And sending the second state change notification message to a subscription user corresponding to the second user.
优选地,在所述确定第一用户的好友用户所归属的呈现服务器之后,所述呈现状态通知方法还包括:Preferably, after the determining the presence server to which the friend user of the first user belongs, the presentation status notification method further includes:
对于归属本呈现服务器的好友用户,向归属本呈现服务器的各个好友用户分别下发第一用户的状态变化通知消息。The status change notification message of the first user is delivered to each of the friend users of the home present server.
优选地,在所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器之前,所述呈现状态通知方法还包括: Preferably, before the presenting server that determines that the buddy user of the first user belongs to send the status change notification message corresponding to the first user to the presence server to which the buddy user of the first user belongs by using the broadcast message, the presenting The status notification method also includes:
确认第一用户是否处于稳定状态;Confirm whether the first user is in a stable state;
在所述第一用户处于稳定状态的情况下,执行所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器的步骤。And performing, in the case that the first user is in a stable state, performing the determining, by the presence server of the first user, the status change notification message corresponding to the first user by using a broadcast message to the friend user of the first user. The step of the owned presence server.
优选地,所述确认第一用户是否处于稳定状态包括:Preferably, the confirming whether the first user is in a stable state comprises:
启动定时器,如果在定时器计时到达预定时间时,如果没有再次接收到第一用户对应的状态变化通知消息,则判定第一用户处于稳定状态;The timer is started, and if the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, it is determined that the first user is in a stable state;
如果在定时器计时到达预定时间内,如果再次接收到第一用户对应的状态变化通知消息,则重新启动定时器,并再次判断第一用户是否处于稳定状态。If the timer change timer is received within the predetermined time, if the state change notification message corresponding to the first user is received again, the timer is restarted, and it is determined again whether the first user is in a stable state.
优选地,在所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器之前,所述呈现状态通知方法包括:Preferably, before the presenting server that determines that the buddy user of the first user belongs to send the status change notification message corresponding to the first user to the presence server to which the buddy user of the first user belongs by using the broadcast message, the presenting Status notification methods include:
针对归属于本地服务器的第一用户建立第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;以及,Establishing a first buddy list for the first user belonging to the local server, wherein all buddy users of the first user are recorded in the first buddy list;
当归属于本地服务器的第一用户与第二用户是好友关系时,针对所述第二用户建立第二好友列表,其中,第二好友列表中记录了第二用户在本地呈现服务器中的好友用户,所述第二用户归属于本地服务器或其他服务器。Establishing a second buddy list for the second user when the first user and the second user are in a buddy relationship, wherein the second buddy list records the buddy user of the second user in the local presence server. The second user belongs to a local server or other server.
为了达到上述目的,本发明实施例还提出了一种呈现状态通知装置,设置在呈现服务器上,所述装置包括:In order to achieve the above object, an embodiment of the present invention further provides a presentation status notification device, which is disposed on a presence server, and the device includes:
用户接收单元,设置为接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;a user receiving unit, configured to receive state change information sent by the first user; wherein the state change information is used to notify the first user of a change in the presentation state;
转发单元,设置为确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器,以通过各个好友用户归属的呈现服务器,将第 一用户对应的状态变化通知消息发送给各个好友用户。The forwarding unit is configured to determine a presence server to which the friend user of the first user belongs, and send a status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs by using a broadcast message, so as to pass each friend user. Affiliated rendering server, will be A status change notification message corresponding to a user is sent to each friend user.
优选地,所述呈现状态通知装置还包括:Preferably, the presence status notification device further includes:
服务器接收单元,设置为接收其他呈现服务器发送的第二用户对应的第二状态变化通知消息,根据第二用户对应的第二好友列表,确定本呈现服务器中第二用户对应的订阅用户;a server receiving unit, configured to receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second friend list corresponding to the second user, a subscription user corresponding to the second user in the present presentation server;
下发单元,设置为将所述第二状态变化通知消息发送给所述第二用户对应的订阅用户。The sending unit is configured to send the second state change notification message to the subscribing user corresponding to the second user.
优选地,所述转发单元还设置为:对于归属本呈现服务器的好友用户,向归属本呈现服务器的各个好友用户分别下发第一用户的状态变化通知消息。Preferably, the forwarding unit is further configured to: send, to the buddy user of the home present server, a state change notification message of the first user to each of the buddy users of the home present server.
优选地,所述呈现状态通知装置还包括:Preferably, the presence status notification device further includes:
稳定状态确认单元,设置为确认第一用户是否处于稳定状态;在所述第一用户处于稳定状态的情况下,通过转发单元执行所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器的过程。a steady state confirmation unit, configured to confirm whether the first user is in a stable state; and in the case that the first user is in a stable state, performing, by the forwarding unit, the presence server that determines the friend user of the first user belongs to, by broadcasting The process of sending a status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs.
优选地,所述稳定状态确认单元包括:Preferably, the steady state confirmation unit comprises:
启动模块,设置为启动定时器,如果在定时器计时到达预定时间时,如果没有再次接收到第一用户对应的状态变化通知消息,则判定第一用户处于稳定状态;The startup module is configured to start a timer. If the timer change time is reached, if the state change notification message corresponding to the first user is not received again, it is determined that the first user is in a stable state;
重判模块,设置为在定时器计时到达预定时间内,再次接收到第一用户对应的状态变化通知消息的情况下,则重新启动定时器,并再次判断第一用户是否处于稳定状态。The re-judgment module is configured to restart the timer when the timer expires within a predetermined time and receive the state change notification message corresponding to the first user again, and determine whether the first user is in a stable state again.
优选地,所述呈现状态通知装置还包括:Preferably, the presence status notification device further includes:
好友列表设置单元,设置为针对归属于本地服务器的第一用户建立第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;以及,a buddy list setting unit, configured to establish a first buddy list for a first user belonging to the local server, wherein all buddy users of the first user are recorded in the first buddy list;
当归属于本地服务器的第一用户与第二用户是好友关系时,针对所述 第二用户建立第二好友列表,其中,第二好友列表中记录了第二用户在本地呈现服务器中的好友用户,所述第二用户归属于本地服务器或其他服务器。When the first user belonging to the local server is in a friend relationship with the second user, The second user establishes a second buddy list, wherein the second buddy list records the buddy user of the second user in the local presence server, and the second user belongs to the local server or other server.
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is arranged to store program code for performing the following steps:
接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给所述好友用户所归属的呈现服务器,以通过所述好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。Receiving state change information sent by the first user; wherein: the state change information is used to notify the first user of the change of the presence state; determining the presence server to which the friend user of the first user belongs, for the friend user belonging to the other presence server, Sending, by using a broadcast message, a status change notification message corresponding to the first user to the presence server to which the friend user belongs, to send a status change notification message corresponding to the first user to each friend by using the presence server to which the friend user belongs. user.
与现有技术相比,本发明实施例提供的技术方案包括:接收第一用户对应的状态变化通知消息;其中;状态变化通知消息用于通知第一用户的呈现状态的变化;确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给所述好友用户所归属的呈现服务器,以通过所述好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。Compared with the prior art, the technical solution provided by the embodiment of the present invention includes: receiving a state change notification message corresponding to the first user; wherein the state change notification message is used to notify the first user of the change of the presence state; determining the first user The presence server to which the buddy user belongs, for the buddy user belonging to the other presentation server, sends a status change notification message corresponding to the first user to the presence server to which the buddy user belongs by using the broadcast message to pass the buddy user. The belonging presentation server sends a status change notification message corresponding to the first user to each friend user.
通过本发明实施例的方案,当任一用户A的呈现状态发生变化时,用户A归属的PS AS A不需要根据用户A的好友数目,生成对应数目的状态变化通知消息,并分别通过各个好友归属的PS AS将状态变化通知消息发送给用户A的各个好友,而是把PS AS间多条消息转发合并成一条广播消息,PS AS A分别向各个好友归属的PS AS广播一条用户A的状态变化通知消息,并通过各个好友归属的PS AS,分别通知本地服务器中的用户A的好友用户,从而减少了PS AS之间的消息转发量,从而减少了PS AS的信息转发量,提高了PS AS的性能,改善了用户体验。 With the solution of the embodiment of the present invention, when the presence status of any user A changes, the PS AS A to which the user A belongs does not need to generate a corresponding number of state change notification messages according to the number of friends of the user A, and respectively pass each friend. The home PS AS sends a status change notification message to each friend of the user A, but merges multiple messages between the PS ASs into one broadcast message, and the PS AS A broadcasts the status of one user A to the PS AS to which each friend belongs. The notification message is changed, and the friend AS of the user A in the local server is respectively notified by the PS AS to which the buddy belongs, thereby reducing the amount of message forwarding between the PS ASs, thereby reducing the amount of information forwarding of the PS AS and improving the PS. The performance of the AS improves the user experience.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1为现有技术提供的一种呈现状态通知方法的流程图;FIG. 1 is a flowchart of a method for notifying a presence status provided by the prior art;
图2A和图2B为本发明实施例提供的一种呈现状态通知方法的流程图;2A and 2B are flowcharts of a method for notifying a presence status according to an embodiment of the present invention;
图3A、图3B、图3C分别为本发明实施例提供的一种呈现状态通知方法的流程图;3A, 3B, and 3C are flowcharts of a method for notifying a presence status according to an embodiment of the present invention;
图4为本发明实施例提供的一种呈现状态通知装置的结构组成示意图。FIG. 4 is a schematic structural diagram of a presentation status notification apparatus according to an embodiment of the present invention.
具体实施方式detailed description
为了便于本领域技术人员的理解,下面结合附图对本发明作进一步的描述,并不能用来限制本发明的保护范围。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的各种方式可以相互组合。In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings, and is not intended to limit the scope of the present invention. It should be noted that the embodiments in the present application and the various manners in the embodiments may be combined with each other without conflict.
参见图2A,本发明提出了一种呈现状态通知方法,所述方法包括:Referring to FIG. 2A, the present invention provides a presentation status notification method, and the method includes:
步骤200,第一呈现服务器接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;Step 200: The first presence server receives the state change information sent by the first user, where the state change information is used to notify the first user of the change of the presence state.
步骤400,确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器,以通过各个好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。Step 400: Determine a presence server to which the buddy user of the first user belongs, and send a status change notification message corresponding to the first user to the presence server to which the buddy user of the first user belongs by using a broadcast message, so as to belong to each buddy user. The presence server sends a status change notification message corresponding to the first user to each friend user.
其中,对于归属本呈现服务器的好友用户,直接下发第一用户的状态变化通知消息;对于归属于其他呈现服务器的好友用户,通过广播消息将 第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器,以通过各个好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。The status change notification message of the first user is directly delivered to the buddy user belonging to the present presence server; for the buddy user belonging to other presentation servers, the broadcast message will be The status change notification message corresponding to the first user is sent to the presence server to which the friend user of the first user belongs, to send the status change notification message corresponding to the first user to each friend user through the presence server to which each friend user belongs.
本发明实施例中,在需要转状态变化通知消息给其他呈现服务器时,相对于现有技术中针对各个好友用户分别发送的方式,本发明实施例采用合并状态变化通知消息的方式来转发,通过广播消息,分别给每个不同的呈现服务器只发一条第一用户对应的状态变化通知消息,由各个好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息分发给本地所有好友用户。In the embodiment of the present invention, when the status change notification message is required to be sent to other presentation servers, the embodiment of the present invention forwards the status change notification message by using a merge status change notification message. The broadcast message is sent to each of the different presentation servers, and a status change notification message corresponding to the first user is sent, and the status change notification message corresponding to the first user is distributed to all local friend users.
本发明实施例中,步骤400中,通过各个好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户包括:In the embodiment of the present invention, in step 400, the status change notification message corresponding to the first user is sent to each friend user by using a presence server to which each friend user belongs:
步骤411,第一呈现服务器生成对应的状态变化通知消息;Step 411: The first presence server generates a corresponding state change notification message.
步骤412,在第一用户的好友用户归属于第一呈现服务器的情况下,第一呈现服务器将状态变化通知消息发送给归属本地呈现服务器的第一用户的好友用户;Step 412: If the first user's friend user belongs to the first presence server, the first presence server sends a state change notification message to the friend user of the first user of the home local presence server.
步骤413,在第一用户的好友用户归属于其他呈现服务器的情况下,第一呈现服务器将状态变化通知消息发送给第一用户的好友用户归属的其他呈现服务器。Step 413: If the friend user of the first user belongs to another presence server, the first presence server sends a state change notification message to another presence server to which the friend user of the first user belongs.
下面结合一个具体的例子对状态变化通知消息的发送进行说明。The transmission of the state change notification message will be described below in conjunction with a specific example.
用户A归属于呈现服务器A,用户A有30个好友,其中,好友1~好友10跟用户A归属于呈现服务器A,好友11~好友20归属于呈现服务器B,好友21~好友30归属于呈现服务器C,当第一呈现服务器接收到用户A发送的状态变化通知消息时,呈现服务器A将用户A对应的状态变化通知消息发送给好友1~好友10,呈现服务器A将用户A对应的状态变化通知消息分别发送给呈现服务器B和呈现服务器C,从而通过呈现服务器B将用户A对应的状态变化通知消息发送给好友11~好友20,以及通过呈现服务器C将用户A对应的状态变化通知消息发送给好友 21~好友30。User A belongs to the presence server A, and user A has 30 friends. Among them, the friends 1 to 10 and the user A belong to the presentation server A, the friends 11 to 20 belong to the presentation server B, and the friends 21 to 30 belong to the presentation. The server C sends the status change notification message corresponding to the user A to the friend 1 to the friend 10 when the first presence server receives the status change notification message sent by the user A, and the presence server A changes the status corresponding to the user A. The notification message is sent to the presence server B and the presence server C respectively, so that the status change notification message corresponding to the user A is sent to the friends 11 to 20 through the presence server B, and the status change notification message corresponding to the user A is sent by the presence server C. To a friend 21 to friend 30.
参见图2B,本发明实施例中,所述呈现状态通知方法还包括:Referring to FIG. 2B, in the embodiment of the present invention, the presentation status notification method further includes:
步骤700,接收其他呈现服务器发送的第二用户对应的第二状态变化通知消息,根据第二用户对应的第二好友列表,确定本呈现服务器中第二用户对应的订阅用户;Step 700: Receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second buddy list corresponding to the second user, the subscription user corresponding to the second user in the presence server;
步骤800,将所述第二状态变化通知消息发送给所述第二用户对应的订阅用户。Step 800: Send the second state change notification message to a subscription user corresponding to the second user.
下面介绍另一种方式实现状态变化通知消息的发送。The following describes another way to implement the sending of a status change notification message.
本发明实施例中,步骤400中,通过各个好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户包括:In the embodiment of the present invention, in step 400, the status change notification message corresponding to the first user is sent to each friend user by using a presence server to which each friend user belongs:
步骤421,第一呈现服务器生成对应的状态变化通知消息;Step 421: The first presence server generates a corresponding state change notification message.
步骤422,第一呈现服务器将状态变化通知消息发送给归属本地呈现服务器的第一用户的好友用户;Step 422: The first presence server sends a state change notification message to the friend user of the first user of the home local presence server.
步骤423,第一呈现服务器将状态变化通知消息通过广播消息的形式发送给其他呈现服务器。Step 423: The first presence server sends the state change notification message to other presentation servers in the form of a broadcast message.
下面结合一个具体的例子对状态变化通知消息的发送进行说明。The transmission of the state change notification message will be described below in conjunction with a specific example.
用户A归属于呈现服务器A,用户A有30个好友,其中,好友1~好友10跟用户A归属于呈现服务器A,好友11~好友20归属于呈现服务器B,好友21~好友30归属于呈现服务器C,当第一呈现服务器接收到用户A发送的状态变化通知消息时,呈现服务器A将用户A对应的状态变化通知消息发送给好友1~好友10,呈现服务器A将状态变化通知消息通过广播消息的形式发送给其他呈现服务器,包括呈现服务器B、呈现服务器C、呈服务器D、和呈现服务器E,User A belongs to the presence server A, and user A has 30 friends. Among them, the friends 1 to 10 and the user A belong to the presentation server A, the friends 11 to 20 belong to the presentation server B, and the friends 21 to 30 belong to the presentation. The server C sends the status change notification message corresponding to the user A to the friend 1 to the friend 10 when the first presence server receives the status change notification message sent by the user A. The presence server A broadcasts the status change notification message through the broadcast. The message is sent to other presence servers, including the presence server B, the presence server C, the server D, and the presence server E,
呈现服务器B接收到用户A对应的状态变化通知消息之后,判断本地归属用户中是否包括用户A的好友用户(订阅用户),如果有,则将用户A对应的状态变化通知消息发送给用户A的好友用户,如果没有,则 将用户A对应的状态变化通知消息丢弃,由于好友11~好友20归属于呈现服务器B,因此呈现服务器B将用户A对应的状态变化通知消息发送给好友11~好友20,同样地,通过呈现服务器C将用户A对应的状态变化通知消息发送给好友21~好友30。After receiving the status change notification message corresponding to the user A, the presence server B determines whether the local user includes the friend user (subscriber user) of the user A, and if so, sends the status change notification message corresponding to the user A to the user A. Friend user, if not, then The status change notification message corresponding to the user A is discarded. Since the buddy 11 to the buddy 20 are attributed to the presence server B, the presence server B sends the status change notification message corresponding to the user A to the buddy 11 to the buddy 20, and similarly, through the presence server. C sends the status change notification message corresponding to the user A to the friends 21 to 30.
呈服务器D接收到用户A对应的状态变化通知消息之后,判断本地归属用户中是否包括用户A的好友用户(订阅用户),判断结果,则将用户A对应的状态变化通知消息发送给用户A的好友,如果没有,则将用户A对应的状态变化通知消息丢弃,由于用户A没有好友归属于呈现服务器C,因此呈现服务器C将用户A对应的状态变化通知消息丢弃,同样地,呈现服务器D将用户A对应的状态变化通知消息丢弃。After receiving the status change notification message corresponding to the user A, the server D determines whether the local user includes the friend user (subscriber user) of the user A. If the result is determined, the status change notification message corresponding to the user A is sent to the user A. A friend, if not, discards the status change notification message corresponding to the user A. Since the user A has no friends attributed to the presence server C, the presence server C discards the status change notification message corresponding to the user A. Similarly, the presence server D will The status change notification message corresponding to user A is discarded.
现有技术中,当用户A的状态有变化时,用户A归属的PS AS A会生成30个用户A的状态变化通知消息,分别发送给用户A的30个好友,PS AS A转发10个通知消息给PS AS B,同时PS AS A转发10个通知消息给PS AS C。本发明实施例提供的呈现状态通知方法,把PS AS间多条消息转发合并成一条广播消息,PS AS A分别向PS AS B、PS AS C广播一条用户A的状态变化通知消息,并通过PS AS B、PS AS C分别在本地服务器中的用户A的好友用户,通过上述呈现状态通知方法,减少了PS AS之间的消息转发量,从而减少了PS AS的信息转发量,提高了PS AS的性能,改善了用户体验。In the prior art, when the status of the user A changes, the PS AS A to which the user A belongs generates 30 state change notification messages of the user A, and respectively sends them to the 30 friends of the user A, and the PS AS A forwards 10 notifications. The message is sent to PS AS B, and PS AS A forwards 10 notification messages to PS AS C. The presentation status notification method provided by the embodiment of the present invention combines multiple messages between the PS ASs into one broadcast message, and the PS AS A broadcasts a status change notification message of the user A to the PS AS B and the PS AS C respectively, and passes the PS. AS B and PS AS C respectively use the presence status notification method of the user A of the user A in the local server to reduce the amount of message forwarding between the PS ASs, thereby reducing the amount of information forwarding of the PS AS and improving the PS AS. Performance improves the user experience.
本发明实施例中,在步骤400之前,所述呈现状态通知方法包括:In the embodiment of the present invention, before the step 400, the presentation status notification method includes:
步骤100;针对归属于本地服务器的第一用户建立第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;以及,Step 100: Establish a first buddy list for the first user that belongs to the local server, where all buddy users of the first user are recorded in the first buddy list;
当归属于本地服务器的第一用户与第二用户是好友关系时,针对所述第二用户建立第二好友列表,其中,第二好友列表中记录了第二用户在本地呈现服务器中的好友用户,所述第二用户归属于本地服务器或其他服务器。Establishing a second buddy list for the second user when the first user and the second user are in a buddy relationship, wherein the second buddy list records the buddy user of the second user in the local presence server. The second user belongs to a local server or other server.
也就是说,本发明实施例中,针对任一个用户A,均建立并维护对应 的第一好友列表和第二好友列表,其中,第一好友列表存储在用户A对应的呈现服务器上,第一好友列表中记录用户A的全部好友用户,以及各个好友用户归属的呈现服务器;在所述各个好友用户归属的呈现服务器中,分别存储有用户A对应的第二好友列表;第二好友列表中记录用户A在本地呈现服务器中的好友用户。That is to say, in the embodiment of the present invention, for any user A, the corresponding correspondence is established and maintained. a first buddy list and a second buddy list, wherein the first buddy list is stored on the presence server corresponding to the user A, the first buddy list records all the buddy users of the user A, and the presentation server to which each buddy user belongs; The second buddy list corresponding to the user A is stored in the presentation server to which the buddy users belong, and the buddy user in the local presence server is recorded in the second buddy list.
本发明实施例中,在第二用户是第一用户的好友用户时,默认第二用户是第一用户的订阅用户为例进行了说明,也就是说,对于针对第一用户建立的第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;即,第一好友列表中记录第一用户的全部订阅用户,对于针对第一用户建立的第二好友列表,第二好友列表中记录了第一用户在本地呈现服务器中的好友用户,即第二好友列表中记录了第一用户在本地呈现服务器中的订阅用户。In the embodiment of the present invention, when the second user is the friend user of the first user, the default second user is the subscription user of the first user as an example, that is, for the first friend established for the first user. a list in which all the buddy users of the first user are recorded in the first buddy list; that is, all the subscribing users of the first user are recorded in the first buddy list, and the second buddy list is selected for the second buddy list established for the first user. The friend user of the first user in the local presence server is recorded, that is, the subscription user of the first user in the local presence server is recorded in the second friend list.
因此,本发明实施例中,以好友用户和订阅用户表达相同的含义为例进行了说明。此外,可以对好友用户和订阅用户进行却区分,订阅用户为好友用户的自己,例如,某个第一用户可以订阅自己部分好友用户的呈现状态,在这种情况下,第一好友列表设置为记录第一用户的全部订阅用户,第二好友列表设置为记录了第一用户在本地呈现服务器中的订阅用户,呈现服务器根据,第一好友列表和第二好友列表中记录的订阅用户进行状态变化通知消息的转发。Therefore, in the embodiment of the present invention, the same meaning is expressed by the buddy user and the subscribing user as an example. In addition, the buddy user and the subscribing user can be distinguished, and the subscribing user is the buddy user's own self. For example, a certain first user can subscribe to the presentation status of some of the buddy users. In this case, the first buddy list is set to Recording all subscribers of the first user, the second buddy list is set to record the subscribers of the first user in the local presence server, and the presence server changes the status according to the subscription users recorded in the first buddy list and the second buddy list. The forwarding of notification messages.
下面结合一个具体的例子对第一好友列表和第二好友列表进行说明。The first buddy list and the second buddy list are described below in conjunction with a specific example.
用户A有30个好友,用户A有对应的呈现服务器A中存储有第一好友列表,第一好友列表中记录用户A的30个好友用户,以及30个好友用户分别对应的呈现服务器;其中,第一好友列表中记录了好友1~好友10跟用户A归属于同一个呈现服务器A,好友11~好友20归属于呈现服务器B,好友21~好友30归属于呈现服务器C,在呈现服务器A中,记录了用户A对应的一个第二好友列表,该第二好友列表记录了用户A的全部好友用户中归属于呈现服务器A的好友1~好友10;在呈现服务器B 中,记录了用户A对应的另一个第二好友列表,该第二好友列表记录了用户A的全部好友用户中归属于呈现服务器B的好友11~好友20;在呈现服务器C中,记录了用户A对应的又一个第二好友列表,该第二好友列表记录了用户A的全部好友用户中归属于呈现服务器C的好友21~好友30。User A has 30 buddies, user A has a corresponding buddy server A, and a first buddy list is stored in the first buddy server A, and 30 buddy users corresponding to user A and 30 buddy users respectively. The first friend list records that the friends 1 to 10 are in the same presentation server A as the user A, the friends 11 to 20 are attributed to the presence server B, and the friends 21 to 30 are attributed to the presence server C, in the presence server A. Recording a second buddy list corresponding to the user A, the second buddy list recording the friends 1 to 10 of the all the buddy users of the user A belonging to the presence server A; The second buddy list corresponding to the user A is recorded, and the second buddy list records the buddy 11 to the buddy 20 belonging to the presence server B among all the buddy users of the user A; in the presence server C, the user is recorded. A second buddy list corresponding to A, the second buddy list records friends 21 to 30 belonging to the presence server C among all the buddy users of the user A.
其中,第一好友列表为好友关系表,第二好友列表为用户被关注表,当用户A新增一个好友用户B时,用户A归属的PS AS A在好友关系表中新增保存一条记录(用户A,好友用户B),同时好友用户B归属的PS AS B在用户A对应的被关注表中也新增保存一条记录(好友用户A,用户B)。The first buddy list is a friend relationship table, and the second buddy list is a user attention table. When user A adds a friend user B, the PS AS A to which the user A belongs adds a new record in the friend relationship table. User A, buddy B), and the PS AS B to which the buddy B belongs is also added a record (friend user A, user B) in the attention table corresponding to user A.
本发明实施例中,呈现服务器A生成对应的状态变化通知消息通过广播消息的格式发送给其他的呈现服务器,广播消息的URL设置为用户A好友列表标识,如sip:userA_list@ps_serverb,呈现服务器B收到这条通知消息后,根据URL判断这条消息要发给用户A归属于本地呈现服务器上的所有好友,呈现服务器B查询本地用户A的第二好友列表,得到用户A的好友用户好友11~好友20,然后把该状态变化通知消息分别下发给好友11~好友20。In the embodiment of the present invention, the presence server generates a corresponding state change notification message and sends the message to the other presentation server in the format of the broadcast message. The URL of the broadcast message is set to the user A buddy list identifier, such as sip:userA_list@ps_serverb, and the presentation server B After receiving the notification message, it is determined according to the URL that the message is to be sent to the user A to all the friends on the local presence server, and the presence server B queries the second friend list of the local user A to obtain the friend user friend 11 of the user A. The friend 20 is sent to the friend 11 to the friend 20 respectively.
本发明实施例中,在步骤400之前,所述呈现状态通知方法还包括:In the embodiment of the present invention, before the step 400, the presentation status notification method further includes:
步骤300、确认第一用户是否处于稳定状态;在所述第一用户处于稳定状态的情况下,执行步骤400;否则,跳转至步骤200; Step 300, confirm whether the first user is in a stable state; in the case that the first user is in a steady state, step 400 is performed; otherwise, jump to step 200;
本发明实施例中,在步骤300中,所述确认第一用户是否处于稳定状态包括:In the embodiment of the present invention, in step 300, the confirming whether the first user is in a stable state includes:
启动定时器,如果在定时器计时到达预定时间时,如果没有再次接收到第一用户对应的状态变化通知消息,则判定第一用户处于稳定状态;The timer is started, and if the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, it is determined that the first user is in a stable state;
如果在定时器计时到达预定时间内,如果再次接收到第一用户对应的状态变化通知消息,则重新启动定时器,并再次判断第一用户是否处于稳定状态。 If the timer change timer is received within the predetermined time, if the state change notification message corresponding to the first user is received again, the timer is restarted, and it is determined again whether the first user is in a stable state.
下面结合一个具体的例子对步骤300中确认第一用户是否处于稳定状态的过程进行说明。The process of confirming whether the first user is in a stable state in step 300 will be described below in conjunction with a specific example.
在呈现服务器中设置状态内存表和临时状态内存表,其中,状态内存表用于记录用户的稳定状态下的呈现状态,临时状态内存表用于记录用户的稳定状态之前的呈现状态;如果用户在状态内存表中记录的呈现状态发生变化,用户归属的呈现服务器将开启用户的状态变化的通知流程。例如,当用户A状态发生变化时,服务器缓存该用户状态变化信息至临时状态内存表,并设置一个状态持续定时器(如2分钟),如果定时器到(2分钟后)该状态一直保持,没有再发生切换变化,系统则确认该状态为终端的最新稳定状态,从临时状态内存表中取出该信息,更新系统保存的状态内存表,并进行下一步通知其他好友用户的流程,同时删除临时状态内存表中缓存的用户状态变化信息。如果在定时未到之前(2分钟内)系统又收到该用户的状态变化,则系统认为之前该用户的状态变化是一个临时、短暂性的状态变化,从临时状态内存表中删除之前缓存的用户状态变化信息及相应的定时器,重新缓存该用户最新的状态变化信息到临时状态内存表,并设置相应的定时器,并等待确认是否为稳定状态。Setting a state memory table and a temporary state memory table in the rendering server, wherein the state memory table is used to record the rendering state of the user in a steady state, and the temporary state memory table is used to record the rendering state before the user's stable state; The presentation state of the record in the state memory table changes, and the presence server to which the user belongs will open the notification process of the user's state change. For example, when the state of the user A changes, the server caches the user state change information to the temporary state memory table, and sets a state duration timer (such as 2 minutes). If the timer expires (after 2 minutes), the state is maintained. If the switch change does not occur again, the system confirms that the status is the latest stable state of the terminal, retrieves the information from the temporary state memory table, updates the state memory table saved by the system, and proceeds to notify other friends of the process of the next step, and deletes the temporary User state change information cached in the state memory table. If the system receives the user's state change again before the timing is reached (within 2 minutes), the system considers that the user's state change is a temporary, transient state change, and deletes the previously cached from the temporary state memory table. The user state change information and the corresponding timer re-cache the latest state change information of the user to the temporary state memory table, set a corresponding timer, and wait for confirmation whether it is a steady state.
本发明实施例提供的呈现状态通知方法中,一方面,通过对用户状态进行管理,识别出用户的稳定状态,过滤掉临时性的用户状态变化信息,避免在移动网络信号不稳定导致状态频繁切换而产生的大量临时状态变化通知;另一方面,在某个用户的呈现状态发生变化,且用户A处于稳定状态时,通过第一好友列表和第二好友列表,在PS AS间广播一条用户A的最新状态消息,来替代用户A给每个好友发送的通知消息,来减少PS AS之间的消息转发量,从而减少了PS AS之间的信息转发量,提高了PS AS的性能,改善了用户体验。In the presentation state notification method provided by the embodiment of the present invention, on the one hand, the user state is managed, the stable state of the user is identified, and the temporary user state change information is filtered out to avoid frequent switching of the state in the mobile network signal instability. And generating a large number of temporary state change notifications; on the other hand, when a user's presence state changes, and user A is in a stable state, a user A is broadcasted between the PS ASs through the first buddy list and the second buddy list. The latest status message replaces the notification message sent by user A to each friend to reduce the amount of message forwarding between PS ASs, thereby reducing the amount of information forwarding between PS ASs, improving the performance of PS AS, and improving user experience.
下面结合具体的实施场景进行说明。The following describes the specific implementation scenarios.
参见图3A,为本发明实施例提出的一种呈现状态通知方法的信令交互示意图,其中,用户A归属于PS AS A,该呈现状态通知方法包括: FIG. 3A is a schematic diagram of a signaling interaction of a method for notifying a presence status according to an embodiment of the present invention. The user A belongs to the PS AS A, and the method for notifying the presence status includes:
步骤11:用户A的呈现状态发生变化时,用户A发送状态变化信息到用户A归属的PS AS A;Step 11: When the presence status of the user A changes, the user A sends the state change information to the PS AS A to which the user A belongs.
步骤12:PS AS A缓存该用户状态变化信息至临时状态内存表,并设置一个状态持续定时器(如2分钟);Step 12: PS AS A caches the user state change information to the temporary state memory table, and sets a state duration timer (eg, 2 minutes);
步骤13:如果定时器到(2分钟后)该状态一直保持,没有再发生切换变化,系统则确认该状态为终端的最新稳定状态;转步骤16进行后续流程处理;Step 13: If the state is maintained after the timer expires (after 2 minutes), the switching change does not occur again, and the system confirms that the state is the latest stable state of the terminal; and proceeds to step 16 for subsequent processing;
步骤14:如果在定时未到之前(2分钟内)系统又收到该用户的状态变化,则从临时状态内存表中删除之前缓存的用户状态变化信息及相应的定时器;Step 14: If the system receives the state change of the user again before the timing is reached (within 2 minutes), the previously cached user state change information and the corresponding timer are deleted from the temporary state memory table;
步骤15:PS AS A重新缓存该用户最新的状态变化信息到临时状态内存表,并设置相应的定时器,转步骤13;Step 15: PS AS A re-caches the latest state change information of the user to the temporary state memory table, and sets a corresponding timer, and proceeds to step 13;
步骤16:从临时状态内存表中取出该信息,更新系统保存的用户状态,删除临时状态内存表中缓存的用户状态变化信息;并进行下一步,通知其他好友用户。Step 16: Extract the information from the temporary state memory table, update the user state saved by the system, delete the user state change information cached in the temporary state memory table, and proceed to the next step to notify other friend users.
参见图3B,为本发明实施例提出的用户A和用户A的好友归属于同一个呈现服务器的情况下,呈现状态通知过程的交互示意图,如图3B所示,用户A及其好友1~好友10归属于同一个PS AS A,该呈现状态通知方法包括:FIG. 3B is a schematic diagram of the interaction of the presence status notification process in the case where the user A and the user A of the user A belong to the same presentation server according to an embodiment of the present invention. As shown in FIG. 3B, the user A and his friends 1 to 10 belongs to the same PS AS A, and the presentation status notification method includes:
步骤21,用户A发送状态变化信息到用户A归属的PS AS A;Step 21, user A sends the state change information to the PS AS A to which the user A belongs;
步骤22,PS AS A通过用户状态管理识别出用户A的稳定状态发生变化。In step 22, the PS AS A recognizes that the steady state of the user A changes through the user state management.
通过用户状态管理识别出用户A的稳定状态发生变化是指,PS AS A接收用户A发送的的状态变化信息,并确认用户A处于稳定状态。It is recognized that the change of the steady state of the user A by the user state management means that the PS AS A receives the state change information sent by the user A, and confirms that the user A is in a stable state.
步骤23,PS AS A查询用户A的第二好友列表,用户A的好友用户好友1~好友10归属于本PS AS A; Step 23, the PS AS A queries the second buddy list of the user A, and the buddy friends 1 to 10 of the user A belong to the PS AS A;
步骤241,PS AS A生成用户A对应的状态变化通知消息下发给用户好友1;Step 241, the PS AS A generates a status change notification message corresponding to the user A and sends it to the user friend 1;
步骤242,PS AS A生成用户A对应的状态变化通知消息下发给用户好友2;Step 242, the PS AS A generates a status change notification message corresponding to the user A and sends it to the user friend 2;
............
步骤249,PS AS A生成用户A对应的状态变化通知消息下发给用户好友9;Step 249, the PS AS A generates a status change notification message corresponding to the user A and sends it to the user friend 9;
步骤2410,PS AS A生成用户A对应的状态变化通知消息下发给用户好友10。In step 2410, the PS AS A generates a status change notification message corresponding to the user A and sends the status change notification message to the user friend 10.
其中,步骤243~步骤248省略。需要说明,步骤241~步骤2410的顺序可以更换。However, steps 243 to 248 are omitted. It should be noted that the order of steps 241 to 2410 can be replaced.
参见图3C,为本发明实施例提出的用户A和用户A的好友归属于不同呈现服务器的情况下,呈现状态通知过程的交互示意图,如图3C所示,用户A归属于PS AS A,用户A的好友11~好友20归属于另一个PS AS B,该呈现状态通知方法包括:FIG. 3C is a schematic diagram of interaction between the presence status notification process in the case where the user A and the user A of the user A belong to different presentation servers according to an embodiment of the present invention. As shown in FIG. 3C, the user A belongs to the PS AS A, and the user belongs to the user. The friend 11 to friend 20 of A belong to another PS AS B, and the presentation status notification method includes:
步骤31,用户A发送状态变化信息到用户A归属的PS AS A;Step 31, user A sends the state change information to the PS AS A to which the user A belongs;
步骤32,PS AS A通过用户状态管理识别出用户A的稳定状态发生变化;Step 32: The PS AS A identifies, by using user state management, that the steady state of the user A changes;
步骤33,PS AS A查询用户A的第二好友列表,发现用户A的好友用户好友11~好友20归属于PS AS B;Step 33, the PS AS A queries the second buddy list of the user A, and finds that the buddy user friends 11 to 20 of the user A belong to the PS AS B;
步骤34,PS AS A生成一条用户A对应的状态变化通知消息,并转发给PS AS B,其中,状态变化通知消息的目的URL为用户A的好友列表标识,如sip:userA_list@ps_serverb;Step 34: The PS AS A generates a status change notification message corresponding to the user A, and forwards the message to the PS AS B, where the destination URL of the status change notification message is the buddy list identifier of the user A, such as sip:userA_list@ps_serverb;
步骤35,PS AS B收到这条通知消息后,根据URL判断这条消息要发给用户A归属于本服务器上的所有好友;Step 35: After receiving the notification message, the PS AS B determines, according to the URL, that the message is to be sent to all the friends that the user A belongs to the server;
步骤36,PS AS B查询本地用户好友关系,得到用户A的好友用户好 友11~好友20;Step 36: The PS AS B queries the local user friend relationship, and obtains the user A's friend user. Friends 11 to friends 20;
步骤371,PS AS B生成用户A对应的状态变化通知消息(用户A最新的状态通知notify)下发给用户好友11;Step 371, the PS AS B generates a status change notification message corresponding to the user A (the user A latest status notification notify) is sent to the user friend 11;
步骤372,PS AS B生成用户A最新的状态通知notify下发给用户好友12;Step 372, the PS AS B generates a user A latest state notification notify issued to the user friend 12;
............
步骤379,PS AS B生成用户A最新的状态通知notify下发给用户好友19;Step 379, the PS AS B generates a user A latest state notification notify issued to the user friend 19;
步骤3710,PS AS B生成用户A最新的状态通知notify下发给用户好友20;Step 3710, PS AS B generates user A's latest status notification notify issued to the user friend 20;
其中,步骤383~步骤388省略。需要说明,步骤381~步骤3810的顺序可以更换。Steps 383 to 388 are omitted. It should be noted that the order of steps 381 to 3810 can be replaced.
基于与上述实施例相同或相似的构思,本发明实施例还提供一种呈现状态通知装置,设置在呈现服务器上,参见图4,本发明提出的呈现状态通知装置包括:Based on the same or similar concepts as the above embodiments, the embodiment of the present invention further provides a presentation status notification device, which is disposed on a presentation server. Referring to FIG. 4, the presentation status notification device provided by the present invention includes:
用户接收单元20,设置为接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;The user receiving unit 20 is configured to receive the state change information sent by the first user, where the state change information is used to notify the first user of the change of the presence state;
转发单元40,设置为确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给所述好友用户所归属的呈现服务器,以通过所述好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。The forwarding unit 40 is configured to determine a presence server to which the friend user of the first user belongs, and send, to the friend user belonging to the other presence server, a status change notification message corresponding to the first user to the friend user by using a broadcast message. The presence server sends a status change notification message corresponding to the first user to each friend user through the presence server to which the friend user belongs.
本发明实施例中,所述呈现状态通知装置还包括:In the embodiment of the present invention, the presentation status notification device further includes:
服务器接收单元70,设置为接收其他呈现服务器发送的第二用户对应的第二状态变化通知消息,根据第二用户对应的第二好友列表,确定本呈现服务器中第二用户对应的订阅用户; The server receiving unit 70 is configured to receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second friend list corresponding to the second user, the subscription user corresponding to the second user in the present presence server;
下发单元80,设置为将服务器接收单元70接收的第二状态变化通知消息发送给所述第二用户对应的订阅用户。The sending unit 80 is configured to send the second state change notification message received by the server receiving unit 70 to the subscribing user corresponding to the second user.
优选地,所述转发单元40还设置为:对于归属本呈现服务器的好友用户,向归属本呈现服务器的各个好友用户分别下发第一用户的状态变化通知消息。其中,根据第一用户对应的第二好友列表,确定本呈现服务器中第一用户对应的订阅用户;并将第一用户的状态变化通知消息下发给第一用户对应的订阅用户。Preferably, the forwarding unit 40 is further configured to: send, to the buddy user of the home presenting server, a state change notification message of the first user to each of the buddy users of the home present server. And determining, according to the second buddy list corresponding to the first user, the subscription user corresponding to the first user in the present server; and transmitting the status change notification message of the first user to the subscription user corresponding to the first user.
本发明实施例中,所述呈现状态通知装置还包括:In the embodiment of the present invention, the presentation status notification device further includes:
稳定状态确认单元30,设置为确认第一用户是否处于稳定状态;在所述第一用户处于稳定状态的情况下,通过转发单元执行所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器的过程。The steady state confirmation unit 30 is configured to confirm whether the first user is in a stable state; and in the case that the first user is in a stable state, performing, by using the forwarding unit, the presence server that determines the friend user of the first user belongs to The process of the broadcast message sending the status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs.
本发明实施例中,所述稳定状态确认单元30包括:In the embodiment of the present invention, the steady state confirmation unit 30 includes:
启动模块31,设置为启动定时器,如果在定时器计时到达预定时间时,如果没有再次接收到第一用户对应的状态变化通知消息,则判定第一用户处于稳定状态;The startup module 31 is configured to start a timer. If the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, the first user is determined to be in a stable state;
重判模块32,设置为在定时器计时到达预定时间内,再次接收到第一用户对应的状态变化通知消息的情况下,则重新启动定时器,并再次判断第一用户是否处于稳定状态。The re-judgment module 32 is configured to restart the timer when the timer expires within a predetermined time and receive the state change notification message corresponding to the first user again, and determine whether the first user is in a stable state again.
本发明实施例中,所述呈现状态通知装置还包括:In the embodiment of the present invention, the presentation status notification device further includes:
好友列表设置单元10,设置为针对归属于本地服务器的第一用户建立第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;以及,The buddy list setting unit 10 is configured to establish a first buddy list for the first user belonging to the local server, wherein all the buddy users of the first user are recorded in the first buddy list;
当归属于本地服务器的第一用户与第二用户是好友关系时,针对所述第二用户建立第二好友列表,其中,第二好友列表中记录了第二用户在本地呈现服务器中的好友用户,所述第二用户归属于本地服务器或其他服务器。 Establishing a second buddy list for the second user when the first user and the second user are in a buddy relationship, wherein the second buddy list records the buddy user of the second user in the local presence server. The second user belongs to a local server or other server.
需要说明的是,以上所述的实施例仅是为了便于本领域的技术人员理解而已,并不用于限制本发明的保护范围,在不脱离本发明的发明构思的前提下,本领域技术人员对本发明所做出的任何显而易见的替换和改进等均在本发明的保护范围之内。It should be noted that the above-mentioned embodiments are only for the purpose of facilitating the understanding of those skilled in the art, and are not intended to limit the scope of the present invention, and those skilled in the art will Any obvious substitutions and improvements made by the invention are within the scope of the invention.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;S1: Receive state change information sent by the first user, where the state change information is used to notify the first user of the change of the presence state;
S2,确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给所述好友用户所归属的呈现服务器,以通过所述好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。S2, the presence server that the buddy user of the first user belongs to is determined, and the buddy user that belongs to the other presence server sends a status change notification message corresponding to the first user to the presence server to which the buddy user belongs. Sending, by the presence server to which the friend user belongs, a state change notification message corresponding to the first user to each friend user.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。 It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
通过本发明实施例的方案,当任一用户A的呈现状态发生变化时,用户A归属的PS AS A不需要根据用户A的好友数目,生成对应数目的状态变化通知消息,并分别通过各个好友归属的PS AS将状态变化通知消息发送给用户A的各个好友,而是把PS AS间多条消息转发合并成一条广播消息,PS AS A分别向各个好友归属的PS AS广播一条用户A的状态变化通知消息,并通过各个好友归属的PS AS,分别通知本地服务器中的用户A的好友用户,从而减少了PS AS之间的消息转发量,从而减少了PS AS的信息转发量,提高了PS AS的性能,改善了用户体验。 With the solution of the embodiment of the present invention, when the presence status of any user A changes, the PS AS A to which the user A belongs does not need to generate a corresponding number of state change notification messages according to the number of friends of the user A, and respectively pass each friend. The home PS AS sends a status change notification message to each friend of the user A, but merges multiple messages between the PS ASs into one broadcast message, and the PS AS A broadcasts the status of one user A to the PS AS to which each friend belongs. The notification message is changed, and the friend AS of the user A in the local server is respectively notified by the PS AS to which the buddy belongs, thereby reducing the amount of message forwarding between the PS ASs, thereby reducing the amount of information forwarding of the PS AS and improving the PS. The performance of the AS improves the user experience.

Claims (10)

  1. 一种呈现状态通知方法,所述方法包括:A presentation status notification method, the method comprising:
    接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;Receiving state change information sent by the first user; wherein the state change information is used to notify the first user of a change in the presentation state;
    确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给所述好友用户所归属的呈现服务器,以通过所述好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。And determining, by the broadcast message, the status change notification message corresponding to the first user to the presence server to which the friend user belongs, to pass the notification message to which the friend user belongs to the other user. The presence server to which the friend user belongs sends a status change notification message corresponding to the first user to each friend user.
  2. 根据权利要求1所述的呈现状态通知方法,其中,所述呈现状态通知方法还包括:The presentation status notification method according to claim 1, wherein the presentation status notification method further comprises:
    接收其他呈现服务器发送的第二用户对应的第二状态变化通知消息,根据第二用户对应的第二好友列表,确定本呈现服务器中第二用户对应的订阅用户;Receiving a second state change notification message corresponding to the second user sent by the other presence server, and determining, according to the second friend list corresponding to the second user, the subscription user corresponding to the second user in the presence server;
    将所述第二状态变化通知消息发送给所述第二用户对应的订阅用户。And sending the second state change notification message to a subscription user corresponding to the second user.
  3. 根据权利要求1所述的呈现状态通知方法,其中,在所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器之前,所述呈现状态通知方法还包括:The presence notification method according to claim 1, wherein the presence server to which the friend user of the first user belongs is determined to send a status change notification message corresponding to the first user to the friend of the first user by using a broadcast message. Before the presence server to which the user belongs, the presentation status notification method further includes:
    确认第一用户是否处于稳定状态;Confirm whether the first user is in a stable state;
    在所述第一用户处于稳定状态的情况下,执行所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器的步骤。And performing, in the case that the first user is in a stable state, performing the determining, by the presence server of the first user, the status change notification message corresponding to the first user by using a broadcast message to the friend user of the first user. The step of the owned presence server.
  4. 根据权利要求3所述的呈现状态通知方法,其中,所述确认 第一用户是否处于稳定状态包括:The presentation status notification method according to claim 3, wherein said confirmation Whether the first user is in a stable state includes:
    启动定时器,如果在定时器计时到达预定时间时,如果没有再次接收到第一用户对应的状态变化通知消息,则判定第一用户处于稳定状态;The timer is started, and if the state change notification message corresponding to the first user is not received again when the timer reaches the predetermined time, it is determined that the first user is in a stable state;
    如果在定时器计时到达预定时间内,如果再次接收到第一用户对应的状态变化通知消息,则重新启动定时器,并再次判断第一用户是否处于稳定状态。If the timer change timer is received within the predetermined time, if the state change notification message corresponding to the first user is received again, the timer is restarted, and it is determined again whether the first user is in a stable state.
  5. 根据权利要求2所述的呈现状态通知方法,其中,在所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器之前,所述呈现状态通知方法包括:The presentation status notification method according to claim 2, wherein the presence server to which the friend user of the first user belongs is determined to send a status change notification message corresponding to the first user to the friend of the first user by using a broadcast message Before the presence server to which the user belongs, the presentation status notification method includes:
    针对归属于本地服务器的第一用户建立第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;以及,Establishing a first buddy list for the first user belonging to the local server, wherein all buddy users of the first user are recorded in the first buddy list;
    当归属于本地服务器的第一用户与第二用户是好友关系时,针对所述第二用户建立第二好友列表,其中,第二好友列表中记录了第二用户在本地呈现服务器中的好友用户,所述第二用户归属于本地服务器或其他服务器。Establishing a second buddy list for the second user when the first user and the second user are in a buddy relationship, wherein the second buddy list records the buddy user of the second user in the local presence server. The second user belongs to a local server or other server.
  6. 一种呈现状态通知装置,设置在呈现服务器上,其中,所述装置包括:A presentation status notification device is disposed on a presence server, wherein the device comprises:
    用户接收单元,设置为接收第一用户发送的状态变化信息;其中;状态变化信息用于通知第一用户的呈现状态的变化;a user receiving unit, configured to receive state change information sent by the first user; wherein the state change information is used to notify the first user of a change in the presentation state;
    转发单元,设置为确定第一用户的好友用户所归属的呈现服务器,对于归属于其他呈现服务器的好友用户,通过广播消息将第一用户对应的状态变化通知消息发送给所述好友用户所归属的呈现服务器,以通过所述好友用户归属的呈现服务器,将第一用户对应的状态变化通知消息发送给各个好友用户。 The forwarding unit is configured to determine a presence server to which the friend user of the first user belongs, and send, to the friend user belonging to the other presence server, a status change notification message corresponding to the first user to the friend user by using a broadcast message. And a presentation server, configured to send, by the presence server to which the friend user belongs, a status change notification message corresponding to the first user to each friend user.
  7. 根据权利要求6所述的呈现状态通知装置,其中,所述呈现状态通知装置还包括:The presentation status notification device according to claim 6, wherein the presentation status notification device further comprises:
    服务器接收单元,设置为接收其他呈现服务器发送的第二用户对应的第二状态变化通知消息,根据第二用户对应的第二好友列表,确定本呈现服务器中第二用户对应的订阅用户;a server receiving unit, configured to receive a second state change notification message corresponding to the second user sent by the other presence server, and determine, according to the second friend list corresponding to the second user, a subscription user corresponding to the second user in the present presentation server;
    下发单元,设置为将所述第二状态变化通知消息发送给所述第二用户对应的订阅用户。The sending unit is configured to send the second state change notification message to the subscribing user corresponding to the second user.
  8. 根据权利要求6所述的呈现状态通知装置,其中,所述呈现状态通知装置还包括:The presentation status notification device according to claim 6, wherein the presentation status notification device further comprises:
    稳定状态确认单元,设置为确认第一用户是否处于稳定状态;在所述第一用户处于稳定状态的情况下,通过转发单元执行所述确定第一用户的好友用户所归属的呈现服务器,通过广播消息将第一用户对应的状态变化通知消息发送给第一用户的好友用户所归属的呈现服务器的过程。a steady state confirmation unit, configured to confirm whether the first user is in a stable state; and in the case that the first user is in a stable state, performing, by the forwarding unit, the presence server that determines the friend user of the first user belongs to, by broadcasting The process of sending a status change notification message corresponding to the first user to the presence server to which the friend user of the first user belongs.
  9. 根据权利要求8所述的呈现状态通知装置,其中,所述稳定状态确认单元包括:The presentation status notification device according to claim 8, wherein the steady state confirmation unit comprises:
    启动模块,设置为启动定时器,如果在定时器计时到达预定时间时,如果没有再次接收到第一用户对应的状态变化通知消息,则判定第一用户处于稳定状态;The startup module is configured to start a timer. If the timer change time is reached, if the state change notification message corresponding to the first user is not received again, it is determined that the first user is in a stable state;
    重判模块,设置为在定时器计时到达预定时间内,再次接收到第一用户对应的状态变化通知消息的情况下,则重新启动定时器,并再次判断第一用户是否处于稳定状态。The re-judgment module is configured to restart the timer when the timer expires within a predetermined time and receive the state change notification message corresponding to the first user again, and determine whether the first user is in a stable state again.
  10. 根据权利要求7所述的呈现状态通知装置,其中,所述呈现状态通知装置还包括:The presentation status notification device according to claim 7, wherein the presentation status notification device further comprises:
    好友列表设置单元,设置为针对归属于本地服务器的第一用户建 立第一好友列表,其中,第一好友列表中记录第一用户的全部好友用户;以及,a buddy list setting unit, configured to be built for the first user belonging to the local server Establishing a first buddy list, wherein all buddy users of the first user are recorded in the first buddy list;
    当归属于本地服务器的第一用户与第二用户是好友关系时,针对所述第二用户建立第二好友列表,其中,第二好友列表中记录了第二用户在本地呈现服务器中的好友用户,所述第二用户归属于本地服务器或其他服务器。 Establishing a second buddy list for the second user when the first user and the second user are in a buddy relationship, wherein the second buddy list records the buddy user of the second user in the local presence server. The second user belongs to a local server or other server.
PCT/CN2016/100402 2015-12-02 2016-09-27 Presence state notification method and device WO2017092492A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510876108.1A CN106817400B (en) 2015-12-02 2015-12-02 Method and device for notifying presence state
CN201510876108.1 2015-12-02

Publications (1)

Publication Number Publication Date
WO2017092492A1 true WO2017092492A1 (en) 2017-06-08

Family

ID=58796191

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100402 WO2017092492A1 (en) 2015-12-02 2016-09-27 Presence state notification method and device

Country Status (2)

Country Link
CN (1) CN106817400B (en)
WO (1) WO2017092492A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205175A1 (en) * 2003-03-11 2004-10-14 Kammerer Stephen J. Communications system for monitoring user interactivity
US20080183866A1 (en) * 2005-09-29 2008-07-31 Fujitsu Limited Presence communication system
CN101729585A (en) * 2008-10-15 2010-06-09 中兴通讯股份有限公司 Resource list server and method for subscribing status presentation message in IMS
CN102209313A (en) * 2010-03-29 2011-10-05 华为技术有限公司 Presence information subscribing method and system, resource list server and presence server
CN104426956A (en) * 2013-08-28 2015-03-18 华为技术有限公司 Terminal status subscription method, apparatus and system
CN104811320A (en) * 2014-01-29 2015-07-29 华为技术有限公司 State subscription method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205175A1 (en) * 2003-03-11 2004-10-14 Kammerer Stephen J. Communications system for monitoring user interactivity
US20080183866A1 (en) * 2005-09-29 2008-07-31 Fujitsu Limited Presence communication system
CN101729585A (en) * 2008-10-15 2010-06-09 中兴通讯股份有限公司 Resource list server and method for subscribing status presentation message in IMS
CN102209313A (en) * 2010-03-29 2011-10-05 华为技术有限公司 Presence information subscribing method and system, resource list server and presence server
CN104426956A (en) * 2013-08-28 2015-03-18 华为技术有限公司 Terminal status subscription method, apparatus and system
CN104811320A (en) * 2014-01-29 2015-07-29 华为技术有限公司 State subscription method, device and system

Also Published As

Publication number Publication date
CN106817400A (en) 2017-06-09
CN106817400B (en) 2020-05-12

Similar Documents

Publication Publication Date Title
US10736078B1 (en) Dynamic muting of communication notifications
US8225000B2 (en) Method and apparatus for synchronizing messages between multiple terminals
JP5649247B2 (en) Universal address book to enable updatable electronic business cards
US8813149B2 (en) Process and system for management of a continuous broadcast session of a posted direct video stream
JP5436571B2 (en) Method and apparatus for providing communication history
US20140328478A1 (en) Method and system for identifying prank call, client, server, and storage medium
KR101859235B1 (en) System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices
EP2197164B1 (en) Method and apparatus for managing voicemail in a communication session
US20080270553A1 (en) Method and System for Instant Notification of Communication Block Information
EP2854431B1 (en) Device, method and mobile terminal for updating mobile social network user state
US11252693B2 (en) Device and/or line event awareness and smart synchronization
US11102319B2 (en) Method, system and server for stream-pushing
US20200099757A1 (en) Presence server message handling
US20170019484A1 (en) System and method for aggregating communication connections
JP2014518464A (en) System and method for passive communication service
CN106161201B (en) method, device and system for participating in group chat by using mailbox account as identifier
WO2015172629A1 (en) Message transmission method, apparatus and system
US10063648B2 (en) Relaying mobile communications
US20140258425A1 (en) Method and Device for Long Lived Chat with Dynamic Focus
CN101026812B (en) Method for obtaining session capability of session participating user for multi-party communication system
US11070659B2 (en) Incoming voice calling method and terminal
WO2017092492A1 (en) Presence state notification method and device
EP2187584A1 (en) A message association method, user terminal and server
EP3758308B1 (en) Correspondence processing method and device based on interworking rcs system
WO2009054661A1 (en) Procedure for managing data synchronization under multiple devices environment

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: 16869803

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: 16869803

Country of ref document: EP

Kind code of ref document: A1