CN117439964A - Group chat member online state updating method and system - Google Patents

Group chat member online state updating method and system Download PDF

Info

Publication number
CN117439964A
CN117439964A CN202311512432.6A CN202311512432A CN117439964A CN 117439964 A CN117439964 A CN 117439964A CN 202311512432 A CN202311512432 A CN 202311512432A CN 117439964 A CN117439964 A CN 117439964A
Authority
CN
China
Prior art keywords
group chat
service node
client
group
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311512432.6A
Other languages
Chinese (zh)
Inventor
唐世峰
冯友为
方国才
陈超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianhai Yanxiang Asia Pacific Electronic Equipment Technology Co ltd
Original Assignee
Shenzhen Qianhai Yanxiang Asia Pacific Electronic Equipment Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianhai Yanxiang Asia Pacific Electronic Equipment Technology Co ltd filed Critical Shenzhen Qianhai Yanxiang Asia Pacific Electronic Equipment Technology Co ltd
Priority to CN202311512432.6A priority Critical patent/CN117439964A/en
Publication of CN117439964A publication Critical patent/CN117439964A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for updating the online state of group chat members, wherein the method comprises the following steps: the client acquires a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups; if the client opens one of the group chat groups as a target group chat group, sending a service request corresponding to the target group chat group to the state service node; the state service node acquires the online state information of the target member corresponding to the target group chat group according to the service request, and sends the online state information of the target member to the client; and the client receives and stores the online state information of the target member. By implementing the embodiment of the invention, the instantaneity of the online state update of the group chat members is realized, the invalid request is reduced, and the service resources are saved.

Description

