CN114338255B - Group management method and device - Google Patents

Group management method and device Download PDF

Info

Publication number
CN114338255B
CN114338255B CN202210051268.2A CN202210051268A CN114338255B CN 114338255 B CN114338255 B CN 114338255B CN 202210051268 A CN202210051268 A CN 202210051268A CN 114338255 B CN114338255 B CN 114338255B
Authority
CN
China
Prior art keywords
group
target
message
term
record
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.)
Active
Application number
CN202210051268.2A
Other languages
Chinese (zh)
Other versions
CN114338255A (en
Inventor
林皓
高曦
朱亮
陈龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing VRV Software Corp Ltd
Original Assignee
Beijing VRV Software Corp 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 Beijing VRV Software Corp Ltd filed Critical Beijing VRV Software Corp Ltd
Priority to CN202210051268.2A priority Critical patent/CN114338255B/en
Publication of CN114338255A publication Critical patent/CN114338255A/en
Application granted granted Critical
Publication of CN114338255B publication Critical patent/CN114338255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application provides a group management method and a device, wherein the method comprises the following steps: receiving group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; marking a target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID. The group management method and the device provided by the application are used for locally managing the group members and calculating the read and unread states and the number of the group messages at the client side, so that the calculation pressure of the server is reduced.

Description

Group management method and device
Technical Field
The present application relates to the field of group message notification management, and in particular, to a group management method and apparatus.
Background
With the development of internet technology, the group chat function and other group members are used for carrying out multi-person online chat, so that the working efficiency can be greatly improved. For updating the read-unread state of the message sent by the group member in the group, in the related art, after other group members read the message, the server calculates the number of the current read group members and the total number of the visible group members of the message, and displays the current read group members and the total number of the visible group members on a group chat interface of the group member. The group members may also trigger the electronic device to query the server for a list of people who have read and unread messages by clicking on the message's corner mark.
However, according to the message state updating method, all data calculation is performed through the server, so that great calculation pressure is brought to the server, the performance of the server is reduced under high concurrency, and the problems of untimely updating of the message state, incorrect information display and the like are caused.
Disclosure of Invention
The application aims to provide a group management method and device, which are used for locally managing group members and calculating the read unread states and the number of group messages at a client side, so that the calculation pressure of a server is reduced.
The application provides a group management method, which is applied to electronic equipment and comprises the following steps: receiving group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; marking a target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
Optionally, before the receiving the group member cursor information sent by the server, the method further includes: sending the target message to the server; receiving the successful sending information fed back by the server; the transmission success information includes: a first group termID; the first group termID is the group termID of the target group when the server sends the target message to the group member of the target group; the group termID of the target group increases with changes in the group members in the target group.
Optionally, the method further comprises: sending a group term acquisition request of the target group to the server under the condition that the group member of the target group is changed; the group term acquisition request carries a local group term ID of the target group; receiving a group term acquisition response of the target group sent by a server; according to the first group term record in the group term acquisition response, updating the group member information and the local group term record of the target group, and updating the local group term ID of the target group to be the maximum value in the group term ID in the first group term record; the first group term record is a record of the target group member having a group term id greater than the local group term id in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Optionally, the marking the target message in the target group as read by the target group member based on the group member cursor information includes: acquiring a second group term record in the local group term records based on the first group term ID; determining a total number of group members receiving the target message based on the second group term record, and determining a total number of read members in the target group member according to the group member cursor information; the second group term record is a record of the local group term record, where the incoming group term id is smaller than or equal to the first group term id.
The application also provides a group management method, which is applied to the server and comprises the following steps:
receiving a read message of a target group member aiming at an unread message in the target group; transmitting group member cursor information of the target group member to the electronic equipment; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; and the maximum read message ID is the message ID of the unread message which is sent by the electronic equipment and has the maximum message ID in the unread messages.
Optionally, before receiving the read message of the target group member for the unread message in the target group, the method further includes: receiving a target message sent by the electronic equipment; the target message is a group message with a message ID less than or equal to the maximum read message ID; transmitting successful transmission information containing a first group termID to the electronic equipment, and transmitting the target message to group members in the target group; wherein, the first group termID is a group termID of the target group when the electronic device sends the target message; the group termID of the target group increases with changes in the group members in the target group.
Optionally, the method further comprises: receiving a group term acquisition request of the target group sent by the electronic equipment; based on the local group termID of the target group carried in the group term acquisition request, acquiring a first group term record, and sending a group term acquisition response to the electronic equipment; wherein the group term acquisition response includes: a first group term record of the target group; the first group term record is a record of the group member of the target group with a group term ID greater than the local group term ID in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Optionally, before the receiving the group term acquisition request of the target group sent by the electronic device, the method further includes: and when the group member of the target group is changed, sending a group member change notification to the electronic equipment, so that the electronic equipment updates the group member information of the target group in the electronic equipment by sending the group term acquisition request to the server after receiving the group member change notification.
The application also provides a group management device, comprising:
the receiving module is used for receiving group member cursor information sent by the server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; the marking module is used for marking the target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
Optionally, the apparatus further comprises: a transmitting module; the sending module is used for sending the target message to the server; the receiving module is further used for receiving the successful sending information fed back by the server; the transmission success information includes: a first group termID; the first group termID is the group termID of the target group when the server sends the target message to the group member of the target group; the group termID of the target group increases with changes in the group members in the target group.
Optionally, the apparatus further comprises: a data updating module; the sending module is further configured to send a group term acquisition request of the target group to the server when a group member of the target group changes; the group term acquisition request carries a local group term ID of the target group; the receiving module is further configured to receive a group term acquisition response of the target group sent by the server; the data updating module is configured to update group member information and a local group term record of the target group according to a first group term record in the group term acquisition response, and update a local group term id of the target group to a maximum value in the first group term record; the first group term record is a record of the target group member having a group term id greater than the local group term id in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Optionally, the apparatus further comprises: an acquisition module and a determination module; the acquiring module is configured to acquire a second group term record in the local group term records based on the first group term id; the determining module is configured to determine, based on the second group term record, a total number of group members that receive the target message, and determine, according to the group member cursor information, a total number of read members in the target group member; the second group term record is a record of the local group term record, where the incoming group term id is smaller than or equal to the first group term id.
The embodiment of the application also provides a group management device, which comprises:
the receiving module is used for receiving a read message of the target group member aiming at the unread message in the target group; the sending module is used for sending the group member cursor information of the target group member to the electronic equipment; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; and the maximum read message ID is the message ID of the unread message which is sent by the electronic equipment and has the maximum message ID in the unread messages.
Optionally, the receiving module is further configured to receive a target message sent by the electronic device; the target message is a group message with a message ID less than or equal to the maximum read message ID; the sending module is further configured to send sending success information including a first group termID to the electronic device, and send the target message to a group member in the target group; wherein the first group termID is a group termID of the target group; the group termID of the target group increases with changes in the group members in the target group.
Optionally, the receiving module is further configured to receive a group term acquisition request of the target group sent by the electronic device; the acquisition module is used for acquiring a first group term record based on the local group term ID of the target group carried in the group term acquisition request; the sending module is further configured to send a group term acquisition response to the electronic device; wherein the group term acquisition response includes: a first group term record of the target group; the first group term record is a record of the group member of the target group with a group term ID greater than the local group term ID in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Optionally, the sending module is further configured to send a group member change notification to the electronic device when the group member of the target group changes, so that the electronic device updates the group member information of the target group in the electronic device by sending the group term acquisition request to the server after receiving the group member change notification.
The application also provides a computer program product comprising computer programs/instructions which when executed by a processor implement the steps of a group management method as described in any of the above.
The application also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the group management methods described above when executing the program.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a group management method as described in any of the above.
The group management method and the device provided by the application have the advantages that the group members send the group message on the electronic equipment and can receive the group member cursor information sent by the server after being read by the group members, and the group member cursor information is used for indicating the maximum read message ID of the target group members in the target group. Then, marking the target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID. The calculation related to the read-and-unread state update of the message is carried out locally, so that the calculation pressure of the server is reduced.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a system architecture to which a group management method provided by the present application is applied;
fig. 2 is a schematic flow chart of a group management method provided by the present application;
fig. 3 is a schematic structural diagram of a group management device according to the present application;
FIG. 4 is a second schematic diagram of a group management device according to the present application;
fig. 5 is a schematic structural diagram of an electronic device provided by the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In the related art, for a read or unread message in a group chat, a group snapshot of a transmitted message is stored, and related information of a current group member when the group message is transmitted is stored in the group snapshot. When the group A member sends a message, the group B member looks up the message, the electronic equipment used by the group B member pushes the read message to the server, the server sets the maximum read message cursor (message ID) of the group B member in the group, the server calculates the current read number of the message and the total number of the group A member to push the message to the group A member, and the read and unread number is displayed on the group chat interface of the group A member. When the group member A clicks the message status (including message read and message unread) corner mark, the electronic device queries the read unread personnel list in real time through the server.
However, since the number of the read-out and unread-out numbers needs to be calculated through the server, the server is very stressed, and particularly under high concurrency, the performance of the server is seriously reduced, and the read-out and unread-out numbers are not timely pushed to the client of the sender, so that the read-out and unread-out numbers are displayed in error, and the experience of group members is affected.
Based on the technical problems, the embodiment of the application provides a group management method, which is used for locally managing group members and group messages at a client and reducing the calculation pressure of a server.
As shown in fig. 1, a system architecture provided in an embodiment of the present application is configured to execute a group management method provided in an embodiment of the present application, including: server S1, and electronic devices M1 to M4 connected to server S1 via a network. The electronic devices M1 to M4 communicate with the server S1 through networks, respectively.
The group management method provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
As shown in fig. 2, a group management method provided in an embodiment of the present application may include the following steps 201 and 204:
step 201, the server receives a read message of the target group member for the unread message in the target group.
Step 202, the server sends the cursor information of the group member of the target group member to the electronic device.
The group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; and the maximum read message ID is the message ID of the unread message which is sent by the electronic equipment and has the maximum message ID in the unread messages.
For example, after the target group member views the unread message, its electronic device may send the read message to the server, so that the server can notify the sender of the message of the status change of the read message.
It will be appreciated that the group members of the target group each have a corresponding message ID for messages sent within the group, with the most recently sent message having the greatest ID. The maximum read message ID is the group message which is read by the target user and has the maximum message ID in all the messages of the target group.
Step 203, the electronic device receives the group member cursor information sent by the server.
The group member cursor information is used for indicating the maximum read cursor of the target group member in the target group, namely the maximum read message ID.
Illustratively, the group member cursor information may include: group member identification (identity document, ID) of the target group member, group ID of the target group, maximum read message ID of the target group member.
The group ID of the target group is used for determining the target group associated with the group member cursor information after the electronic device receives the group member cursor information; the maximum read message ID is used to indicate the message with the maximum message ID among all the messages read by the target group member in the target group.
It will be appreciated that, for all messages read by the target group member, only the message with the largest message ID needs to be recorded, which means that messages with message IDs less than or equal to the largest read message ID in the target group have been viewed by the target group member.
For example, for messages 4, 5, 6, and 7 in the target group that are not read by the target group member, after the target group member views messages 4, 5, and 6, the server sends the message ID of message 6 to the electronic device, indicating that the target group member has read messages 4, 5, and 6, unread message 7.
It should be noted that the group member cursor information may include a plurality of group members, and a maximum read message ID of each of the plurality of group members. That is, when the server transmits the maximum read message ID of the group member to the electronic device, the server may aggregate and transmit a plurality of group members, so as to reduce the load of multiple transmissions of the server.
Step 204, the electronic device marks the target message in the target group as read by the target group member based on the group member cursor information.
The target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
The read message of the unread message received by the server may include the read message of the target message.
For example, after the server sends the group member cursor information to the electronic device, the electronic device may receive the group member cursor information and change the status of the message read by the target group member based on the group member cursor information.
For example, after receiving the group member cursor information sent by the server, the electronic device may update a message with a message ID less than or equal to the maximum read message ID in the target group on the electronic device to be read by the target group member.
Thus, after the group member sends the group message on the electronic device and is read by the group member, the group member cursor information sent by the server can be received, and the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group. Then, marking the target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID. The calculation related to the read-and-unread state update of the message is carried out locally, so that the calculation pressure of the server is reduced.
Optionally, in the embodiment of the present application, in order to facilitate calculation of the total number of group members in the target group that can receive the target message, and the total number of group members reading the target message, the electronic device needs to save a snapshot of the group members when sending the target message.
Illustratively, before the step 201, the group management method provided by the embodiment of the present application may further include the following steps 205 to 208:
step 205, the electronic device sends the target message to the server.
It should be noted that, the target message may be one or more messages, and for convenience of description, in the embodiment of the present application, the target message is described as an example of one message.
Step 206, the server receives the target message sent by the electronic device.
Illustratively, after the electronic device sends the above-mentioned target Message to the server, the server sends the target Message to the group members in the target group through a Message Queue (MQ).
Step 207, the server sends the successful sending information containing the first group termID to the electronic device, and sends the target message to the group members in the target group.
Wherein, the first group termID is a group termID of the target group when the electronic device sends the target message; the group termID of the target group increases with changes in the group members in the target group.
The server, upon acquiring the first group termID, sends the first group termID to the electronic device by sending success information.
Step 208, the electronic device receives the successful sending information fed back by the server.
Wherein the transmission success information includes: a first group termID; the first group termID is the group termID of the target group when the server sends the target message to the group member of the target group; the group termID of the target group increases with changes in the group members in the target group.
Illustratively, after the electronic device sends the target message to the server, the server returns a snapshot of the group members of the target group when the target message is sent. The group member snapshot is taken via the first group epoch identity termID.
For example, after the server receives the target message, the current termID of the target group, that is, the first group termID, is obtained, and the group member corresponding to the first group termID indicates the group member snapshot of the target group when the target message is sent.
For example, when the group member of the target group is updated, the electronic device may also obtain member information of all the group members that receive the target message and member information of the read members according to the first group termID.
Optionally, in an embodiment of the present application, a term record table of the target group is set in the server, where the term record table includes a group member change record of the target group. When the group member of the target group is changed, the electronic equipment can synchronize the term record in the database to the local for storage, and after the cursor information of the group member is received, the change of the message state and the calculation of the read unread number are carried out locally.
The group management method provided by the embodiment of the present application may further include the following steps 209 to 213:
step 209, the electronic device sends a group term acquisition request of the target group to the server when the group member of the target group changes.
Wherein the group term acquisition request carries a local group term id of the target group.
Step 210, the server receives a group term acquisition request of the target group sent by the electronic device.
Step 211, the server obtains a first group term record based on the local group term id of the target group carried in the group term obtaining request, and sends a group term obtaining response to the electronic device.
Wherein the group term acquisition response includes: a first group term record of the target group; the first group term record is a record of the group member of the target group with a group term ID greater than the local group term ID in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Illustratively, based on the value of the group termID in the queried term record, it can be determined whether the corresponding group member has fallen back. For example, if the out-group termID and the in-group termID of a group member are the same, the group member is returned.
Step 212, the electronic device receives the group term acquisition response of the target group sent by the server.
Step 213, the electronic device updates the group member information and the local group term record of the target group according to the first group term record in the group term acquisition response, and updates the local group term id of the target group to the maximum value in the group term id in the first group term record.
Illustratively, the local group term record is a cache record in the electronic device of the term record of the target group in the server. When the electronic device updates the group member information of the target group, the term record of the target group in the server is synchronized into the local group term record.
In one possible implementation manner, the triggering manner of the group member updating step of the electronic device may be that the server actively sends a group member change notification to the electronic device after the group member of the target group is changed, or may be that the electronic device is triggered after logging in again or being networked again.
Illustratively, before the step 206, the method for group management applied to a server according to the embodiment of the present application may further include the following step 214:
Step 214, when the group member of the target group changes, sending a group member change notification to the electronic device, so that the electronic device updates the group member information of the target group in the electronic device by sending the group term acquisition request to the server after receiving the group member change notification.
It should be noted that, in the embodiment of the present application, the server sets a term record table for the term record. The term record table includes: group ID, member ID, enter group termID, exit group termID, etc. When the group members increase or decrease, a member change record needs to be generated. Specifically, the group member change records shown in the following table 1 may be referred to:
TABLE 1
As can be seen from the above table 1, when a member enters a group, a group entry record is generated, the group entry termID of the group entry record is set as the current termID of the group, and the group exit termID of the group entry record is set as a preset VALUE long. When a member falls back, a fall-back record is generated, and the entering-group termID and the fall-back termID of the fall-back record are set as the current termID of the group. Wherein the termID of the group self-increases when a member of the group changes.
For example, the electronic device may obtain, from the server, an incremental record in the group term record of the target group, that is, a term record having an incoming group term id greater than the local group term id, based on the local group term id of the electronic device when the group member of the target group changes. The local group termID is the largest termID among the incoming group termIDs recorded by the local group term.
Thus, the electronic device can determine the current group member of the target group according to the locally stored group term record, and determine the group snapshot corresponding to any group term ID according to any group term ID, so that the calculation amount of the server is greatly reduced.
Further, in the embodiment of the present application, after the electronic device obtains the first group termID, the electronic device may locally perform a change of the message state and a calculation of the read unread number based on the first group termID and the local group term record.
Specifically, the step 202 may include the following steps 202a1 and 202a2, where the number of read members and the number of unread members of the target message may be calculated by the following steps:
step 202a1, based on the first group termID, obtaining a second group term record in the local group term records.
Step 202a2, determining the total number of group members receiving the target message based on the second group term record, and determining the total number of read members in the target group member according to the group member cursor information.
The second group term record is a record of the local group term record, where the incoming group term id is smaller than or equal to the first group term id.
It should be noted that the local group term record and the term record in the server have the same format and content.
Based on the design of the term record table, when the local term record is queried for the group member information of the target group when the target message is sent based on the group snapshot of the target group, namely the first group term ID, all records with the entering group term ID smaller than or equal to the term ID of the first group in the local term record of the target group can be used for obtaining the group members contained in the target group when the target message is sent.
For example, the electronic device may count the number of group members included in the target group when the target message is sent, and calculate, according to the group member cursor information received in step 203, the number of group members that have read the target message from among the group members included in the target group when the target message is sent.
It will be appreciated that a read quantity identifier is displayed in a predetermined area of the transmitted target message, the read quantity identifier indicating the total number of coarse group members within the group that can receive the target message, and the total number of group members that have read the message. The read quantity identification is determined based on the maximum read cursor for each group member within the target group member. In order to relieve the pushing pressure of the server, the server only pushes the maximum read cursor if the group member sending the target message focuses on the target group. The session interface of the target group indicates that the target group is in a focused state when the session interface of the target group is in a display state on the electronic device, and the server pushes the maximum read cursor of the group member of the target group to the electronic device.
In the case that the target group has more members, that is, exceeds the preset threshold, in order to further reduce the pushing pressure of the server, the server does not actively push the maximum read cursor of the group members of the target group. At this time, the electronic device may obtain the maximum read cursor of the group member of the target group from the server in the case that the user clicks the read quantity identifier.
Thus, the calculation of the total number of group members capable of viewing the target message and the number of group members having read the target message can be put on the electronic device without the calculation on the server, thereby greatly reducing the calculation pressure of the service.
According to the group management method provided by the embodiment of the application, the member change record of the group is recorded by designing the group term record table on the server, and the group snapshot corresponding to any term ID is determined according to the term record. When the group member changes, the term record can be synchronously updated to the local of the electronic equipment, so that the state change of the group message and the calculation of the read unread message are put in the local of the electronic equipment for calculation, and the server only keeps necessary message notification and data update, thereby greatly reducing the calculation amount of the server.
It should be noted that, in the group management method provided in the embodiment of the present application, the execution subject may be a group management device, or a control module in the group management device for executing the group management method. In the embodiment of the present application, a method for executing group management by a group management device is taken as an example, and the group management device provided by the embodiment of the present application is described.
In the embodiment of the present application, the method is shown in the drawings. The group management method is exemplified by a figure in combination with the embodiment of the present application. In specific implementation, the group management method shown in the above method drawings may also be implemented in combination with any other drawing that may be combined and is illustrated in the above embodiment, and will not be repeated here.
The group management device provided by the application is described below, and the group management method described below and the group management method described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a group management device according to an embodiment of the present application, as shown in fig. 3, including:
a receiving module 301, configured to receive group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; a marking module 302, configured to mark, based on the group member cursor information, a target message in the target group as the target group member has been read; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
Optionally, the apparatus further comprises: a transmitting module; the sending module is used for sending the target message to the server; the receiving module 301 is further configured to receive the sending success information fed back by the server; the transmission success information includes: a first group termID; the first group termID is the group termID of the target group when the server sends the target message to the group member of the target group; the group termID of the target group increases with changes in the group members in the target group.
Optionally, the apparatus further comprises: a data updating module; the sending module is further configured to send a group term acquisition request of the target group to the server when a group member of the target group changes; the group term acquisition request carries a local group term ID of the target group; the receiving module 301 is further configured to receive a group term acquisition response of the target group sent by the server; the data updating module is configured to update group member information and a local group term record of the target group according to a first group term record in the group term acquisition response, and update a local group term id of the target group to a maximum value in the first group term record; the first group term record is a record of the target group member having a group term id greater than the local group term id in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Optionally, the apparatus further comprises: an acquisition module and a determination module; the acquiring module is configured to acquire a second group term record in the local group term records based on the first group term id; the determining module is configured to determine, based on the second group term record, a total number of group members that receive the target message, and determine, according to the group member cursor information, a total number of read members in the target group member; the second group term record is a record of the local group term record, where the incoming group term id is smaller than or equal to the first group term id.
Note that, the group management apparatus shown in fig. 3 may be an electronic device in the above-described group management method.
Fig. 4 is a schematic structural diagram of a group management device according to an embodiment of the present application, as shown in fig. 4, including:
a receiving module 401, configured to receive a read message of an unread message in a target group by a target group member; a sending module 402, configured to send group member cursor information of the target group member to an electronic device; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; and the maximum read message ID is the message ID of the unread message which is sent by the electronic equipment and has the maximum message ID in the unread messages.
Optionally, the receiving module 401 is further configured to receive a target message sent by the electronic device; the target message is a group message with a message ID less than or equal to the maximum read message ID; the sending module 402 is further configured to send, to the electronic device, sending success information including a first group termID, and send the target message to a group member in the target group; wherein, the first group termID is a group termID of the target group when the electronic device sends the target message; the group termID of the target group increases with changes in the group members in the target group.
Optionally, the receiving module 401 is further configured to receive a group term acquisition request of the target group sent by the electronic device; the acquisition module is used for acquiring a first group term record based on the local group term ID of the target group carried in the group term acquisition request; the sending module 402 is further configured to send a group term acquisition response to the electronic device; wherein the group term acquisition response includes: a first group term record of the target group; the first group term record is a record of the group member of the target group with a group term ID greater than the local group term ID in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
Optionally, the sending module 402 is further configured to send a group member change notification to the electronic device when the group member of the target group changes, so that the electronic device updates the group member information of the target group in the electronic device by sending the group term acquisition request to the server after receiving the group member change notification.
The group management device shown in fig. 4 may be a server in the above-described group management method.
The group management device provided by the application records the member change record of the group by designing the group term record table on the server, and determines the group snapshot corresponding to any term ID according to the term record. When the group member changes, the term record can be synchronously updated to the local of the electronic equipment, so that the state change of the group message and the calculation of the read unread message are put in the local of the electronic equipment for calculation, and the server only keeps necessary message notification and data update, thereby greatly reducing the calculation amount of the server.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a group management method comprising: receiving group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; marking a target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a group management method provided by the above methods, the method comprising: receiving group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; marking a target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
In yet another aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor is implemented to perform the above provided group management methods, the method comprising: receiving group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; marking a target message in the target group as read by the target group member based on the group member cursor information; the target message is a group message sent by the electronic equipment and having a message ID less than or equal to the maximum read message ID.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A group management method applied to an electronic device, comprising:
receiving group member cursor information sent by a server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group;
marking a target message in the target group as read by the target group member based on the group member cursor information and a term record of the target group;
the target message is a group message which is sent by the electronic equipment and has a message ID smaller than or equal to the maximum read message ID; the term record of the target group includes: a group member change record for the target group; the term record of the target group is used for locally carrying out the change of the message state and the calculation of the read unread quantity.
2. The method of claim 1, wherein prior to receiving the group member cursor information sent by the server, the method further comprises:
sending the target message to the server;
receiving the successful sending information fed back by the server;
the transmission success information includes: a first group termID; the first group termID is the group termID of the target group when the server sends the target message to the group member of the target group; the group termID of the target group increases with changes in the group members in the target group.
3. The method according to claim 2, wherein the method further comprises:
sending a group term acquisition request of the target group to the server under the condition that the group member of the target group is changed; the group term acquisition request carries a local group term ID of the target group;
receiving a group term acquisition response of the target group sent by a server;
according to the first group term record in the group term acquisition response, updating the group member information and the local group term record of the target group, and updating the local group term ID of the target group to be the maximum value in the group term ID in the first group term record;
the first group term record is a record of the target group member having a group term id greater than the local group term id in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
4. A method according to claim 2 or 3, wherein the marking of the target message in the target group as read by the target group member based on the group member cursor information comprises:
acquiring a second group term record in the local group term records based on the first group term ID;
determining a total number of group members receiving the target message based on the second group term record, and determining a total number of read members in the target group member according to the group member cursor information;
the second group term record is a record of the local group term record, where the incoming group term id is smaller than or equal to the first group term id.
5. A group management method applied to a server, comprising:
receiving a read message of a target group member aiming at an unread message in the target group;
transmitting group member cursor information of the target group member to the electronic equipment;
the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; the maximum read message ID is the message ID of the unread message which is sent by the electronic equipment and has the maximum message ID in the unread messages;
Before the receiving the read message of the target group member for the unread message in the target group, the method further comprises:
sending a term record of the target group to the electronic equipment;
wherein the term record of the target group includes: a group member change record for the target group; the term record of the target group is used for locally carrying out the change of the message state and the calculation of the read unread quantity.
6. The method of claim 5, wherein prior to receiving the read message for the unread message in the target group by the target group member, the method further comprises:
receiving a target message sent by the electronic equipment; the target message is a group message with a message ID less than or equal to the maximum read message ID;
transmitting successful transmission information containing a first group termID to the electronic equipment, and transmitting the target message to group members in the target group;
wherein, the first group termID is a group termID of the target group when the electronic device sends the target message; the group termID of the target group increases with changes in the group members in the target group.
7. The method of claim 5, wherein the sending the term record for the target group to the electronic device comprises:
receiving a group term acquisition request of the target group sent by the electronic equipment;
based on the local group termID of the target group carried in the group term acquisition request, acquiring a first group term record, and sending a group term acquisition response to the electronic equipment;
wherein the group term acquisition response includes: a first group term record of the target group; the first group term record is a record of the group member of the target group with a group term ID greater than the local group term ID in the group term records of the server; the group term record comprises the group entering term ID and the group exiting term ID of the group member; when the group members enter the group, generating a group entry record; the group entering termID of the group entering record is the current group termID of the target group, and the group exiting termID of the group entering record is a preset value; generating a group withdrawal record when the group members withdraw the group; the entering group termID and the exiting group termID of the exiting group record are both the current group termID of the target group.
8. A group management device, the device comprising:
the receiving module is used for receiving group member cursor information sent by the server; the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group;
the marking module is used for marking the target message in the target group as read by the target group member based on the group member cursor information and the term record of the target group;
the target message is a group message which is sent by the electronic equipment and has a message ID smaller than or equal to the maximum read message ID; the term record of the target group includes: a group member change record for the target group; the term record of the target group is used for locally carrying out the change of the message state and the calculation of the read unread quantity.
9. A group management device, the device comprising:
the receiving module is used for receiving a read message of the target group member aiming at the unread message in the target group;
the sending module is used for sending the group member cursor information of the target group member to the electronic equipment;
the group member cursor information is used for indicating the maximum read message ID of the target group member in the target group; the maximum read message ID is the message ID of the unread message which is sent by the electronic equipment and has the maximum message ID in the unread messages;
The sending module is further configured to send a term record of the target group to the electronic device;
wherein the term record of the target group includes: a group member change record for the target group; the term record of the target group is used for locally carrying out the change of the message state and the calculation of the read unread quantity.
10. A computer readable storage medium comprising computer programs/instructions which when executed by a processor implement the steps of the group management method of any of claims 1 to 4 or 5 to 7.
CN202210051268.2A 2022-01-17 2022-01-17 Group management method and device Active CN114338255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210051268.2A CN114338255B (en) 2022-01-17 2022-01-17 Group management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210051268.2A CN114338255B (en) 2022-01-17 2022-01-17 Group management method and device

Publications (2)

Publication Number Publication Date
CN114338255A CN114338255A (en) 2022-04-12
CN114338255B true CN114338255B (en) 2023-09-05

Family

ID=81028212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210051268.2A Active CN114338255B (en) 2022-01-17 2022-01-17 Group management method and device

Country Status (1)

Country Link
CN (1) CN114338255B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577530A (en) * 2016-01-07 2016-05-11 天脉聚源(北京)科技有限公司 Group chat information overviewing method and apparatus
CN106503061A (en) * 2016-09-27 2017-03-15 维沃移动通信有限公司 One population message display method and mobile terminal
CN107948050A (en) * 2017-11-08 2018-04-20 用友网络科技股份有限公司 A kind of device and method that group message read states are provided
CN108400924A (en) * 2017-02-06 2018-08-14 阿里巴巴集团控股有限公司 Read state methods of exhibiting, instant communication client and the server-side of group message
CN110113489A (en) * 2019-04-30 2019-08-09 上海掌门科技有限公司 Message group sort method, device, electronic equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10268340B2 (en) * 2015-06-11 2019-04-23 International Business Machines Corporation Organizing messages in a hierarchical chat room framework based on topics
KR101695917B1 (en) * 2015-08-17 2017-01-12 네이버 주식회사 Method, system and recording medium for managing group message

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577530A (en) * 2016-01-07 2016-05-11 天脉聚源(北京)科技有限公司 Group chat information overviewing method and apparatus
CN106503061A (en) * 2016-09-27 2017-03-15 维沃移动通信有限公司 One population message display method and mobile terminal
CN108400924A (en) * 2017-02-06 2018-08-14 阿里巴巴集团控股有限公司 Read state methods of exhibiting, instant communication client and the server-side of group message
CN107948050A (en) * 2017-11-08 2018-04-20 用友网络科技股份有限公司 A kind of device and method that group message read states are provided
CN110113489A (en) * 2019-04-30 2019-08-09 上海掌门科技有限公司 Message group sort method, device, electronic equipment and medium

Also Published As

Publication number Publication date
CN114338255A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN100489842C (en) Distributed document retrieval method, device, program and recording medium for recording said program
US20080243789A1 (en) Groupware system with improved contact data handling
CN108744504B (en) Game data processing method and device, game server and game system
CN112052247A (en) Index updating system, method and device of search engine, electronic equipment and storage medium
CN110363663B (en) Block chain-based data batch processing method, device, equipment and storage medium
CN104113571A (en) Data collision processing method and device
CN110471749A (en) Task processing method, device, computer readable storage medium and computer equipment
US11829411B2 (en) Data recovery method and apparatus, electronic device, and storage medium
CN109560951B (en) Configuration method, alarm real-time statistical method, server and system
US20090319519A1 (en) Communication system, communication device, and computer program
US20120246311A1 (en) Session management system, session management device, session management method and session management program
CN111277483A (en) Multi-terminal message synchronization method, server and storage medium
CN114338255B (en) Group management method and device
CN116846980B (en) Integral issuing and using method, system and equipment
CN111884843B (en) Message processing method and device, electronic equipment and storage medium
EP2025133B1 (en) Repository synchronization in a ranked repository cluster
US8224940B2 (en) Strategies for compressing information using bloom filters
CN113377817A (en) Data processing method, system, device and storage medium
CN114640705B (en) Large-scale Internet of things terminal heartbeat monitoring method
CN111586438B (en) Method, device and system for processing service data
CN112968933B (en) Data transmission method, device, server and storage medium
CN106375354B (en) Data processing method and device
CN110716726A (en) Client updating method and device, electronic equipment and computer readable storage medium
CN114945036B (en) Processing method of shared data, related equipment and medium
CN114501082B (en) Live broadcast room distribution method and device

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
GR01 Patent grant
GR01 Patent grant