CN111147351A - Group message receipt updating method and device, readable storage medium and electronic equipment - Google Patents

Group message receipt updating method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN111147351A
CN111147351A CN201911319356.0A CN201911319356A CN111147351A CN 111147351 A CN111147351 A CN 111147351A CN 201911319356 A CN201911319356 A CN 201911319356A CN 111147351 A CN111147351 A CN 111147351A
Authority
CN
China
Prior art keywords
message
receipt
target
record
group
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.)
Granted
Application number
CN201911319356.0A
Other languages
Chinese (zh)
Other versions
CN111147351B (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201911319356.0A priority Critical patent/CN111147351B/en
Publication of CN111147351A publication Critical patent/CN111147351A/en
Application granted granted Critical
Publication of CN111147351B publication Critical patent/CN111147351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/23Reliability checks, e.g. acknowledgments or fault reporting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1813Arrangements for providing special services to substations for broadcast or conference, e.g. multicast for computer conferences, e.g. chat rooms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

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

Abstract

The disclosure relates to a method and a device for updating a group message receipt, a readable storage medium and an electronic device. The method comprises the following steps: in response to receiving a message receipt for the target message sent by the message receiver, updating a receipt record corresponding to the target message and the message receiver in the group message receipt table; updating a target receipt record corresponding to the target message in the group message receipt general table according to the ID of the message receiver which sends the message receipt aiming at the target message; deleting receipt records corresponding to all message receiver IDs in a message receiver ID set in the target receipt record from the receipt records corresponding to the target message in the group message receipt table; and responding to a receipt record acquisition instruction sent by the message sender receiving the target message, and sending the target receipt record to the message sender. Therefore, the number of the response piece records in the group message response piece table and the occupied storage space in the server can be reduced, and the storage pressure of the server is relieved.

Description

Group message receipt updating method and device, readable storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for updating a group message receipt, a readable storage medium, and an electronic device.
Background
Most of the existing instant messaging tools (such as QQ, WeChat, Tencent and the like) support message service communication, and users can perform daily activities such as chatting, notifying and the like through the message service. The message service has the advantages of flexible form, convenience, rapidness and the like. However, since the message service has the characteristic of non-real-time performance, the state of the message in the message sending process and the processing state (for example, whether the message is read or not) of the message by the receiver cannot be known, so that in some specific instant messaging application occasions, such as important notification issued by a company, publication of product information and the like, the message sender cannot ensure that the message receiver can receive and read the sent message in time, and the development of subsequent work is delayed in a serious case. Therefore, it is important to grasp the processing status of the message timely and accurately.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for updating a group message receipt, a readable storage medium, and an electronic device, so as to solve the problems in the related art.
In order to achieve the above object, a first aspect of the present disclosure provides an update method for a group message receipt, which is applied to a server and includes: in response to receiving a message receipt sent by a message receiver and aiming at a target message, updating a receipt record corresponding to the target message and the message receiver in a group message receipt table, wherein each receipt record in the group message receipt table comprises: the message receiving method comprises a message ID, a message receiving party ID, a message sending party ID and a receipt identifier, wherein the receipt identifier indicates that a message receipt sent by a message receiving party corresponding to the message receiving party ID is received when the receipt identifier is a preset value; updating a target receipt record corresponding to the target message in a group message receipt summary table according to the ID of the message receiver which sends the message receipt aiming at the target message, wherein the target receipt record comprises the message ID of the target message, the total quantity of the message receipts corresponding to the target message, the quantity of the received message receipts aiming at the target message and the ID set of the message receiver which sends the message receipt aiming at the target message; deleting receipt records corresponding to each message receiver ID in the message receiver ID set in the target receipt record from the receipt records corresponding to the target message in the group message receipt table; and responding to a receipt record acquisition instruction sent by the message sender receiving the target message, and sending the target receipt record to the message sender.
Optionally, the updating, according to the ID of the message recipient that sent the message receipt for the target message, a target receipt record corresponding to the target message in the group message receipt summary table includes: updating the message receiver ID set in the target receipt record and the number of received message receipts aiming at the target message according to the message receiver ID corresponding to the target message recorded in the message receiver ID array when the preset updating time is up, wherein the message receiver ID aiming at the message receipt of the message is sent between the current updating time and the last updating time aiming at each message is recorded in the message receiver ID array; the method further comprises the following steps: deleting the record corresponding to the target message in the message recipient ID array after deleting the receipt record corresponding to each message recipient ID in the message recipient ID set from the receipt records corresponding to the target message in the group message receipt table.
Optionally, the method further comprises: in response to receiving a message receipt aiming at the target message sent by a message receiver, updating the ID of the message receiver corresponding to the target message in the ID array of the message receiver according to the ID of the message receiver corresponding to the message receiver; or, every time the preset updating time is reached, updating the ID of the message receiver corresponding to the target message in the ID array of the message receiver according to the receipt record with the receipt identifier being the preset value in the receipt record corresponding to the target message in the group message receipt table.
Optionally, the updating, according to a message recipient ID corresponding to the target message recorded in a message recipient ID array, the message recipient ID set in the target receipt record, and the number of received message receipts for the target message includes: updating the target receipt record corresponding to the target message in a receipt record list according to the message receiver ID corresponding to the target message recorded in the message receiver ID array, wherein the receipt record list initially comprises the target receipt record corresponding to the target message in the group message receipt summary table; replacing the message receiver ID set in the target receipt record and the number of received message receipts for the target message in the group message receipt summary table with the message receiver ID set in the target receipt record and the number of received message receipts for the target message in the receipt record list, respectively.
Optionally, the updating, according to a message recipient ID corresponding to the target message recorded in a message recipient ID array, the message recipient ID set in the target receipt record, and the number of received message receipts for the target message includes: updating the target receipt record corresponding to the target message in a receipt record list according to the message receiver ID corresponding to the target message recorded in the message receiver ID array, wherein the receipt record list initially comprises the target receipt record corresponding to the target message in the group message receipt summary table; replacing a message recipient ID corresponding to the target message recorded in the message recipient ID array with the message recipient ID set in the target response piece record in the response piece record list; updating the target receipt record in the group message receipt general table according to the message receiver ID corresponding to the target message recorded in the message receiver ID array; deleting, from the receipt record corresponding to the target message in the group message receipt table, the receipt record corresponding to each message recipient ID in the message recipient ID set in the target receipt record, including: and deleting the receipt record corresponding to the message receiver ID corresponding to the target message, which is recorded in the message receiver ID array, from the receipt record corresponding to the target message in the group message receipt table.
Optionally, the receipt record list further includes a message sender ID of the target message; the sending the target response piece record to the message sender includes: and acquiring the ID of the message sender of the target message and the target receipt record corresponding to the target message from the receipt record list, and sending the acquired target receipt record to the message sender corresponding to the acquired ID of the message sender.
Optionally, after the step of sending the target response piece record to the message sender, the method further comprises: and deleting the target receipt record and the message sender ID of the target message in the receipt record list.
The second aspect of the present disclosure further provides an update method of a group message receipt, which is applied to a message receiver, and includes: determining whether a new message is received within a preset time length since the last message receipt is sent; if it is determined that a new message is received and the number of the received new messages does not reach a preset number, sending a message receipt for each new message to the server when the preset duration is over, or if it is determined that a new message is received and the number of the received new messages reaches the preset number before the preset duration is over, sending a message receipt for each new message to the server, so that the server receives the message receipt, and updates the group message receipt total table and the group message receipt table by using the method provided by the first aspect of the present disclosure, with each new message being respectively taken as a target message.
The third aspect of the present disclosure further provides an update method for group message receipt, which is applied to a message sender, and includes: generating a receipt record acquisition instruction, wherein the receipt record acquisition instruction is used for acquiring a receipt record of at least one message sent by the message sender, and the at least one message is a message of which all the receipts are not finished; sending the receipt record acquisition instruction to the server so that the server takes each message as the target message, and returning the target receipt record corresponding to each message by using the method provided by the first aspect of the disclosure; and receiving the target receipt record sent by the server.
Optionally, the generating a receipt record obtaining instruction includes: according to a preset period, periodically generating a receipt record acquisition instruction; alternatively, the method further comprises: when the group opening operation of a user is detected, determining whether the time interval between the time of the group opening operation and the time of the last group opening operation is greater than a preset time interval; and if the time interval is larger than the preset time interval, executing the step of generating the receipt record acquisition instruction.
The fourth aspect of the present disclosure further provides an apparatus for updating a group message receipt, which is applied to a server, and includes: a first updating module, configured to update response piece records corresponding to a target message and a message recipient in a group message response piece table in response to receiving a message response piece for the target message sent by the message recipient, where each response piece record in the group message response piece table includes: the message receiving method comprises a message ID, a message receiving party ID, a message sending party ID and a receipt identifier, wherein the receipt identifier indicates that a message receipt sent by a message receiving party corresponding to the message receiving party ID is received when the receipt identifier is a preset value; a second updating module, configured to update a target receipt record corresponding to the target message in a group message receipt summary table according to a message recipient ID that sends a message receipt for the target message, where the target receipt record includes the message ID of the target message, a total message receipt amount corresponding to the target message, the number of received message receipts for the target message, and a set of message recipient IDs that sent message receipts for the target message; a first deletion module, configured to delete a receipt record corresponding to each message recipient ID in the message recipient ID set in the target receipt record from a receipt record corresponding to the target message in the group message receipt table; and the first sending module is used for responding to a receipt record acquisition instruction sent by a message sender receiving the target message and sending the target receipt record to the message sender.
Optionally, the second updating module is configured to update, every time a preset updating time is reached, the message recipient ID set in the target receipt record according to the message recipient ID corresponding to the target message recorded in the message recipient ID array, and the number of received message receipts for the target message, where the message recipient ID set records a message recipient ID for each message, where the message recipient ID for the message receipt for the message is sent between the current updating time and the last updating time; the device further comprises: a second deleting module, configured to delete a record corresponding to the target message in the message recipient ID array after the step of deleting, by the first deleting module, a receipt record corresponding to each message recipient ID in the message recipient ID set from a receipt record corresponding to the target message in the group message receipt table.
Optionally, the apparatus further comprises: a third updating module, configured to update, in response to receiving a message receipt for a target message sent by a message recipient, a message recipient ID corresponding to the target message in the message recipient ID array according to the message recipient ID corresponding to the message recipient; or, every time the preset updating time is reached, updating the ID of the message receiver corresponding to the target message in the ID array of the message receiver according to the receipt record with the receipt identifier being the preset value in the receipt record corresponding to the target message in the group message receipt table.
Optionally, the second updating module includes: a first updating sub-module, configured to update the target receipt record corresponding to the target message in a receipt record list according to a message recipient ID corresponding to the target message recorded in the message recipient ID array, where the receipt record list initially includes the target receipt record corresponding to the target message in the group message receipt general table; a first replacement sub-module, configured to replace the message recipient ID set and the number of received message receipts for the target message in the target message receipt record in the group message receipt summary table with the message recipient ID set and the number of received message receipts for the target message in the target message receipt record in the receipt record list.
Optionally, the second updating module includes: a second updating sub-module, configured to update the target receipt record corresponding to the target message in a receipt record list according to the message recipient ID corresponding to the target message recorded in the message recipient ID array, where the receipt record list initially includes the target receipt record corresponding to the target message in the group message receipt general table; a second replacement sub-module, configured to replace, by the message recipient ID set in the target receipt record in the receipt record list, a message recipient ID corresponding to the target message recorded in the message recipient ID array; a third updating submodule, configured to update the target receipt record in the group message receipt summary table according to the message receiver ID corresponding to the target message recorded in the message receiver ID array; the first deleting module is configured to delete the receipt record corresponding to the message recipient ID corresponding to the target message, which is recorded in the message recipient ID array, from the receipt record corresponding to the target message in the group message receipt table.
Optionally, the receipt record list further includes a message sender ID of the target message; the first sending module is configured to obtain a message sender ID of the target message and a target receipt record corresponding to the target message from the receipt record list, and send the obtained target receipt record to a message sender corresponding to the obtained message sender ID.
Optionally, the apparatus further comprises: and the third deleting module is used for deleting the target receipt record in the receipt record list and the ID of the message sender of the target message.
The fifth aspect of the present disclosure further provides an apparatus for updating a group message receipt, which is applied to a message receiver, and includes: the first determining module is used for determining whether a new message is received within a preset time length since the last message receipt is sent; a second sending module, configured to send a message receipt for each new message to the server when the preset duration ends if it is determined that the new message is received and the number of the received new messages does not reach the preset number, or send a message receipt for each new message to the server when it is determined that the new message is received and the number of the received new messages reaches the preset number before the preset duration ends, so that the server receives the message receipt and uses each new message as a target message, and update the group message receipt list and the group message receipt list by using the method according to the first aspect of the present disclosure.
A sixth aspect of the present disclosure further provides an apparatus for updating a group message receipt, which is applied to a message sender, and includes: the generation module is used for generating a receipt record acquisition instruction, wherein the receipt record acquisition instruction is used for acquiring a receipt record of at least one message sent by the message sender, and the at least one message is a message of which all the receipts are not finished; a third sending module, configured to send the receipt record obtaining instruction to the server, so that the server uses each message as the target message, and returns a target receipt record corresponding to each message by using the method according to the first aspect of the disclosure; and the receiving module is used for receiving the target receipt record sent by the server.
Optionally, the generating module is configured to periodically generate a receipt record obtaining instruction according to a preset period; alternatively, the apparatus further comprises: the second determining module is used for determining whether the time interval between the moment of the group opening operation and the moment of the last group opening operation is greater than the preset time interval or not when the group opening operation of the user is detected; and if the time interval is greater than the preset time interval, driving the generation module to generate a receipt record acquisition instruction.
The seventh aspect of the present disclosure also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method provided by the first aspect of the present disclosure.
The eighth aspect of the present disclosure also provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, performs the steps of the method provided by the second aspect of the present disclosure.
The ninth aspect of the present disclosure also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method provided by the third aspect of the present disclosure.
The tenth aspect of the present disclosure also provides an electronic apparatus, including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method provided by the first aspect of the present disclosure.
The eleventh aspect of the present disclosure also provides an electronic device, including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method provided by the second aspect of the disclosure.
The twelfth aspect of the present disclosure also provides an electronic device, including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method provided by the third aspect of the present disclosure.
By adopting the technical scheme, the message receipt general table is newly added in the message center database of the server, and the message receiver ID set which sends the message receipt aiming at the target message in the target receipt records corresponding to the target message in the group message receipt general table is updated according to the message receiver ID which sends the message receipt aiming at the target message, so that the receipt records corresponding to all the message receiver IDs in the message receiver ID set in the target receipt records can be deleted from the receipt records corresponding to the target message in the group message receipt table. Therefore, the number of the receipt records in the group message receipt table and the occupied storage space of the receipt records in the server can be reduced, and the storage pressure of the server is relieved. And the receipt record acquisition instruction sent by the message sender receiving the target message sends the target receipt record to the message sender, and the receipt record corresponding to the target message does not need to be determined in a group message receipt table like the prior art, so that the time for reading the receipt record is reduced, and the efficiency for sending the receipt record is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1a and 1b are diagrams illustrating generation of a group message receipt in a related art according to an example embodiment.
FIG. 2 is a schematic diagram of an implementation scenario shown in accordance with an exemplary embodiment.
FIG. 3 is a flow diagram illustrating a method for updating a group message receipt in accordance with an exemplary embodiment.
Fig. 4 is a diagram illustrating a message center database in accordance with an exemplary embodiment.
FIG. 5 is a flow chart illustrating a method for updating a group message receipt according to another exemplary embodiment.
FIG. 6 is a flow chart illustrating a method for updating a group message receipt according to another exemplary embodiment.
FIG. 7 is a flowchart illustrating a method for updating a group message receipt according to another example embodiment.
FIG. 8 is a flowchart illustrating a method for updating a group message receipt according to another example embodiment.
Fig. 9 is a flow diagram illustrating the sending of a message receipt for each new message in accordance with an exemplary embodiment.
Fig. 10 is a flow chart illustrating sending a message receipt for each new message in accordance with another exemplary embodiment.
FIG. 11 is a flowchart illustrating a method for updating a group message receipt according to another example embodiment.
FIG. 12 is a block diagram illustrating an update mechanism for a group message receipt, according to an example embodiment.
FIG. 13 is a block diagram illustrating an update mechanism for a group message receipt according to another exemplary embodiment.
FIG. 14 is a block diagram illustrating an update mechanism for a group message receipt according to another exemplary embodiment.
FIG. 15 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 16 is a block diagram illustrating an electronic device in accordance with another example embodiment.
FIG. 17 is a block diagram illustrating an electronic device in accordance with another example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Before describing in detail the manner in which group message receipts are generated in the related art, a description of a message center database in the related art is first provided.
In the related art, as shown in fig. 1a and 1b, the message center database includes a group member table group _ users, a group message table group _ msgs, and a group message receipt table msg _ acks. Each member record in the group members table group _ users includes: the group ID to which the member belongs (denoted gID), the member ID (denoted uID), and the message ID of the message that the member has received the last time (denoted last _ msg _ ID). Each message record in the group message table group _ msgs includes: the message ID (denoted msg _ ID), group ID (denoted gID), message sender ID (denoted sender _ uID), transmission time (denoted time), and message content (denoted msg _ content) of the message. Each of the response piece records in the group message response piece table msg _ acks includes: message receiver ID (denoted rev _ uID), group ID (denoted gID), message sender ID (denoted sender _ uID), message ID (denoted msg _ ID), and receipt identification (denoted if _ ack). The receipt identifier in each receipt record is used to indicate whether the message receiver corresponding to the message receiver ID in the receipt record sends the message receipt for the message. Illustratively, when the receipt identifier is a preset value (e.g. 1), it indicates that the message receipt for the message sent by the message receiver corresponding to the message receiver ID has been received, and the message receipt is used to characterize that the message receiver has received or read the message.
The following describes a process of generating a group message receipt in the related art. A message sender sends a message within a group within the group. When receiving the message sent by the message sender, the server sends the message to other members in the group and in the online state, and updates the group message table group _ msgs and the group message receipt table msg _ acks.
Specifically, the server adds a message record corresponding to the ID of the message sender and the message ID of the message sent by the message sender to the group _ msgs. And the server also determines the group to which the message sender belongs and the number of other members except the message sender in the group according to the ID of the message sender and the group _ users in the group member table, wherein the number of the other members is the number of the message receivers, and then adds corresponding number of receipt records in the group message receipt table msg _ acks according to the number of the message receivers. For each added receipt record, the initial value of the receipt identifier is a numerical value representing that the message receipt for the message sent by the message receiver corresponding to the message receiver ID is not received, for example, the numerical value may be 0.
In addition, after the server sends the message to the message recipient who is online, the message recipient may send a message receipt for the message to the server when receiving the message or after a certain time after receiving the message. In this way, when receiving a message receipt for the message sent by the message sender, the server updates the group member table group _ users in the message center database, that is, updates last _ msg _ ID in the member record corresponding to the member ID in the group member table group _ users, which is consistent with the ID of the message receiver, to the message ID of the message. It should be noted that the message receipt sent by the message receiver to the server may include the message ID of the message received last time by the message receiver, so that when the server receives the message receipt, the server may update the last _ msg _ ID in the group member table group _ users based on the message ID of the message received last time in the message receipt.
Meanwhile, when the server receives the message receipt sent by the message sender, the server also needs to update the receipt records corresponding to the message receiver and the message in the group message receipt table msg _ acks. Specifically, the receipt identifier in the receipt record corresponding to the message receiver and the message is updated to a preset value indicating that the message receipt for the message sent by the message receiver corresponding to the message receiver ID has been received.
Illustratively, as shown in FIG. 1a, the group includes 4-bit members, member 1, member 2, member 3, and member 4, respectively. Wherein member 1 acts as the message sender and member 2, member 3 and member 4 act as the message receiver. When the server sends the message A sent by the member 1 to the message receivers (the member 2, the member 3 and the member 4), the server firstly determines whether all the message receivers in the group are in the online state. As shown in fig. 1a, assume that member 2 and member 3 are online and member 4 is offline, so the server first sends message a to member 2 and member 3, and after member 4 is online, sends message a to member 4. At the same time, the server adds three receipt records (not shown in FIG. 1 a) to the group message receipt table msg _ acks.
As shown in fig. 1b, when the server receives the message receipt for the message a sent by the members 2 and 3, the message ID of the message a is used as last _ msg _ ID in the member record corresponding to the member 2 and last _ msg _ ID in the member record corresponding to the member 3. Meanwhile, the server updates the receipt identifier in the receipt record corresponding to the member 2 and the message a in the group message receipt table msg _ acks from an initial value (e.g. 0) to a preset value (e.g. 1), and updates the receipt identifier in the receipt record corresponding to the member 3 and the message a from an initial value (e.g. 0) to a preset value (e.g. 1). It should be noted that, since the message receipt for the message a by the member 4 is not received, the receipt identifier in the receipt record corresponding to the member 4 and the message a is still the initial value. It should be noted that the target message mentioned below is a message that the message recipient sends a message receipt.
Thus, when the number of group members included in the group is large, if each piece of information is sent in the group, a large number of response piece records are added to the group message response piece table msg _ acks, so that the number of response piece records in the group message response piece table msg _ acks is large, which results in time consumption when reading the response piece records, and the group message response piece table msg _ acks also occupies a large storage space of the server, thereby increasing the storage pressure of the server.
In view of this, the present disclosure provides a method, an apparatus, a readable storage medium, and an electronic device for updating a group message receipt to reduce the number of receipt records in a group message receipt table, improve the efficiency of reading the receipt records, and relieve the storage pressure of a server.
A possible implementation scenario of the present disclosure is first explained. As shown in fig. 2, the implementation scenario may include a first electronic device 11 (illustrated as a laptop computer in fig. 2) as a message sender, a second electronic device 12 (illustrated as a desktop computer in fig. 2) as a message receiver, and a server 13. The first electronic device 11 and the second electronic device 12 are respectively connected to the server 13 in a communication manner. In the present disclosure, the update of the group message receipt is realized through the communication between the first electronic device 11 and the second electronic device 12 and the server 13, and the update method of the group message receipt provided by the present disclosure will be described in detail below.
FIG. 3 is a flow diagram illustrating a method for updating a group message receipt in accordance with an exemplary embodiment. The method may be applied to the server in fig. 2. As shown in fig. 3, the method may include steps 31 to 34.
In step 31, in response to receiving the message receipt for the target message sent by the message recipient, the receipt record corresponding to the target message and the message recipient in the group message receipt table is updated. Wherein each receipt record in the group message receipt table comprises: the message receiving terminal comprises a message ID, a message receiving terminal ID, a message sending terminal ID and a receipt identification, wherein the receipt identification indicates that the message receipt sent by the message receiving terminal corresponding to the message receiving terminal ID is received when the receipt identification is a preset value.
In the disclosure, when receiving a message receipt for a target message sent by a message receiver, a server updates a receipt record corresponding to the target message and the message receiver in a group message receipt table. Illustratively, as shown in fig. 1b, when receiving the message receipt for the target message sent by the member 2, the server updates the receipt identifier in the receipt record corresponding to the member 2 and the target message in the group message receipt table msg _ acks, i.e., updates the receipt identifier from an initial value (e.g., 0) to a preset value (e.g., 1) to characterize that the message receipt sent by the member 2 has been received.
In step 32, the target receipt record corresponding to the target message in the group message receipt summary table is updated based on the message recipient ID that sent the message receipt for the target message. The target receipt record comprises the message ID of the target message, the total message receipt amount corresponding to the target message, the number of received message receipts aiming at the target message and the ID set of the message receiving party sending the message receipts aiming at the target message.
In the present disclosure, in order to reduce the number of receipt records in the group message receipt table msg _ acks while still enabling the recording and storage of message receipts, the inventors have newly added a group message receipt summary table mag _ total _ ack in the message center database. As shown in fig. 4, each receipt record in the group message receipt total table mag _ total _ ack includes a message ID (denoted as msg _ ID), a total number of message receipts (total) corresponding to the message, a number of received message receipts for the message (denoted as has _ read _ num), and a set of message recipient IDs (denoted as has _ read _ list) that sent the message receipts for the message. It should be noted that, as shown in fig. 4, each receipt record in the group message receipt total table mag _ total _ ack may include, in addition to the above, a message receipt total list (denoted as total _ list) corresponding to the message, an update time (denoted as update _ time), and the like according to actual requirements.
In this way, the server may update the target receipt record corresponding to the target message in the group message receipt summary table based on the message recipient ID that sent the message receipt for the target message. Specifically, the number of received message receipts for the target message (has _ read _ num in fig. 4) and the set of message receiver IDs for which message receipts for the target message have been sent (has _ read _ list in fig. 4) in the target receipt record are updated according to the message receiver IDs for which message receipts for the target message have been sent.
In step 33, the response piece record corresponding to each message recipient ID in the message recipient ID set in the target response piece record is deleted from the response piece records corresponding to the target message in the group message response piece table.
Since the message recipient ID that has transmitted the message receipt for the target message is updated to the set of message recipient IDs in the target receipt record that have transmitted the message receipt for the target message in step 32, in order to reduce the number of receipt records in the group message receipt table msg _ acks and relieve the storage pressure of the server, in the present disclosure, the receipt records corresponding to each message recipient ID in the set of message recipient IDs in the target receipt record may be deleted from the receipt records in the group message receipt table that correspond to the target message.
For example, assuming that both member 2 and member 3 have sent a message receipt for the target message, the server may add the member 2ID and the member 3ID to the set of message recipient IDs in the target receipt record that sent the message receipt for the target message, and delete the receipt record corresponding to each message recipient ID in the set of message recipient IDs from the receipt record corresponding to the target message in the group message receipt table. For example, if the message recipient ID set includes only member 2ID and member 3ID, the receipt record corresponding to member 2ID and the receipt record corresponding to member 3ID are deleted.
In step 34, the target response piece record is sent to the message sender in response to the response piece record acquisition instruction sent by the message sender receiving the target message.
For example, when receiving the receipt record acquisition instruction sent by the member 1, the server sends the target receipt record to the member 1, so that the member 1 knows the status of the target message sent by the member 1, for example, which members in the group have received the message, how many members have not received the target message, and so on.
By adopting the technical scheme, the message receipt general table is newly added in the message center database of the server, and the message receiver ID set which sends the message receipt aiming at the target message in the target receipt records corresponding to the target message in the group message receipt general table is updated according to the message receiver ID which sends the message receipt aiming at the target message, so that the receipt records corresponding to all the message receiver IDs in the message receiver ID set in the target receipt records can be deleted from the receipt records corresponding to the target message in the group message receipt table. Therefore, the number of the receipt records in the group message receipt table and the occupied storage space of the receipt records in the server can be reduced, and the storage pressure of the server is relieved. And the receipt record acquisition instruction sent by the message sender receiving the target message sends the target receipt record to the message sender, and the receipt record corresponding to the target message does not need to be determined in a group message receipt table like the prior art, so that the time for reading the receipt record is reduced, and the efficiency for sending the receipt record is improved.
In view of the possibility that the efficiency of updating the group message receipt may be affected if the server updates the group message receipt and sends the target receipt record to the message sender at the same time, in the present disclosure, the group message receipt may be updated at regular times to avoid simultaneously updating the group message receipt and sending the target receipt record to the message sender. Illustratively, the group message receipt may be set to be updated 23:00 a day.
In addition, in the embodiment of setting the update time, when the message receiver ID that sent the message receipt for the target message is searched in the group message receipt table, and the target receipt record corresponding to the target message in the group message receipt total table is updated according to the searched message receiver ID, the update efficiency is low because the search for the receipt records in the group message receipt table is large in number and time-consuming. Thus, in the present disclosure, the set of message recipient IDs in the target response piece record may be updated by an array of message recipient IDs.
Specifically, as shown in fig. 5, step 32 in fig. 3 may specifically include step 321.
In step 321, every time the preset updating time is reached, updating the message recipient ID set in the target receipt record and the number of received message receipts for the target message according to the message recipient ID corresponding to the target message recorded in the message recipient ID array. The ID array of the message receiver records the ID of the message receiver which sends the message receipt aiming at each message between the current updating time and the last updating time.
In the present disclosure, the message receiver ID array records the message receiver ID of the message receipt transmitted for each message between the current update time and the last update time, and thus it is understood that the message receiver ID array changes according to the change of the message receiver ID of the message receipt transmitted for the message. That is, in the case of using the message recipient ID array, the message recipient ID array needs to be updated.
In one possible approach, in response to receiving a message receipt sent by a message recipient for a target message, a message recipient ID corresponding to the target message in a message recipient ID array is updated according to the message recipient ID corresponding to the message recipient. Illustratively, the server, upon receiving a message receipt for the target message sent by member 2, adds the member 2ID to the message recipient ID in the array of message recipient IDs corresponding to the target message.
In another possible mode, when the preset updating time is reached, according to the receipt record with the receipt identification being the preset value in the receipt records corresponding to the target message in the group message receipt table, the message receiver ID corresponding to the target message in the message receiver ID array is updated. In this manner, the message recipient ID array is updated every preset update time. Illustratively, the preset update time is 23:00 of each day, and it is assumed that within the time period from 23:00 of the previous day to 23:00 of today, the server only receives the message receipts of the member 2 and the member 3 for the target message, and then the receipt identifiers in the receipt records corresponding to the target message in the group message receipt table are updated to the preset values. Thus, when the user is 23:00 today, the server adds the member 2ID and the member 3ID to the message receiver ID corresponding to the target message in the message receiver ID array according to the receipt record with the receipt identification being the preset value in the receipt record corresponding to the target message in the group message receipt table.
For example, assume that the message recipient ID array is { msgAID: [ message receiver 2ID, message receiver 3ID ], msgBID: [ message receiver 4ID, message receiver 5ID ], … … }, the target message being message A sent by member 1. When the preset update time is reached, the server adds the message receiver 2ID and the message receiver 3ID which have sent the message A to the message receiver ID set in the target receipt record, and increases the number of the message receipts which have received the message A for the target message by 2.
In this way, since the message receiver ID array only records the message receiver ID of the message receipt for each message between the current update time and the last update time, the data amount in the message receiver ID array is much smaller than the number of receipt records in the group message receipt table, and the message receiver ID set in the target receipt record and the number of received message receipts for the target message are updated by using the message receiver ID corresponding to the target message recorded in the message receiver ID, so that the update efficiency can be improved.
Furthermore, in this embodiment, since the message recipient ID array includes the message recipient ID for the target message for which the message receipt for the target message was sent, in one possible implementation, the server may also delete the receipt record corresponding to the target message, the message recipient ID for which the message receipt for the target message was sent, based on the message recipient ID array. Illustratively, continuing with the example above, the receipt records corresponding to message a, member 2, and the receipt records corresponding to message a, member 3 are deleted from the group message receipt table.
As shown in fig. 5, after step 33, the method may further include step 35.
In step 35, the record in the message recipient ID array corresponding to the target message is deleted.
In order to ensure that only the message receiver ID for which the message receipt for the message is sent for each message between the current update time and the last update time is recorded in the message receiver ID array, after the step of deleting the receipt record corresponding to each message receiver ID in the message receiver ID set from the receipt records corresponding to the target message in the group message receipt table, the record corresponding to the target message in the message receiver ID array may also be deleted to reduce the data amount in the message receiver ID array as much as possible.
In view of the fact that the group message receipt summary table also stores the receipt records of all messages, and the number of the receipt records is relatively large, in order to enable the server to update the relevant data more quickly, in the present disclosure, before the group message receipt summary table is updated, a receipt record list may be generated based on the group message receipt summary table. Wherein the receipt record list initially includes target receipt records corresponding to the target messages in the group message receipt summary table.
In the case of generating the receipt record list, the specific implementation of step 321 in fig. 5 may include, but is not limited to, the following two ways.
As shown in fig. 6, in the first manner, step 321 may specifically include step 3211 and step 3212.
In step 3211, the target receipt record corresponding to the target message in the receipt record list is updated according to the message recipient ID corresponding to the target message recorded in the message recipient ID array. The receipt record list initially includes a target receipt record corresponding to the target message in the group message receipt summary table.
The group message receipt summary table needs to be stored in the server, and the receipt record list does not need to be stored in the server, so that for the relevant records of each message recorded in the receipt record list according to the present disclosure, after the server completes the current update of the group message receipt for the message, the relevant records of the message can be deleted, so as to reduce the data amount.
For example, assuming a message recipient ID array as described above, the list of response piece records may be: [ { magAID: xxxxxxxx, total: 3, has _ read _ num: 0, has _ read _ list: [] { magBID: xxxxxx, total: 6, has _ read _ num: 1, has _ read _ list: [ member 5ID ] },
… … ], updating the target receipt record corresponding to the target message in the receipt record list according to the message recipient ID corresponding to the target message recorded in the message recipient ID array, that is, adding the message recipient IDs (member 2ID and member 3ID) corresponding to the message a recorded in the message recipient ID array to the has _ read _ list in the receipt record list corresponding to the message a, and updating the has _ read _ num in the target receipt record from the initial value of 0 to 2, where the updated receipt record list is: [ { magAID: xxxxxxxx, total: 3, has _ read _ num: 2, has _ read _ list: [ member 2ID, member 3ID ] }, { magBID: xxxxxx, total: 6, has _ read _ num: 1, has _ read _ list: [ Member 5ID ] }, … … ].
It should be noted that, if the receipt record corresponding to each message recipient ID in the message recipient ID set in the target receipt record cannot be successfully deleted in the receipt record corresponding to the target message in the group message receipt table after the last update, in the above embodiment that the message recipient ID array is updated every preset update time, the updated message recipient ID array may include the message recipient ID that sent the message receipt for the target message before the last update time, in addition to the message recipient ID that sent the message receipt for the target message between the current update time and the last update time. In this way, when the receipt record list is updated with the array of message recipient IDs, the set of message recipient IDs in the target receipt record corresponding to the target message in the receipt record list may be caused to include duplicate message recipient IDs. Therefore, in the disclosure, after the target receipt record corresponding to the target message in the receipt record list is updated, a deduplication operation may also be performed on the message recipient ID set in the target receipt record, and the present disclosure does not limit the specific implementation manner of deduplication.
In step 3212, the set of message recipient IDs in the target receipt record in the group message receipt summary table and the number of message receipts that have been received for the target message are replaced with the set of message recipient IDs in the target receipt record in the receipt record list and the number of message receipts that have been received for the target message, respectively.
After the target receipt record corresponding to the target message in the receipt record list is updated, the message recipient ID for which the message receipt for the target message has been sent before the current time is already contained in the target receipt record corresponding to the target message in the receipt record list, so that the message recipient ID set in the target receipt record corresponding to the target message in the receipt record list and the number of received message receipts for the target message can be respectively replaced by the message recipient ID set in the target receipt record and the number of received message receipts for the target message in the group message receipt total table, so as to update the target receipt record corresponding to the target message in the group message receipt total table.
By adopting the technical scheme, firstly, the target receipt record corresponding to the target message in the receipt record list is updated according to the message receiver ID corresponding to the target message recorded in the message receiver ID array, and then the target receipt record in the group message receipt general list is updated according to the target receipt record in the receipt record list. Therefore, due to the fact that the data volume in the ID array of the message receiver and the data volume in the receipt record list are small, the server can conveniently inquire the related information needing to be updated in the ID array of the message receiver and the receipt record list in the updating process, and the updating efficiency can be improved.
As shown in fig. 7, in the second manner, the step 321 may specifically include steps 3213 to 3215.
In step 3213(3211), the target receipt record corresponding to the target message in the receipt record list is updated according to the message recipient ID corresponding to the target message recorded in the message recipient ID array. The receipt record list initially includes a target receipt record corresponding to the target message in the group message receipt summary table.
In step 3214, the message recipient ID recorded in the message recipient ID array that corresponds to the target message is replaced with the set of message recipient IDs in the target response piece record in the response piece record list.
As described above, the message recipient ID array only records the message recipient IDs for each message for which the message receipt for the message is sent between the current update time and the last update time, and the message recipient ID set in the target receipt record in the receipt record list includes all the message recipient IDs for which the message receipt for the target message has been sent before the current time, that is, the number of message recipient IDs included in the message recipient ID set in the target receipt record in the receipt record list is greater than the number of message recipient IDs included in the message recipient ID array for which the message receipt for the target message is sent. Thus, in the present disclosure, a message recipient ID corresponding to the target message recorded in the message recipient ID array may be replaced with a set of message recipient IDs in the target response piece record in the response piece record list, such that all message recipient IDs for which a message response piece for the target message has been sent prior to the current time are included in the replaced message recipient ID array.
In step 3215, the target receipt record in the group message receipt summary table is updated according to the message recipient ID corresponding to the target message recorded in the array of message recipient IDs.
As shown above, after step 3214, the message recipient ID array includes all message recipient IDs that have sent the message receipt for the target message before the current time, and the server may update the target receipt record in the group message receipt list according to the message recipient ID corresponding to the target message recorded in the message recipient ID array.
Accordingly, as shown in fig. 7, step 33 in fig. 3 may specifically include step 331.
In step 331, the receipt record corresponding to the message recipient ID corresponding to the target message recorded in the message recipient ID array is deleted from the receipt records corresponding to the target message in the group message receipt table.
As indicated above, after step 3214, the array of message recipient IDs includes all message recipient IDs for which a message receipt for the target message has been sent before the current time, and to reduce the number of receipt records in the group message receipt table, the relevant information in the target receipt record that has been updated into the group message receipt summary table may be deleted from the group message receipt table. Illustratively, the receipt record corresponding to the message recipient ID corresponding to the target message recorded in the message recipient ID array is deleted.
By adopting the technical scheme, after the target receipt record in the receipt record list is updated, the message receiver ID set in the target receipt record is used for replacing the message receiver ID corresponding to the target message recorded in the message receiver ID array, the message receiver ID array is used for updating the target receipt record in the group message receipt general list, and the receipt record corresponding to the message receiver ID corresponding to the target message recorded in the message receiver ID array is deleted, so that the updating rate is further improved.
In addition, because the data volume in the receipt record list is less than the number of receipt records in the message receipt total table, the target receipt record required to be sent to the message sender is searched in the receipt record list, compared with the target receipt record required to be sent to the message sender is searched in the message receipt total table, and the searching time can be greatly shortened. And, normally, the message sender can only obtain the receipt record of the message sent by itself, so in this disclosure, the receipt record list may further include the message sender ID of the target message. Wherein, the server can determine the message sender ID of the target message ID according to the target message ID and the group message receipt table.
Therefore, as shown in fig. 6 and 7, step 34 in fig. 3 may specifically include step 341.
In step 341, the message sender ID of the target message and the target receipt record corresponding to the target message are obtained from the receipt record list, and the obtained target receipt record is sent to the message sender corresponding to the obtained message sender ID.
By adopting the technical scheme, the ID of the message sender of the target message and the target receipt record corresponding to the target message are obtained from the receipt record list, and the target receipt record is sent to the message sender corresponding to the obtained ID of the message sender, so that the searching time is greatly shortened, and the updating efficiency of the group message receipt is further improved.
After the target receipt record is sent to the message sender corresponding to the acquired message sender ID, the target receipt record and the message sender ID of the target message in the receipt record list can be deleted. For example, assuming that the target message is message a, and member 1 in fig. 1 is the message sender of the message a, after the server sends the target receipt record corresponding to the target message to member 1, the server may delete the target receipt record and member 1ID in the receipt record list to reduce the amount of data in the receipt record list.
In addition, in the related art, the message receiver usually sends the message receipt to the server in a batch manner, or sends the message receipt to the server in a polling manner. In the case of sending message receipt to the server in batch, the message receiver sends a message receipt for each of the N messages to the server once every time it receives N (N is an integer greater than 1) messages, but if the message receiver receives N-1 messages and does not receive any message for a long time, the message receipt for each of the N-1 messages will be overstocked. In the case of sending a message receipt to the server in a polling manner, the message receiver will send the message receipt at intervals of T, but if the message receiver does not receive the message within the time interval T, the message receipt sent this time is an empty receipt without any data, that is, the message receipt sent this time is an invalid receipt.
In order to solve the above problems in the related art, the present disclosure also provides an updating method applied to a group message receipt of a message recipient. As shown in fig. 8, the method may include steps 81 to 82.
In step 81, it is determined whether a new message has been received within a preset time period since the last message receipt was sent.
In step 82, if it is determined that the new message is received and the number of the received new messages does not reach the preset number, a message receipt for each new message is sent to the server at the end of the preset duration, or if it is determined that the new message is received and the number of the received new messages reaches the preset number before the end of the preset duration, a message receipt for each new message is sent to the server, so that the server receives the message receipt, and updates the group message receipt list and the group message receipt list according to the above-described updating method of the group message receipt, with each new message being used as a target message.
In one embodiment, as shown in fig. 9, the process of the message receiver sending a message receipt for each new message to the server is as follows:
in step 91, when the message receipt was last sent, the message reception flag is initialized: revNum is 0, and the timer time is reset to 0.
In step 92, it is determined whether a new message has been received. If a new message is received, step 93 is executed, otherwise step 92 is repeatedly executed.
In step 93, revNum is incremented by 1 and it is determined whether revNum is equal to N. If N, go to step 95, otherwise go to step 94.
In step 94, it is determined whether the timer time reaches T, if yes, step 95 is executed, otherwise, step 92 is returned to.
In step 95, a message receipt for each new message is sent to the server.
Under the condition of sending the message receipt to the server in a batch mode, due to the fact that the time limit is added, even if the preset number of new messages are not received, the message receipt aiming at each new message is still sent to the server when the preset time is over, and therefore the problem that the message receipt is overstocked can be solved.
In another embodiment, as shown in fig. 10, the process of the message receiver sending the message receipt for each new message to the server is as follows:
in step 101, the timer time is reset to 0 at the last time the message receipt was sent.
In step 102, it is determined whether a new message has been received. If the information is received, step 103 is executed, otherwise step 102 is executed repeatedly.
In step 103, it is determined whether the timer time reaches T, if yes, step 104 is executed, otherwise, step 102 is returned to.
In step 104, a message receipt for each new message is sent to the server.
Under the condition of sending the message receipt to the server in a polling mode, because the step of detecting whether a new message is received is added, if the new message is not received within the preset time length since the message receipt is sent last time, the message receipt cannot be sent to the server when the preset time length is over. In this way, the message recipient can be prevented from sending invalid message receipts.
By adopting the scheme, the message receiver determines that the new message is received within the preset time length since the message receipt is sent last time and the number of the received new messages does not reach the preset number, the message receipt aiming at each new message is sent to the server when the preset time length is ended, or the message receipt aiming at each new message is sent to the server if the new message is determined to be received and the number of the received new messages reaches the preset number before the preset time length is ended, so that the problem that the message receipt is overstocked in the related technology and the problem that the receiver sends invalid message receipt can be avoided.
In addition, the inventor also finds that, in the related art, a message sender typically polls the server at regular intervals to obtain a receipt record, and if all messages sent by the message sender are messages that have been completed and no new message is sent within a certain time, the receipt record obtained by the message sender to the server again is a receipt record that is repeated with the last obtained receipt record, or an empty receipt record. In this case, the retrieved response piece record is an invalid response piece record.
In order to avoid the message sender acquiring an invalid receipt record, the present disclosure also provides an updating method applied to the group message receipt of the message sender. As shown in fig. 11, the method may include the following steps.
In step 111, a response piece record fetch instruction is generated. The receipt record obtaining instruction is used for obtaining a receipt record of at least one message sent by a message sender, wherein the at least one message is a message of which all the receipt is not finished.
It should be noted that the message whose receipt is not completed all the time refers to the message whose number of received message receipts for the message is less than the total number of message receipts corresponding to the message in the last obtained receipt record.
The manner of generating the receipt record obtaining instruction may include, but is not limited to, the following two manners. In the first manner, the receipt record acquisition instruction is periodically generated at a preset cycle. In this way, before generating a receipt record acquisition instruction each time, a message sender first determines whether a message with not all receipts completed yet exists according to a last-obtained receipt record, and if so, periodically generates a receipt record acquisition instruction according to a preset period. If the message that all the receipt is not finished is determined to be absent, whether a new message is sent again in the time period of the last receipt record acquisition instruction and the current receipt record acquisition instruction is generated is further determined, if the new message is sent, the receipt record acquisition instruction is periodically generated according to a preset period, and otherwise, the receipt record acquisition instruction is not generated.
In the second mode, when detecting an operation of opening a group by a user, a message sender determines whether a time interval between the time of the group opening operation and the time of the last group opening operation is greater than a preset time interval, and if the time interval is greater than the preset time interval, a receipt record acquisition instruction is generated. Therefore, the message receiver can be prevented from repeatedly acquiring the receipt records of the same group, and the message sender can be prevented from acquiring invalid receipt records.
In step 112, a receipt record obtaining instruction is sent to the server, so that the server returns the target receipt record corresponding to each message by using each message as a target message according to the above-described group message receipt updating method.
In step 113, the target response piece record sent by the server is received.
By adopting the technical scheme, the message sender generates the receipt record acquisition instruction when determining that the message with not all the receipts is finished so as to acquire the target receipt record sent by the server, so that the message sender can be prevented from acquiring invalid receipt records, the workload of the message sender for generating the receipt record acquisition instruction can be reduced, and the times of reading the target receipt record by the server are reduced.
Based on the same inventive concept, the disclosure also provides an updating device of the group message receipt applied to the server. FIG. 12 is a block diagram illustrating an update mechanism for a group message receipt, according to an example embodiment. The device for updating the group message receipt is applied to the server, and the device can comprise:
a first updating module 121, configured to update response piece records corresponding to a target message and a message recipient in a group message response piece table in response to receiving a message response piece sent by the message recipient and directed to the target message, where each response piece record in the group message response piece table includes: the message receiving method comprises a message ID, a message receiving party ID, a message sending party ID and a receipt identifier, wherein the receipt identifier indicates that a message receipt sent by a message receiving party corresponding to the message receiving party ID is received when the receipt identifier is a preset value;
a second updating module 122, configured to update a target receipt record corresponding to the target message in a group message receipt summary table according to a message recipient ID of a message receipt sent for the target message, where the target receipt record includes the message ID of the target message, a total message receipt amount corresponding to the target message, the number of received message receipts for the target message, and a set of message recipient IDs of message receipts sent for the target message;
a first deleting module 123, configured to delete, from a receipt record corresponding to the target message in the group message receipt table, a receipt record corresponding to each message recipient ID in the message recipient ID set in the target receipt record;
a first sending module 124, configured to send the target response piece record to the message sender in response to a response piece record obtaining instruction sent by the message sender that receives the target message.
Optionally, the second updating module 122 may be configured to update, every time a preset updating time is reached, the message recipient ID set in the target receipt record according to the message recipient ID corresponding to the target message recorded in the message recipient ID array, and the number of received message receipts for the target message, where the message recipient ID set records, between the current updating time and the last updating time, a message recipient ID for sending a message receipt for the message for each message between the current updating time and the last updating time;
the apparatus may further include:
a second deleting module, configured to delete a record corresponding to the target message in the message recipient ID array after the step of deleting, by the first deleting module, a receipt record corresponding to each message recipient ID in the message recipient ID set from a receipt record corresponding to the target message in the group message receipt table.
Optionally, the apparatus may further include:
a third updating module, configured to update, in response to receiving a message receipt for a target message sent by a message recipient, a message recipient ID corresponding to the target message in the message recipient ID array according to the message recipient ID corresponding to the message recipient; or
And updating the ID of the message receiver corresponding to the target message in the ID array of the message receiver according to the receipt record with the receipt identifier being the preset value in the receipt record corresponding to the target message in the group message receipt table at the preset updating time.
Optionally, the second updating module 122 may include:
a first updating sub-module, configured to update the target receipt record corresponding to the target message in a receipt record list according to a message recipient ID corresponding to the target message recorded in the message recipient ID array, where the receipt record list initially includes the target receipt record corresponding to the target message in the group message receipt general table;
a first replacement sub-module, configured to replace the message recipient ID set and the number of received message receipts for the target message in the target message receipt record in the group message receipt summary table with the message recipient ID set and the number of received message receipts for the target message in the target message receipt record in the receipt record list.
Optionally, the second updating module 122 may include:
a second updating sub-module, configured to update the target receipt record corresponding to the target message in a receipt record list according to the message recipient ID corresponding to the target message recorded in the message recipient ID array, where the receipt record list initially includes the target receipt record corresponding to the target message in the group message receipt general table;
a second replacement sub-module, configured to replace, by the message recipient ID set in the target receipt record in the receipt record list, a message recipient ID corresponding to the target message recorded in the message recipient ID array;
a third updating submodule, configured to update the target receipt record in the group message receipt summary table according to the message receiver ID corresponding to the target message recorded in the message receiver ID array;
the first deleting module may be configured to delete a receipt record corresponding to a message recipient ID corresponding to the target message, which is recorded in the message recipient ID array, from a receipt record corresponding to the target message in the group message receipt table.
Optionally, the receipt record list further includes a message sender ID of the target message;
the first sending module may be configured to obtain a message sender ID of the target message and a target receipt record corresponding to the target message from the receipt record list, and send the obtained target receipt record to a message sender corresponding to the obtained message sender ID.
Optionally, the apparatus may further include:
and the third deleting module is used for deleting the target receipt record in the receipt record list and the ID of the message sender of the target message.
FIG. 13 is a block diagram illustrating an update mechanism for a group message receipt according to another exemplary embodiment. The device for updating the group message receipt is applied to a message receiver, and the device can comprise:
a first determining module 131, configured to determine whether a new message is received within a preset time period since a last message receipt is sent;
a second sending module 132, configured to send a message receipt for each new message to the server when the preset duration ends if it is determined that the new message is received and the number of the received new messages does not reach the preset number, or send a message receipt for each new message to the server when it is determined that the new message is received and the number of the received new messages reaches the preset number before the preset duration ends, so that the server receives the message receipt and uses each new message as a target message, and updates the group message receipt list and the group message receipt list by using the method according to the first aspect of the present disclosure.
FIG. 14 is a block diagram illustrating an update mechanism for a group message receipt according to another exemplary embodiment. The device for updating the group message receipt is applied to the message sender, and the device can comprise:
a generating module 141, configured to generate a receipt record obtaining instruction, where the receipt record obtaining instruction is used to obtain a receipt record of at least one message sent by the message sender, where the at least one message is a message for which all receipts have not been completed;
a third sending module 142, configured to send the receipt record obtaining instruction to the server, so that the server uses each message as the target message, and returns a target receipt record corresponding to each message by using the method according to the first aspect of the present disclosure;
a receiving module 143, configured to receive the target response piece record sent by the server.
Optionally, the generating module 141 may be configured to periodically generate a receipt record obtaining instruction according to a preset period; or
The apparatus may further include:
the second determining module is used for determining whether the time interval between the moment of the group opening operation and the moment of the last group opening operation is greater than the preset time interval or not when the group opening operation of the user is detected; and if the time interval is greater than the preset time interval, driving the generation module to generate a receipt record acquisition instruction.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 15 is a block diagram illustrating an electronic device in accordance with an example embodiment. As shown in fig. 15, the electronic device 1500 may be provided as a message recipient, and the electronic device 1500 may include: a processor 1501, a memory 1502. The electronic device 1500 may also include one or more of a multimedia component 1503, an input/output (I/O) interface 1504, and a communications component 1505.
The processor 1501 is configured to control the overall operation of the electronic device 1500, so as to complete all or part of the steps in the above-described update method applied to the group message receipt of the message recipient. The memory 1502 is used to store various types of data to support operation at the electronic device 1500, such as instructions for any application or method operating on the electronic device 1500, as well as application-related data, such as contact data, messaging, pictures, audio, video, and the like. The Memory 1502 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 1503 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 1502 or transmitted via the communication component 1505. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 1504 provides an interface between the processor 1501 and other interface modules, such as a keyboard, mouse, buttons, and the like. These buttons may be virtual buttons or physical buttons. The communication component 1505 is used for wired or wireless communication between the electronic device 1500 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 1505 may therefore include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 1500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described update method applied to group message receipt of message recipients.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the above-described update method applied to a group message receipt for a message recipient. For example, the computer readable storage medium may be the memory 1502 described above including program instructions executable by the processor 1501 of the electronic device 1500 to perform the update method described above as applied to a group message receipt for a message recipient.
FIG. 16 is a block diagram illustrating an electronic device in accordance with another example embodiment. As shown in fig. 16, the electronic device 1600 may be provided as a message sender, and the electronic device 1600 may include: a processor 1601, a memory 1602. The electronic device 1600 may also include one or more of a multimedia component 1603, an input/output (I/O) interface 1604, and a communications component 1605.
The processor 1601 is configured to control the overall operation of the electronic device 1600, so as to complete all or part of the steps in the above-described update method applied to the group message receipt of the message sender. The memory 1602 is used to store various types of data to support operation at the electronic device 1600, such as instructions for any application or method operating on the electronic device 1600, and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 1602 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. Multimedia components 1603 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may further be stored in memory 1602 or transmitted through communications component 1605. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 1604 provides an interface between the processor 1601 and other interface modules, such as a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 1605 is used for wired or wireless communication between the electronic device 1600 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 1605 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 1600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described update method applied to group message receipt by message senders.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the above-described update method applied to a group message receipt of a message sender. For example, the computer readable storage medium may be the memory 1602 described above including program instructions that are executable by the processor 1601 of the electronic device 1600 to perform the update method described above as applied to a group message receipt of a message sender.
FIG. 17 is a block diagram illustrating an electronic device in accordance with another example embodiment. For example, the electronic device 1700 may be provided as a server. Referring to fig. 17, electronic device 1700 includes a processor 1722, which can be one or more in number, and a memory 1732 for storing computer programs that are executable by processor 1722. The computer programs stored in memory 1732 may include one or more modules that each correspond to a set of instructions. Further, the processor 1722 may be configured to execute the computer program to perform the above-described update method applied to the group message receipt of the server.
Additionally, electronic device 1700 may also include a power component 1726, which power component 1726 may be configured to perform power management for electronic device 1700, and a communication component 1750, which communication component 1750 may be configured to enable communication for electronic device 1700, e.g., wired or wireless communication. In addition, the electronic device 1700 may also include input/output (I/O) interfaces 1758. The electronic device 1700 may operate based on an operating system, such as Windows Server, Mac OS XTM, UnixTM, Linux, etc., stored in the memory 1732.
In another exemplary embodiment, there is also provided a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the above-described update method applied to a group message receipt of a server. For example, the computer readable storage medium may be the memory 1732 described above including program instructions executable by the processor 1722 of the electronic device 1700 to perform the update method described above for a group message receipt applied to a server.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned update method of a group message receipt when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A method for updating a group message receipt is applied to a server and comprises the following steps:
in response to receiving a message receipt sent by a message receiver and aiming at a target message, updating a receipt record corresponding to the target message and the message receiver in a group message receipt table, wherein each receipt record in the group message receipt table comprises: the message receiving method comprises a message ID, a message receiving party ID, a message sending party ID and a receipt identifier, wherein the receipt identifier indicates that a message receipt sent by a message receiving party corresponding to the message receiving party ID is received when the receipt identifier is a preset value;
updating a target receipt record corresponding to the target message in a group message receipt summary table according to the ID of the message receiver which sends the message receipt aiming at the target message, wherein the target receipt record comprises the message ID of the target message, the total quantity of the message receipts corresponding to the target message, the quantity of the received message receipts aiming at the target message and the ID set of the message receiver which sends the message receipt aiming at the target message;
deleting receipt records corresponding to each message receiver ID in the message receiver ID set in the target receipt record from the receipt records corresponding to the target message in the group message receipt table;
and responding to a receipt record acquisition instruction sent by the message sender receiving the target message, and sending the target receipt record to the message sender.
2. A method for updating a group message receipt is applied to a message receiver and comprises the following steps:
determining whether a new message is received within a preset time length since the last message receipt is sent;
if it is determined that a new message is received and the number of the received new messages does not reach a preset number, sending a message receipt for each new message to the server when the preset duration is over, or if it is determined that a new message is received and the number of the received new messages reaches the preset number before the preset duration is over, sending a message receipt for each new message to the server so that the server receives the message receipt, and using each new message as a target message respectively, updating the group message receipt list and the group message receipt list by using the method of claim 1.
3. A method for updating a group message receipt is applied to a message sender, and comprises the following steps:
generating a receipt record acquisition instruction, wherein the receipt record acquisition instruction is used for acquiring a receipt record of at least one message sent by the message sender, and the at least one message is a message of which all the receipts are not finished;
sending the receipt record acquisition instruction to the server so that the server respectively takes each message as the target message, and returning the target receipt record corresponding to each message by using the method of claim 1;
and receiving the target receipt record sent by the server.
4. An apparatus for updating a group message receipt, applied to a server, comprising:
a first updating module, configured to update response piece records corresponding to a target message and a message recipient in a group message response piece table in response to receiving a message response piece for the target message sent by the message recipient, where each response piece record in the group message response piece table includes: the message receiving method comprises a message ID, a message receiving party ID, a message sending party ID and a receipt identifier, wherein the receipt identifier indicates that a message receipt sent by a message receiving party corresponding to the message receiving party ID is received when the receipt identifier is a preset value;
a second updating module, configured to update a target receipt record corresponding to the target message in a group message receipt summary table according to a message recipient ID that sends a message receipt for the target message, where the target receipt record includes the message ID of the target message, a total message receipt amount corresponding to the target message, the number of received message receipts for the target message, and a set of message recipient IDs that sent message receipts for the target message;
a first deletion module, configured to delete a receipt record corresponding to each message recipient ID in the message recipient ID set in the target receipt record from a receipt record corresponding to the target message in the group message receipt table;
and the first sending module is used for responding to a receipt record acquisition instruction sent by a message sender receiving the target message and sending the target receipt record to the message sender.
5. An apparatus for updating a group message receipt, applied to a message receiver, comprising:
the determining module is used for determining whether a new message is received within a preset time length since the last message receipt is sent;
a second sending module, configured to send a message receipt for each new message to the server when the preset duration ends if it is determined that the new message is received and the number of the received new messages does not reach the preset number, or send a message receipt for each new message to the server when it is determined that the new message is received and the number of the received new messages reaches the preset number before the preset duration ends, so that the server receives the message receipt and uses each new message as a target message, and update the group message receipt list and the group message receipt list by using the method according to claim 1.
6. An apparatus for updating a group message receipt, applied to a message sender, comprising:
the generation module is used for generating a receipt record acquisition instruction, wherein the receipt record acquisition instruction is used for acquiring a receipt record of at least one message sent by the message sender, and the at least one message is a message of which all the receipts are not finished;
a third sending module, configured to send the receipt record obtaining instruction to the server, so that the server uses each message as the target message, and returns a target receipt record corresponding to each message by using the method according to claim 1;
and the receiving module is used for receiving the target receipt record sent by the server.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
8. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of claim 1.
9. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of claim 2.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of claim 3.
CN201911319356.0A 2019-12-19 2019-12-19 Group message receipt updating method and device, readable storage medium and electronic equipment Active CN111147351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911319356.0A CN111147351B (en) 2019-12-19 2019-12-19 Group message receipt updating method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911319356.0A CN111147351B (en) 2019-12-19 2019-12-19 Group message receipt updating method and device, readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111147351A true CN111147351A (en) 2020-05-12
CN111147351B CN111147351B (en) 2022-02-08

Family

ID=70518986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911319356.0A Active CN111147351B (en) 2019-12-19 2019-12-19 Group message receipt updating method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111147351B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235189A (en) * 2020-10-19 2021-01-15 华世界数字科技(深圳)有限公司 Method and device for processing read and unread group chat statistical messages
CN113014470A (en) * 2021-01-07 2021-06-22 腾讯科技(深圳)有限公司 Receipt processing method and device for session message in instant messaging application
CN115379400A (en) * 2021-05-20 2022-11-22 成都鼎桥通信技术有限公司 Method and device for group short message receipt
CN115378991A (en) * 2022-08-18 2022-11-22 中国建设银行股份有限公司 Message processing method, device, equipment and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744729A (en) * 2004-09-01 2006-03-08 乐金电子(中国)研究开发中心有限公司 Method for feeding-back information of short message processed and mobile phone
CN101409872A (en) * 2008-11-19 2009-04-15 中兴通讯股份有限公司 Method for processing color message group send acknowledgement
CN102348175A (en) * 2010-07-30 2012-02-08 阿里巴巴集团控股有限公司 Method for feeding back short message processing information and apparatus thereof
US20150012597A1 (en) * 2013-07-03 2015-01-08 International Business Machines Corporation Retroactive management of messages
CN109657152A (en) * 2018-12-27 2019-04-19 北京顺丰同城科技有限公司 PUSH message sending method, device, electronic equipment and readable storage medium storing program for executing
CN110247838A (en) * 2018-03-07 2019-09-17 阿里巴巴集团控股有限公司 Message treatment method, device, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744729A (en) * 2004-09-01 2006-03-08 乐金电子(中国)研究开发中心有限公司 Method for feeding-back information of short message processed and mobile phone
CN101409872A (en) * 2008-11-19 2009-04-15 中兴通讯股份有限公司 Method for processing color message group send acknowledgement
CN102348175A (en) * 2010-07-30 2012-02-08 阿里巴巴集团控股有限公司 Method for feeding back short message processing information and apparatus thereof
US20150012597A1 (en) * 2013-07-03 2015-01-08 International Business Machines Corporation Retroactive management of messages
CN110247838A (en) * 2018-03-07 2019-09-17 阿里巴巴集团控股有限公司 Message treatment method, device, server and storage medium
CN109657152A (en) * 2018-12-27 2019-04-19 北京顺丰同城科技有限公司 PUSH message sending method, device, electronic equipment and readable storage medium storing program for executing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235189A (en) * 2020-10-19 2021-01-15 华世界数字科技(深圳)有限公司 Method and device for processing read and unread group chat statistical messages
CN113014470A (en) * 2021-01-07 2021-06-22 腾讯科技(深圳)有限公司 Receipt processing method and device for session message in instant messaging application
CN115379400A (en) * 2021-05-20 2022-11-22 成都鼎桥通信技术有限公司 Method and device for group short message receipt
CN115379400B (en) * 2021-05-20 2023-11-07 成都鼎桥通信技术有限公司 Method and device for group short message receipt
CN115378991A (en) * 2022-08-18 2022-11-22 中国建设银行股份有限公司 Message processing method, device, equipment and computer storage medium
CN115378991B (en) * 2022-08-18 2024-04-19 中国建设银行股份有限公司 Message processing method, device, equipment and computer storage medium

Also Published As

Publication number Publication date
CN111147351B (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN111147351B (en) Group message receipt updating method and device, readable storage medium and electronic equipment
US7957775B2 (en) Low battery notification service for wireless device users
RU2607616C2 (en) Selective linking of message accounts
CN106911556B (en) Message reminding management method and terminal
TW201830986A (en) Method for withdrawing and modifying instant communication message, instant communication client side and server side
CN102769640B (en) The update method of user profile, server and system
US9674127B2 (en) Selective message republishing to subscriber subsets in a publish-subscribe model
US20110060800A1 (en) Method of guaranteeing the deliverability of emails and other messages
CN109104701B (en) Information sending method based on equipment identification code and server
US8688093B2 (en) Device and method for preserving customized user settings when transitioning between mobile communication devices
CN111246406A (en) Short message sending method, system, storage medium and terminal equipment
US20200403850A1 (en) Facilitating resilient and fault tolerant asynchronous messaging
US20120265832A1 (en) Message thread management using dynamic pointers
CN108366098B (en) Data interaction method and device for network nodes
US20120315931A1 (en) Short message processing method and apparatus
US20150163181A1 (en) Multipurpose internet mail extensions ("mime") metadata for group messaging
CN112748830A (en) Switching method, system, server and storage medium for private chat and group chat interfaces
CN104796519A (en) Terminal
US9226122B2 (en) Messaging service control communicated using short message peer-to-peer protocol fields
CN104735643A (en) Information processing method and data server
US8688090B2 (en) Data session preferences
CN109460392B (en) Log file acquisition method and device, readable storage medium and electronic equipment
CN104780252A (en) Contact list management method
CN109753325B (en) Desktop unread number updating method, device, application and terminal
EP2908277A1 (en) Device, method and non-transitory computer readable storage medium for performing instant message communication

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