Group chat member online state updating method and system
Technical Field
The invention relates to the technical field of network communication, in particular to a group chat member online state updating method and system.
Background
In the field of instant messaging, group chat is an indispensable business scenario, and group chat member status update is an important ring related to user experience. In this service scenario, there is a problem that the online state of group chat members has latency, mainly because each user adds multiple group chat members, each group chat has multiple members, and the influence after one user is online needs to be associated with multiple users, and the number of related users is as follows: group chat members multiply the number of group chat, which is a geometric fold increase.
In the current scheme, the client side pulls the online state of the group chat member in each group chat in a timed full-quantity polling mode, the online state of the scheme is not updated immediately, and a large number of invalid polling requests are generated; moreover, when the online state of the user changes, the notification of the online state change of the user is pushed to the group chat members of each group chat where the user is located, and if the user has a plurality of groups, the online state change needs to be pushed once according to the total number of the notifications: the group members multiply the number of groups, resulting in a geometric multiple increase in push requests. This causes a problem that the presence update is delayed and occupies service resources.
Disclosure of Invention
The embodiment of the invention provides a method and a system for updating the online state of group chat members, which aim to solve the problems of delay and occupation of service resources caused by geometric multiple growth of push requests because a large number of invalid polling requests exist when online state updating is not instant in the prior art.
In order to solve the above problems, in a first aspect, an embodiment of the present invention provides a method for updating online status of group chat members, which is applied to an online status updating system of group chat members, where the online status updating system of group chat members includes a client and a status service node; the method comprises the following steps:
The client acquires a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups;
if the client opens one of the group chat groups as a target group chat group, sending a service request corresponding to the target group chat group to the state service node;
the state service node acquires the online state information of the target member corresponding to the target group chat group according to the service request, and sends the online state information of the target member to the client;
and the client receives and stores the online state information of the target member.
In a second aspect, an embodiment of the present application provides a group chat member presence status update system, where the group chat member presence status update system includes a client and a status service node, and the system includes:
the client is used for acquiring a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups; if one of the group chat groups is opened as a target group chat group, sending a service request corresponding to the target group chat group to the state service node;
The state service node is used for acquiring the online state information of the target member corresponding to the target group chat group according to the service request and sending the online state information of the target member to the client;
the client is also used for receiving and storing the online state information of the target member.
The embodiment of the invention provides a method and a system for updating the online state of group chat members, wherein the method comprises the following steps: the client acquires a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups; if the client opens one of the group chat groups as a target group chat group, sending a service request corresponding to the target group chat group to the state service node; the state service node acquires the online state information of the target member corresponding to the target group chat group according to the service request, and sends the online state information of the target member to the client; and the client receives and stores the online state information of the target member. By implementing the embodiment of the invention, the group chat group corresponding to the client is acquired after the client is successfully logged in, one group chat group in the plurality of group chat groups opened by the client is taken as a target group chat group, and meanwhile, the state service node acquires the corresponding online state information of the target member according to the service request corresponding to the target group chat group and sends the online state information to the client, so that the client only needs to acquire the online state information of the target member corresponding to the opened target group chat group, thereby realizing instant update of the online state of the group chat member, reducing invalid requests and saving service resources.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for updating online status of group chat members according to an embodiment of the present invention;
fig. 2 is a schematic sub-flowchart of a group chat member online status updating method according to an embodiment of the present invention;
fig. 3 is a schematic sub-flowchart of a group chat member online status updating method according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a group chat member online status updating system provided by an embodiment of the present invention;
fig. 5 is a schematic block diagram of a group chat member presence update system according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for updating online status of group chat members according to an embodiment of the present invention. As shown in fig. 1, the embodiment of the invention provides a group chat member online state updating method, which is applied to a group chat member online state updating system, wherein the group chat member online state updating system comprises a client and a state service node; the group chat member online state updating method comprises the following steps S110-S140.
S110, the client acquires a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups.
In one embodiment, the group chat member online status updating system further comprises a login service node; the client acquires a corresponding group chat list after successful login, and the method comprises the following steps:
the client establishes connection with the login service node and sends a first login request to the login service node;
the login service node verifies the first login request;
if the login service node passes the verification of the first login request, the login service node sends login success notification information to the client;
and the client receives the login success notification information and acquires a corresponding group chat list.
In this embodiment, when the account number and the corresponding password are input, the client may send the first login request to the login service node to perform a verification operation; if the login service node passes the verification of the first login request, the login service node sends login success notification information to the client; at this time, the client receives the login success notification information and acquires a corresponding group chat list from the data service node to ensure data security; if the login service node fails to pass the verification of the first login request, the login service node sends login failure notification information to the client, and when the client receives the login failure notification information, the account and the corresponding password can be input again to send the first login request to the login service node again for verification operation.
The first login request can comprise information such as user identification, user nickname, user password, login time and the like; the group chat list may include group chat group information of the plurality of group chat groups, and the group chat group message may include information such as group chat group identification, group chat member identification, and the like; the login success notification message may include a user identification, a login address, a login success identification, etc.
Wherein, the client can be a computer, an application program or a web browser connected to a network, etc.; the status service node may be a server storing status information; the connection service node may be a server storing connection information.
According to the above embodiment, it is known that the client sends the first login request to the login service node, and after the authentication operation of the login service node, the client performs subsequent targeted processing if the authentication is passed, and if the authentication is not passed, the client needs to send the first login request to the login service node again. In this way, the data security is further improved, and the subsequent targeted processing can be performed more safely.
And S120, if the client opens one of the group chat groups as a target group chat group, sending a service request corresponding to the target group chat group to the state service node.
In this embodiment, the client may select to open any one of the plurality of group chat groups in the corresponding group chat list to serve as a target group chat group, and at this time, may send a service request corresponding to the target group chat group to the state service node to perform a subsequent targeted operation.
The service request may include information such as a target group identifier, service content, and the like.
S130, the state service node obtains the online state information of the target member corresponding to the target group chat group according to the service request, and sends the online state information of the target member to the client.
In this embodiment, the state service node receives the service request, analyzes the service request, and may obtain the target group identifier corresponding to the service request, and may query the corresponding target group according to the target group identifier, obtain the online state information of the target member corresponding to the target group, and send the online state information of the target member to the corresponding client.
The target member online state information can comprise information such as a group chat member online state, a user identification, a group chat group identification and the like; the group chat member presence status may include online, offline, etc.
For example, after the client side a successfully logs in, a group chat list a can be obtained, wherein the group chat list a comprises 10 group chat groups; if the client side A opens the group chat group A to serve as the target group chat group, a service request corresponding to the target group chat group is sent to the state service node to acquire online state data of all group chat members in the group chat group A to form the online state information of the target member. Therefore, the client side A only acquires the online state information of the group chat member corresponding to the opened group chat group A. Therefore, the client only needs to acquire the online state information of the target member corresponding to the opened group chat group, so that the online state of the group chat member is updated immediately by pulling according to the requirement, invalid requests are reduced, and service resources are saved.
And S140, the client receives and stores the online state information of the target member.
In one embodiment, as shown in fig. 2, the group chat member online status updating system further includes other clients and connection service nodes;
after the step of receiving and saving the target member presence information by the client, the method further includes S141-S145:
S141, after the login of the other clients is successful, establishing long connection with the connection service node;
s142, the connection service node sends the state corresponding to the long connection with the other clients to the state service node and stores the state;
s143, the state service node acquires a current group chat list corresponding to the other clients; the current group chat list comprises a plurality of group chat groups;
s144, if the state service node determines that the current group chat list comprises the target group chat group, acquiring the online state information of the target member;
and S145, the state service node sends the current user online state corresponding to the other clients to the client based on the target member online state information.
In this embodiment, as shown in fig. 2, the other clients may establish long connection with the connection service node to form connection information, where the connection information may be saved to the connection service node; the connection service node sends the state corresponding to the long connection with the other clients to the state service node and stores the state, namely the connection service node can send the state corresponding to the other clients to the connection service node according to the long connection and stores the state, wherein the corresponding state can be online or offline, and the corresponding state is online because the other clients are successfully logged in.
The state service node can acquire a current group chat list corresponding to the other clients through the long connection; the current group chat list comprises a plurality of group chat groups; the state service node acquires the online state information of the target member if the current group chat list comprises the target group chat group; the client and the other clients are in the same group chat group, the target group chat group opened by the client is in the current group chat list of the other clients, at this time, the state service node obtains the online state information of the target member, and sends the current online state of the user corresponding to the other clients to the client based on the online state information of the target member so as to update the online state of the group chat member.
The current user online state information can comprise information such as the online state of the group chat member, user identification, group chat group identification and the like; the group chat member presence status may include online, offline, etc.
For example, the group chat list b acquired by the other client b after the login is successful has a group chat group a, that is, the other client b and the client a have the same group chat group a, and at this time, the state service node sends the current user online state corresponding to the other client b to the client a based on the target member online state information to synchronize the current user online state of the other client b with the group chat group a opened by the client a. Therefore, the other client side B only needs to send the online state information to the client side A which has the same group chat group A and is opened with the group chat group A, namely the online state of the group chat member of the other client side B in the group chat group opened by the client side A is displayed as online. Therefore, after the login is successful, the other clients only need to send the current user online state to the client which opens the current group chat list in the other clients, so that the online state of the group chat members is updated in real time by pushing according to the requirement, invalid requests are reduced, and service resources are saved.
In an embodiment, the state service node sends the current user presence corresponding to the other clients to the client based on the target member presence information, including:
the state service node sends the current user online state to the connection service node;
and the connection service node sends the current user presence state to the client based on the target member presence state information.
In this embodiment, the state service node obtains the user identifier and the group chat group identifier according to the target member presence information, queries the corresponding client based on the user identifier, queries the corresponding target group chat group based on the group chat group identifier, and sends the current user presence to the target group chat group of the client to update the group chat member presence. The method realizes push-on-demand, updates the online state of the group chat members in real time, reduces invalid requests and saves service resources.
In an embodiment, the establishing a long connection between the other client and the connection service node after the login is successful includes:
The other clients establish connection with the login service node and send a second login request to the login service node;
if the login service node passes the verification of the second login request, sending login success notification information to the other clients and the connection service node;
and the other clients receive the login success notification message and establish long connection with the connection service node.
In this embodiment, when the account number and the corresponding password are input, the other client may send the second login request to the login service node to perform a verification operation; if the login service node passes the verification of the second login request, sending login success notification information to the other clients; at this time, the other clients receive the login success notification information and establish long connection with the connection service node; and if the login service node fails to pass the verification of the second login request, sending login failure notification information to the other clients, wherein the other clients can re-input an account number and a corresponding password when receiving the login failure notification information so as to send the second login request to the login service node again to establish connection operation.
The second login request may include information such as a user identifier, a user nickname, a user password, and a login time.
According to the above embodiment, it is known that the other client sends the second login request to the login service node, and after the authentication operation of the login service node, the other client performs subsequent targeted processing if the authentication is passed, and if the authentication is not passed, the second login request needs to be sent to the login service node again. In this way, the data security is further improved, and the subsequent targeted processing can be performed more safely. In one embodiment, as shown in fig. 3, after the step of receiving and saving the presence information of the target member by the client, the method further includes S146-S147:
s146, the state service node sets a preset time section according to a preset time period, and detects the online state information of the target member according to the preset time section; the target member online state information comprises a plurality of sub-target member online state information;
and S147, if the state service node detects that the online state information of the plurality of sub-target members is updated in the preset time section, pushing the online state information of the plurality of sub-target members to the corresponding target group chat group.
In this embodiment, as shown in fig. 3, the state service node starts from the login time, and forms a plurality of preset time segments according to the preset time period as a period, that is, detects the online state information of the target member at fixed time; if the state service node detects that the online state information of the plurality of sub-target members is updated in the preset time section, that is, the online state information of the other target members except online and offline can be busy, do not disturb and other states, the online state information of the plurality of sub-target members is pushed to the corresponding target group chat group so as to update the online state of the group chat members.
For example, the other client b sets the presence status as busy and sends update information to the status service node via the connection service node to update the child target member presence status information (equivalent to the current user presence status of the other client); the state service node detects that the corresponding sub-target member presence state information is updated in a preset time section, and sends the sub-target member presence state to the corresponding target group chat group A to update the group chat member presence state, namely the group chat member presence state of other clients B in the group chat group opened by the client A is displayed as presence. Therefore, the online state information of the sub-target members which are changed in the preset time section is updated, the online state of the group chat members is updated immediately, invalid requests are reduced, and service resources are saved.
In an embodiment, after the step of receiving and saving the target member presence information by the client, the method further comprises:
and the client displays the online state information of the target member to the corresponding target group chat group.
In this embodiment, after receiving and storing the presence information of the target member, the client displays the presence information of the target member to the corresponding target group chat group, so that the client can clearly know the online group members in the opened target group chat group to perform targeted operations such as subsequent chat. It follows that this achieves both intuitiveness and timeliness of the data.
It should be noted that when the other client sends an exit request to the login service node and exits successfully, that is, exits from login, the subsequent operation of establishing long connection with the connection service node after the login is successful is basically the same as the subsequent operation of establishing long connection with the other client, and may refer to the subsequent corresponding process, that is, the connection service node sends the state corresponding to the long connection with the other client to the state service node and stores the state; the state service node acquires a current group chat list corresponding to the other clients; the current group chat list comprises a plurality of group chat groups; the state service node acquires the online state information of the target member if the current group chat list comprises the target group chat group; and the state service node sends the current user presence state corresponding to the other clients to the client based on the target member presence state information so as to update the group chat member presence state.
According to the embodiment, after the other clients log in successfully, the corresponding states are sent to the state service node through the long connection established with the connection service node; the state service node obtains the online state information of the target member when determining that the target group chat group opened by the client is in the current group chat list; the state service node sends the current user online state corresponding to the other clients to the client based on the target member online state information so as to update the group chat member online state; in addition, after the other clients exit successfully, the state service node sends a corresponding state to the state service node through a long connection established with the connection service node, and when the state service node determines that the target group chat group opened by the client is in the current group chat list, the state service node acquires the online state information of the target member; the state service node sends the current user online state corresponding to the other clients to the client based on the target member online state information so as to update the group chat member online state; and if the state service node detects that the presence state information of the plurality of sub-target members is updated in the preset time section, pushing the presence state information of the plurality of sub-target members to the corresponding target group chat group so as to update the presence state of the group chat members. Therefore, the online state of the group chat members is updated immediately by pulling and pushing according to the requirement, invalid requests are reduced, and service resources are saved.
Referring to fig. 4-5, fig. 4-5 are schematic block diagrams of a group chat member presence update system 100 according to an embodiment of the present invention. As shown in fig. 4-5, an embodiment of the present invention provides a group chat member presence update system 100 that implements the method described above.
The group chat member presence update system 100 includes a client 110 and a status service node 120, the system including: the client 110 is configured to obtain a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups; if one of the group chat groups is opened as a target group chat group, sending a service request corresponding to the target group chat group to the state service node 120; the state service node 120 is configured to obtain, according to the service request, target member presence information corresponding to the target group chat group, and send the target member presence information to the client 110; the client 110 is further configured to receive and store the presence information of the target member.
In one embodiment, the group chat member online status updating system further includes a login service node 150; the client 110 obtains a corresponding group chat list after successful login, including:
The client 110 establishes a connection with the login service node 150 and sends a first login request to the login service node 150;
the login service node 150 verifies the first login request;
if the login service node 150 passes the verification of the first login request, sending login success notification information to the client 110;
the client 110 receives the login success notification information and obtains a corresponding group chat list.
In this embodiment, when the account number and the corresponding password are input, the client 110 may send the first login request to the login service node 150 to perform a verification operation; if the login service node 150 passes the verification of the first login request, sending login success notification information to the client 110; at this time, the client 110 receives the login success notification information, and obtains a corresponding group chat list from the data service node to ensure data security; if the login service node 150 fails to verify the first login request, the login service node sends login failure notification information to the client 110, and when the client 110 receives the login failure notification information, the account and the corresponding password may be input again to send the first login request to the login service node 150 again for verification operation.
The first login request can comprise information such as user identification, user nickname, user password, login time and the like; the group chat list may include group chat group information of the plurality of group chat groups, and the group chat group message may include information such as group chat group identification, group chat member identification, and the like; the login success notification message may include a user identification, a login address, a login success identification, etc.
Wherein, the client 110 may be a computer, an application program, or a web browser connected to a network; the status service node 120 may be a server storing status information; the connection service node 130 may be a server storing connection information.
As can be seen from the foregoing embodiments, the client 110 sends the first login request to the login service node 150, and after the authentication operation of the login service node 150, performs subsequent targeted processing if the authentication is passed, and needs to send the first login request to the login service node 150 again if the authentication is not passed. In this way, the data security is further improved, and the subsequent targeted processing can be performed more safely.
In this embodiment, the client 110 may select to open any one of the plurality of group chat groups in the corresponding group chat list as the target group chat group, and at this time, may send a service request corresponding to the target group chat group to the state service node 120 to perform a subsequent targeted operation.
The service request may include information such as a target group identifier, service content, and the like.
In this embodiment, the state service node 120 receives the service request, analyzes the service request to obtain the target group identifier corresponding to the service request, and according to the target group identifier, may query the corresponding target group and obtain the online state information of the target member corresponding to the target group, and sends the online state information of the target member to the corresponding client 110.
The target member online state information can comprise information such as a group chat member online state, a user identification, a group chat group identification and the like; the group chat member presence status may include online, offline, etc.
For example, after the client side a successfully logs in, a group chat list a can be obtained, wherein the group chat list a comprises 10 group chat groups; if the client side a opens the group chat group a to serve as the target group chat group, a service request corresponding to the target group chat group is sent to the state service node 120 to obtain online state data of all group chat members in the group chat group a to form online state information of the target member. Therefore, the client side A only acquires the online state information of the group chat member corresponding to the opened group chat group A. Therefore, the client only needs to acquire the online state information of the target member corresponding to the opened group chat group, so that the online state of the group chat member is updated immediately by pulling according to the requirement, invalid requests are reduced, and service resources are saved.
In one embodiment, the group chat member online status updating system further includes other clients 140 and connection service nodes 130;
after the step of receiving and saving the target member presence information by the client 110, the method further comprises:
the other clients 140 establish long connection with the connection service node 130 after successful login;
the connection service node 130 sends the state corresponding to the long connection with the other client 140 to the state service node 120 and stores the state;
the state service node 120 obtains a current group chat list corresponding to the other clients 140; the current group chat list comprises a plurality of group chat groups;
if the state service node 120 determines that the current group chat list includes the target group chat group, acquiring online state information of the target member;
the state service node 120 transmits the current user presence corresponding to the other clients 140 to the client 110 based on the target member presence information.
In this embodiment, the other client 140 may establish a long connection with the connection service node 130 to form connection information, and the connection information may be saved to the connection service node 130; the connection service node 130 sends the state corresponding to the long connection with the other client 140 to the state service node 120 and saves the state, that is, the connection service node 130 may send the state corresponding to the other client 140 to the connection service node 130 and save the state according to the long connection, where the corresponding state may be online or offline, and the corresponding state is online because the other client 140 logs in successfully.
The state service node 120 may obtain a current group chat list corresponding to the other clients 140 through the long connection; the current group chat list comprises a plurality of group chat groups; if the state service node 120 determines that the current group chat list includes the target group chat group, acquiring online state information of the target member; that is, the client 110 and the other clients 140 are in the same group chat group, the target group chat group opened by the client 110 is in the current group chat list of the other clients 140, at this time, the state service node 120 obtains the target member presence state information, and sends the current user presence state corresponding to the other clients 140 to the client 110 based on the target member presence state information to update the group chat member presence state.
The current user online state information can comprise information such as the online state of the group chat member, user identification, group chat group identification and the like; the group chat member presence status may include online, offline, etc.
For example, the group chat list b acquired by the other client b after the login is successful has a group chat group a, that is, the other client b and the client a have the same group chat group a, and at this time, the state service node 120 sends the current user online state corresponding to the other client b to the client a based on the target member online state information to synchronize the current user online state of the other client b with the group chat group a opened by the client a. Therefore, the other client side B only needs to send the online state information to the client side A which has the same group chat group A and is opened with the group chat group A, namely the online state of the group chat member of the other client side B in the group chat group opened by the client side A is displayed as online. Therefore, the other clients 110 only need to send the current user online state to the client 110 that opens the current group chat list in the other clients 140 after the login is successful, which realizes push-on-demand, updates the group chat member online state in real time, reduces invalid requests, and saves service resources.
In an embodiment, the state service node 120 sends the current user presence corresponding to the other client 140 to the client 110 based on the target member presence information, including:
the state service node 120 sends the current user presence status to the connection service node 130;
the connection service node 130 sends the current user presence to the client 110 based on the target member presence information.
In this embodiment, the state service node 120 obtains the user identifier and the group chat group identifier according to the target member presence information, queries the corresponding client 110 based on the user identifier, queries the corresponding target group chat group based on the group chat group identifier, and sends the current user presence to the target group chat group of the client 110 to update the group chat member presence. The method realizes push-on-demand, updates the online state of the group chat members in real time, reduces invalid requests and saves service resources.
In an embodiment, the other client 140 establishes a long connection with the connection service node 130 after the login is successful, including:
The other clients 140 establish connection with the login service node 150 and send a second login request to the login service node 150;
if the login service node 150 passes the verification of the second login request, sending login success notification information to the other client 140 and the connection service node 130;
the other clients 140 receive the login success notification message and establish a long connection with the connection service node 130.
In this embodiment, when the account number and the corresponding password are input, the other client 140 may send the second login request to the login service node 150 to perform a verification operation; if the login service node 150 passes the verification of the second login request, sending login success notification information to the other client 140; at this time, the other client 140 receives the login success notification information and establishes a long connection with the connection service node 130; if the login service node 150 fails to verify the second login request, the login service node sends login failure notification information to the other clients 140, and when the other clients 140 receive the login failure notification information, the account and the corresponding password may be input again to send the second login request to the login service node 150 again to perform connection establishment operation.
The second login request may include information such as a user identifier, a user nickname, a user password, and a login time.
As can be seen from the above embodiments, the other client 110 sends the second login request to the login service node 150, and after the authentication operation of the login service node 150, the subsequent targeted processing is performed if the authentication is passed, and if the authentication is not passed, the second login request needs to be sent to the login service node 150 again. In this way, the data security is further improved, and the subsequent targeted processing can be performed more safely.
In one embodiment, after the step of receiving and saving the presence information of the target member by the client 110, the method further comprises:
the state service node 120 sets a preset time section according to a preset time period, and detects the online state information of the target member according to the preset time section; the target member online state information comprises a plurality of sub-target member online state information;
if the state service node 120 detects that the online state information of the plurality of sub-target members is updated in the preset time zone, the online state information of the plurality of sub-target members is pushed to the corresponding target group chat group.
In this embodiment, the state service node 120 starts from the login time, and forms a plurality of preset time segments according to the preset time period as a period, that is, detects the online state information of the target member at regular time; if the state service node 120 detects that the plurality of sub-target member presence status information is updated in the preset time zone, that is, other target member presence status information except online and offline, where the other status may be busy, do not disturb, etc., the plurality of sub-target member presence status is pushed to the corresponding target group chat group to update the group chat member presence status.
For example, the other client b sets the presence status as busy and sends update information to the status service node 120 via the connection service node 130 to update the child target member presence status information (equivalent to the current user presence status of the other client); the state service node 120 detects that the corresponding sub-target member presence state information is updated in a preset time zone, and sends the sub-target member presence state to the corresponding target group chat group a to update the group chat member presence state, that is, the group chat member presence state of other clients b in the group chat group opened by the client a is displayed as online. Therefore, the online state information of the sub-target members which are changed in the preset time section is updated, the online state of the group chat members is updated immediately, invalid requests are reduced, and service resources are saved.
In one embodiment, after the step of receiving and saving the presence information of the target member by the client 110, the method further comprises:
the client 110 displays the online status information of the target member to the corresponding target group chat group.
In this embodiment, after receiving and storing the presence information of the target member, the client 110 displays the presence information of the target member to the corresponding target group chat group, so that the client 110 can clearly know the online group members in the opened target group chat group to perform targeted operations such as subsequent chat. It follows that this achieves both intuitiveness and timeliness of the data.
It should be noted that, when the other client 140 sends an exit request to the login service node 150 and exits successfully, that is, exits from login, the subsequent operation of establishing a long connection with the connection service node 130 after the login of the other client 140 is successful may refer to a subsequent corresponding process, that is, the connection service node 130 sends a state corresponding to the long connection of the other client 140 to the state service node 120 and stores the state; the state service node 120 obtains a current group chat list corresponding to the other clients 140; the current group chat list comprises a plurality of group chat groups; if the state service node 120 determines that the current group chat list includes the target group chat group, acquiring online state information of the target member; the state service node 120 transmits the current user presence corresponding to the other clients to the client 110 based on the target member presence information to update the group chat member presence.
As can be seen from the above embodiments, after the other clients 140 log in successfully, the corresponding states are sent to the state service node 120 through the long connection established with the connection service node 130; the state service node 120 obtains the online state information of the target member when determining that the target group chat group opened by the client 110 is in the current group chat list; the state service node 120 sends the current user presence state corresponding to the other clients 140 to the client 110 based on the target member presence state information to update the group chat member presence state; in addition, after the other clients 140 exit successfully, the state service node 120 obtains the online state information of the target member when determining that the target group chat group opened by the client 110 is in the current group chat list by means of the long connection established with the connection service node 130 to send the corresponding state to the state service node 120; the state service node 120 sends the current user presence state corresponding to the other clients 140 to the client 110 based on the target member presence state information to update the group chat member presence state; and, if the state service node 120 detects that the presence information of the plurality of sub-target members is updated in the preset time zone, the presence information of the plurality of sub-target members is pushed to the corresponding target group chat group to update the presence information of the group chat members. Therefore, the online state of the group chat members is updated immediately by pulling and pushing according to the requirement, invalid requests are reduced, and service resources are saved.
In the several embodiments provided in this application, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiment described above is merely illustrative, and the division of the modules is merely a logical function division, and other manners of division may be implemented in practice. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and module may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. The group chat member online state updating method is characterized by being applied to a group chat member online state updating system, wherein the group chat member online state updating system comprises a client and a state service node; the method comprises the following steps:
The client acquires a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups;
if the client opens one of the group chat groups as a target group chat group, sending a service request corresponding to the target group chat group to the state service node;
the state service node acquires the online state information of the target member corresponding to the target group chat group according to the service request, and sends the online state information of the target member to the client;
and the client receives and stores the online state information of the target member.
2. The method of claim 1, wherein the group chat member presence update system further comprises other clients and connection service nodes;
after the step of receiving and saving the target member presence information by the client, the method further comprises:
after the login of the other clients is successful, establishing long connection with the connection service node;
the connection service node sends the state corresponding to the long connection with the other clients to the state service node and stores the state;
The state service node acquires a current group chat list corresponding to the other clients; the current group chat list comprises a plurality of group chat groups;
the state service node acquires the online state information of the target member if the current group chat list comprises the target group chat group;
and the state service node sends the current user online state corresponding to the other clients to the client based on the target member online state information.
3. The method of claim 1, wherein the group chat member presence update system further comprises a login service node;
the client acquires a corresponding group chat list after successful login, and the method comprises the following steps:
the client establishes connection with the login service node and sends a first login request to the login service node;
the login service node verifies the first login request;
if the login service node passes the verification of the first login request, the login service node sends login success notification information to the client;
and the client receives the login success notification information and acquires a corresponding group chat list.
4. The method of claim 1, wherein after the step of receiving and saving the target member presence information by the client, the method further comprises:
The state service node sets a preset time section according to a preset time period, and detects the online state information of the target member according to the preset time section; the target member online state information comprises a plurality of sub-target member online state information;
and if the state service node detects that the online state information of the plurality of sub-target members is updated in the preset time section, pushing the online state information of the plurality of sub-target members to the corresponding target group chat group.
5. The method of claim 2, wherein the status service node sends the current user presence corresponding to the other clients to the client based on the target member presence information, comprising:
the state service node sends the current user online state to the connection service node;
and the connection service node sends the current user presence state to the client based on the target member presence state information.
6. The method according to claim 2, wherein the other clients establish a long connection with the connection service node after successful login, comprising:
The other clients establish connection with the login service node and send a second login request to the login service node;
if the login service node passes the verification of the second login request, sending login success notification information to the other clients and the connection service node;
and the other clients receive the login success notification message and establish long connection with the connection service node.
7. The method of claim 1, wherein after the step of receiving and saving the target member presence information by the client, the method further comprises:
and the client displays the online state information of the target member to the corresponding target group chat group.
8. A group chat member presence update system comprising a client and a status service node, the system comprising:
the client is used for acquiring a corresponding group chat list after successful login; the group chat list comprises a plurality of group chat groups; if one of the group chat groups is opened as a target group chat group, sending a service request corresponding to the target group chat group to the state service node;
The state service node is used for acquiring the online state information of the target member corresponding to the target group chat group according to the service request and sending the online state information of the target member to the client;
the client is also used for receiving and storing the online state information of the target member.
9. The system of claim 8, wherein the group chat member presence update system further comprises other clients and connection service nodes;
after the step in which the client is further configured to receive and save the presence information of the target member, the system further includes:
after the login of the other clients is successful, establishing long connection with the connection service node;
the connection service node sends the state corresponding to the long connection with the other clients to the state service node and stores the state;
the state service node acquires a current group chat list corresponding to the other clients; the current group chat list comprises a plurality of group chat groups;
the state service node acquires the online state information of the target member if the current group chat list comprises the target group chat group;
And the state service node sends the current user online state corresponding to the other clients to the client based on the target member online state information.
10. The system of claim 8, wherein after the step of the client receiving and saving the target member presence information, the system further comprises:
the state service node sets a preset time section according to a preset time period, and detects the online state information of the target member according to the preset time section; the target member online state information comprises a plurality of sub-target member online state information;
and if the state service node detects that the online state information of the plurality of sub-target members is updated in the preset time section, pushing the online state information of the plurality of sub-target members to the corresponding target group chat group.
CN202311512432.6A 2023-11-14 2023-11-14 Group chat member online state updating method and system Pending CN117439964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311512432.6A CN117439964A (en) 2023-11-14 2023-11-14 Group chat member online state updating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311512432.6A CN117439964A (en) 2023-11-14 2023-11-14 Group chat member online state updating method and system

Publications (1)

Publication Number Publication Date
CN117439964A true CN117439964A (en) 2024-01-23

Family

ID=89549761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311512432.6A Pending CN117439964A (en) 2023-11-14 2023-11-14 Group chat member online state updating method and system

Country Status (1)

Country Link
CN (1) CN117439964A (en)

Similar Documents

Publication Publication Date Title
EP2115976B1 (en) Method and system for resource-based synchronization between endpoints in a web-based real time collaboration
JP4651389B2 (en) Send application information and commands using presence technology
US8612527B2 (en) Automatic notification system and process
EP1560395B1 (en) System and method for session reestablishment between client terminal and server
CN108881354B (en) Push information storage method and device, server and computer storage medium
US20020129103A1 (en) Instant messaging presence service protocol
KR102208935B1 (en) Messaging api over http protocol to establish context for data exchange
CN103491055A (en) Method for synchronizing information among clients, clients and server
WO2010025064A2 (en) Persisting a group in an instant messaging application
CN101232467A (en) Method for obtaining information using time jab in real time communicating business
WO2007112369A2 (en) A method and system for event polling
CN111343289A (en) MQTT protocol-based message pushing method and system
US20080208959A1 (en) Hanging request system and method for client/server communication
CN111092934B (en) Method for updating client routing and storage medium
CN114338063A (en) Message queue system, service processing method, and computer-readable storage medium
CN103092870A (en) Method for establishing relational data of contact in network communication system and device for achieving the same
CN106411713B (en) State notification method and server
CN103546717A (en) Audio/video conference connection establishment method and device
CN117439964A (en) Group chat member online state updating method and system
US8755397B2 (en) Asynchronous communication in an unstable network
WO2023274283A1 (en) Group chat processing method and system, and electronic device and computer-readable storage medium
CN114025005B (en) Data communication method, system, electronic equipment and storage medium
US20160196242A1 (en) Method and system for communicating between client pages
CN113596147A (en) Message pushing method, device, equipment and storage medium
CN108574622B (en) Instant message processing method and device based on XMPP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination