CN113079083A - Message processing method, client, server and instant communication system - Google Patents

Message processing method, client, server and instant communication system Download PDF

Info

Publication number
CN113079083A
CN113079083A CN202110319725.7A CN202110319725A CN113079083A CN 113079083 A CN113079083 A CN 113079083A CN 202110319725 A CN202110319725 A CN 202110319725A CN 113079083 A CN113079083 A CN 113079083A
Authority
CN
China
Prior art keywords
message
client
server
receipt
read
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
CN202110319725.7A
Other languages
Chinese (zh)
Other versions
CN113079083B (en
Inventor
刘亚龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Cheerbright Technologies Co Ltd
Original Assignee
Beijing Cheerbright Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Cheerbright Technologies Co Ltd filed Critical Beijing Cheerbright Technologies Co Ltd
Priority to CN202110319725.7A priority Critical patent/CN113079083B/en
Publication of CN113079083A publication Critical patent/CN113079083A/en
Application granted granted Critical
Publication of CN113079083B publication Critical patent/CN113079083B/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/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information
    • 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/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes

Landscapes

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

Abstract

The embodiment of the invention discloses a message processing method, which comprises the following steps: receiving a message from a source client and sending the message to one or more target clients; receiving a read receipt of a message uploaded by a target client; responding to the read receipt, updating a server message receipt table stored by the server, wherein the server message receipt table is used for recording the read number of the message and the timestamp corresponding to the read number; receiving a receipt information acquisition request from a source client, wherein the receipt information acquisition request comprises the update time of a client message receipt table stored by the source client and is used for acquiring the read number of a preset message and a timestamp corresponding to the read number; and responding to the receipt information acquisition request, inquiring a server message receipt table, and returning the read number of the preset message and the timestamp corresponding to the read number to the source client. The invention also discloses a corresponding message processing device, an instant messaging system, a computing device and a readable storage medium.

Description

Message processing method, client, server and instant communication system
Technical Field
The present invention relates to the field of instant messaging technologies, and in particular, to a message processing method, a client, a server, and an instant messaging system.
Background
With the high development of the mobile internet, the instant messaging system is widely used in work and life. In a scenario requiring efficient communication, such as an office scenario, a message sender needs to know the message read situation in time, for example, when sending a message in a group, it needs to know which members in the group have read and which members have not read.
Currently, the message recipient may return an identification of the last message in the conversation window to the server to indicate that the message before the message was read and the message after the message was unread. The server sends the identification of the message to the sender of the message, where the read number of the message is calculated. But the accuracy of determining whether a message has been read based on this approach is low.
Therefore, there is a need to provide a more advanced message processing scheme.
Disclosure of Invention
To this end, embodiments of the present invention provide a message processing method, a client, a server and an instant messaging system in an attempt to solve or at least alleviate at least one of the problems presented above.
According to an aspect of the embodiments of the present invention, there is provided a message processing method, adapted to be executed in a server, the method including: receiving a message from a source client and sending the message to one or more target clients; receiving a read receipt of a message uploaded by a target client; responding to the read receipt, updating a server message receipt table stored by the server, wherein the server message receipt table is used for recording the read number of the message and the timestamp corresponding to the read number; receiving a receipt information acquisition request from a source client, wherein the receipt information acquisition request comprises the update time of a client message receipt table stored by the source client and is used for acquiring the read number of a predetermined message and a timestamp corresponding to the read number, and the predetermined message is a message of which the read number is changed before and after the update time of the client message receipt table; and responding to the receipt information acquisition request, inquiring the server message receipt table, and returning the read number of the predetermined message and the timestamp corresponding to the read number to the source client.
Optionally, in a method according to an embodiment of the present invention, in response to the read receipt, updating a server message receipt table stored by the server, includes: adding one to the read number of the message in the server message receipt table; and updating the time stamp corresponding to the read number of the message in the server message receipt table to be the current time.
Optionally, in the method according to an embodiment of the present invention, before updating the server message receipt table stored by the server in response to the read receipt, further includes: judging whether the server receives the read receipt of the target server to the message; and if the message receipt is received, the server message receipt table is not updated.
Optionally, in the method according to the embodiment of the present invention, the response piece information obtaining request is sent by the source client after receiving the read notification, and the read notification is sent by the server to the source client in an online state after receiving the read response piece of the message uploaded by the target client.
Optionally, in the method according to the embodiment of the present invention, the response piece information obtaining request is sent by the source client after requesting to obtain the offline message from the server.
Optionally, in the method according to the embodiment of the present invention, the method further includes: and in response to receiving a read detail acquiring request for the message sent by the source client, returning the read details of the message to the source client, wherein the read details comprise users of the read message and users of the unread message.
Optionally, in the method according to the embodiment of the present invention, the method further includes: and in response to receiving a history message acquisition request sent by the source client, returning the history message and the read number of the history message to the source client.
According to another aspect of the embodiments of the present invention, there is provided a message processing method, adapted to be executed in a client, the client being adapted to store a client message receipt table and an update time of the client message receipt table, the client message receipt table being used for recording at least a read number of a message sent by the client, the method including: sending a message to one or more target clients via a server; sending a receipt information acquisition request to a server, wherein the receipt information acquisition request is used for acquiring the read number of one or more preset messages sent by a client and a timestamp corresponding to the read number, and the preset messages are messages of which the read number changes before and after the update time of a message receipt table of the client; receiving the read number of a predetermined message returned by the server in response to the receipt information acquisition request and a timestamp corresponding to the read number; and updating the client message receipt table and the updating time of the client message receipt table based on the read number of the predetermined message and the timestamp corresponding to the read number.
Optionally, in the method according to the embodiment of the present invention, sending a response piece information obtaining request to a server includes: and in response to receiving the read notification sent by the server, sending a response piece information acquisition request to the server.
Optionally, in the method according to the embodiment of the present invention, sending a response piece information obtaining request to a server includes: and responding to the request for obtaining the offline message from the server, and sending a response piece information obtaining request to the server.
Optionally, in a method according to an embodiment of the present invention, updating the client message receipt table and the update time of the client message receipt table based on the read number of the predetermined message and the timestamp corresponding to the read number includes: updating the read number of the preset message in the client message receipt table to the read number returned by the server; and updating the update time of the client message receipt table to be the maximum timestamp in the timestamps of the one or more predetermined messages returned by the server.
Optionally, in the method according to the embodiment of the present invention, the method further includes: and when the message is displayed, acquiring the read number of the message from the message receipt table of the client and displaying the read number.
Optionally, in the method according to the embodiment of the present invention, the method further includes: receiving a message sent by a source client through a server; judging whether the message is displayed in a visual area of the chat interface; if so, a read receipt for the message is sent to the server.
According to another aspect of the embodiments of the present invention, there is provided a server, including: the communication module is suitable for receiving the message from the source client and sending the message to one or more target clients; receiving a read receipt of a message uploaded by a target client; receiving a receipt information acquisition request from a source client, wherein the receipt information acquisition request comprises the update time of a client message receipt table stored by the source client and is used for acquiring the read number of a predetermined message and a timestamp corresponding to the read number, and the predetermined message is a message of which the read number is changed before and after the update time of the client message receipt table; the updating module is suitable for responding to the read receipt and updating a server message receipt table stored by the server, and the server message receipt table is used for recording the read number of the message and the time stamp corresponding to the read number; the query module is suitable for responding to the receipt information acquisition request, querying the server message receipt table, and returning the read number of the preset message and the timestamp corresponding to the read number to the source client through the communication module; and a storage module adapted to store the server message receipt table.
According to another aspect of the embodiments of the present invention, there is provided a client, including: the storage module is suitable for storing a client message receipt table and the updating time of the client message receipt table, and the client message receipt table is at least used for recording the read number of the messages sent by the client; a communication module adapted to send a message to one or more target clients via a server; sending a receipt information acquisition request to a server, wherein the receipt information acquisition request is used for acquiring the read number of one or more preset messages sent by a client and a timestamp corresponding to the read number, and the preset messages are messages of which the read number changes before and after the update time of a message receipt table of the client; receiving the read number of a predetermined message returned by the server in response to the receipt information acquisition request and a timestamp corresponding to the read number; the updating module is suitable for updating the client message receipt and the updating time of the client message receipt based on the read number of the preset message and the timestamp corresponding to the read number; and a display module adapted to display the read number of the message when the message is displayed.
According to another aspect of the embodiment of the present invention, an instant messaging system is provided, which includes a client according to the embodiment of the present invention and a server according to the embodiment of the present invention.
According to another aspect of an embodiment of the present invention, there is provided a computing device including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the message processing methods according to embodiments of the present invention.
According to still another aspect of embodiments of the present invention, there is provided a readable storage medium storing a program including instructions that, when executed by a computing device, cause the computing device to perform any one of the message processing methods according to the embodiments of the present invention.
According to the message processing scheme of the embodiment of the invention, the client and the server only store the read number field and do not store a large number of read receipts, so that a large amount of storage space is saved. The client obtains the changed read number from the server in an increment mode according to the updating time of the client message receipt table stored by the client, and unchanged data is not obtained, so that the flow consumption is greatly reduced. And the read receipt sent by the client is simplified in structure, the consumed flow is extremely small, the bandwidth consumption is reduced, and the throughput of the server is improved.
The server responds to the received read receipt, updates the read number of the message, lightens the calculation pressure of the client and improves the accuracy of the read number. And the server adopts the strategies of simple calculation (adding one) and asynchronous persistence (regularly storing the read number of the historical information and the historical information), thereby reducing the occupation of CPU resources.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
Fig. 1 shows a schematic diagram of an instant messaging system 100 according to one embodiment of the present invention;
FIG. 2 shows a schematic diagram of a computing device 200, according to one embodiment of the invention;
FIG. 3 illustrates an interaction flow diagram of a message processing method 300 according to one embodiment of the invention;
FIG. 4 shows a flow diagram of a message processing method 400 according to one embodiment of the invention;
FIG. 5 shows a flow diagram of a message processing method 500 according to one embodiment of the invention;
FIG. 6 shows a schematic diagram of a client 110 according to one embodiment of the invention; and
fig. 7 shows a schematic diagram of a server 120 according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a schematic diagram of an instant messaging system 100 according to one embodiment of the present invention. As shown in fig. 1, the instant communication system 100 includes a plurality of clients 110 and a server 120. In other embodiments, the instant communication system 100 may also include different and/or additional modules, such as an offline message database and/or a historical message database.
A user may obtain a chat service (single chat and/or group chat) provided by the instant communication system 100 by interacting with the instant communication system 100. Specifically, the user sends and receives messages through the client 110. The message may be a text message, an image message, an emoticon message, a voice message, a video message, a file message, or any other suitable type of message, which is not limited in this embodiment of the present invention. For convenience of description, a client used by a message sender (a user who sends a message) may be referred to as a source client, and a client used by a message recipient (a user who receives a message) may be referred to as a target client. When a user sends a message, the client used by the user is a source client, and when the user receives the message, the client used by the user is a target client.
It is to be understood that a source client communicates messages to one or more target clients via server 120 (a source client communicates messages to one target client in a single chat; a source client communicates messages to multiple target clients in a group chat). That is, a source client sends a message to be delivered to one or more target clients to server 120, which server 120 forwards the message to the one or more target clients.
The server 120 stores a server message receipt table, which is used to record the read number of the message sent by any source client and the timestamp corresponding to the read number. The read number is the number of target clients that have uploaded read receipts for the message, indicating the number of people that read the message. Upon receiving a read receipt for a message uploaded by a target client, the server 120 may update the server message receipt table, i.e., the read number and corresponding timestamp of the message. In addition, the server message receipt table may also record the total number of messages received. The total number of receptions is the total number of target clients to receive the message, for example, the total number of receptions is the number of group members when the message is a group chat message. In some embodiments, the server 120 may also periodically store the read number and the total number of receptions of the historical message to the historical message database along with the historical message.
Each client 110 stores a client message receipt table, and the client message receipt table is used to record the read number, or the read number and the total receiving number of the message sent by the client. Each client 110 also stores the last update time of the client message receipt table to indicate when the client message receipt table was last updated. In some embodiments, the source client may obtain the read number of the message sent by the source client from the server message receipt table of the server 120, update the client message receipt table accordingly, and store the update time of the client message receipt table as the latest update time.
The specific structure of each component in the instant communication system 100 and the method executed in each component will be described with reference to the accompanying drawings. The components of the instant communication system 100 may be implemented by a computing device 200 as described below, in accordance with embodiments of the present invention.
FIG. 2 shows a schematic diagram of a computing device 200, according to one embodiment of the invention. As shown in FIG. 2, in a basic configuration 202, a computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 204 may include one or more levels of cache, such as a level one cache 210 and a level two cache 212, a processor core 214, and registers 216. Example processor cores 214 may include Arithmetic Logic Units (ALUs), Floating Point Units (FPUs), digital signal processing cores (DSP cores), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 may include an operating system 220, one or more applications 222, and program data 224. In some implementations, the application 222 can be arranged to execute instructions on the operating system with the program data 224 by the one or more processors 204.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus/interface controller 230. The example output device 242 includes a graphics processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. Example peripheral interfaces 244 can include a serial interface controller 254 and a parallel interface controller 256, which can be configured to facilitate communications with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 258. An example communication device 246 may include a network controller 260, which may be arranged to facilitate communications with one or more other computing devices 262 over a network communication link via one or more communication ports 264.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 200 may be implemented as a server, such as a database server, an application server, a WEB server, and the like, or as a personal computer including desktop and notebook computer configurations. Of course, computing device 200 may also be implemented as part of a small-sized portable (or mobile) electronic device.
In an embodiment according to the invention, the computing device 200 may be implemented as a client 110 and a server 120 and configured to perform the message processing methods 400 and/or 500 (described in detail below) according to an embodiment of the invention. Where the application 222 of the computing device 200 includes a plurality of instructions for performing the message processing method 400 and/or 500 according to embodiments of the present invention, the program data 224 may also store configuration information of the instant communication system 100, etc.
Fig. 3 shows an interaction diagram of a message processing method 300 according to an embodiment of the invention. As shown in fig. 3, the message processing method 300 is performed in the instant communication system 100 and begins at step S310.
In step S310, the source client sends a message to be sent to one or more target clients to the server 120. The server 120 receives the message, forwards the message to one or more target clients in step S320, and returns the total number of receptions of the message (i.e., the number of target clients) to the source client in step S321, so that the source client stores the total number of receptions of the message.
The target client receives the message forwarded from the source client via the server 120, and in step S330, determines whether the message is displayed in the visual area of the chat interface. If the message is displayed within the visual area of the chat interface, the read receipt for the message is uploaded to the server 120 in step S331. If the message is not displayed within the visual area of the chat interface, the read receipt is not uploaded. In some embodiments, the read receipt may include a message identification of the message and a user identification of the sender of the message.
After the server 120 receives the read receipt for the message uploaded by the target client, in step S340, the server message receipt table is updated in response to the read receipt. Specifically, the read number of the message and the timestamp corresponding to the read number in the server message receipt table may be updated in response to the read receipt of the message by the target client. For example, the read number of the message is added by 1, and the timestamp corresponding to the read number is updated to the current time.
According to some embodiments of the invention, the server 120 may first determine whether a read receipt for the message by the target client has been received before updating the server message receipt table based on the read receipt. If the message receipt is received, the server message receipt table is not updated, otherwise, the server message receipt table is updated based on the read receipt. That is, the server message receipt table is updated only the first time a read receipt of a message by a target client is received.
The server 120 may also transmit a read notification to the source client in an online state in step S341. If the source client is offline, no read notification is sent.
In some embodiments, the server may send the read notification to the source client at a predetermined frequency, for example, once every few seconds, which may act as a flow control to effectively reduce the diffusion storm of messages. Further, the server 120 may suspend sending read receipts when it is monitored that the server 120 traffic pressure reaches a predetermined threshold, and resume sending read notifications when a decrease in pressure is monitored.
The source client receives the read notification, and in response to receiving the read notification, sends a response piece information acquisition request to the server 120 in step S350. The receipt information acquisition request includes the update time of the client message receipt table stored by the source client, and is used to acquire, from the server 120, the read receipt information of those messages sent by the source client whose read number has changed before and after the update time of the client message receipt table. In some embodiments, the read receipt information includes a message identification of the message, a read number of the message, and a timestamp corresponding to the read number.
For convenience of description, a message whose read number is changed before and after the update time of the client message receipt table may be referred to as a predetermined message.
The server 120 receives the receipt information obtaining request from the source client, and may query the server message receipt table in response to the receipt information obtaining request, determine one or more predetermined messages, and obtain the read receipt information of the predetermined messages in step S360. Then, the server 120 returns the read receipt information of the predetermined message to the source client in step S361.
The source client receives the read receipt information of the predetermined message returned by the server 120, and updates the client message receipt table stored by the source client and the update time of the client message receipt table based on the read receipt information of the predetermined message in step S370. Specifically, for each predetermined message, the read number of the predetermined message in the client message receipt table may be updated, that is, the read number of the predetermined message in the client message receipt table is updated to the read number of the predetermined message returned by the server 120. At the same time, the update time of the client message receipt table is updated to the maximum timestamp in the read receipt information of the one or more predetermined messages.
Then, the source client may display the read number of the message (the read number of the message is obtained from the client message receipt table) when displaying the message sent by the source client in step S380, so that the user knows the read number. In some embodiments, the source client may also send a read detail retrieval request to the server 120, the read detail retrieval request being for retrieving the read details of the message. For example, a selection operation (including a click operation or the like) of the number of read of the displayed message by the user may be received, and in response to the selection operation, the read detail acquisition request is sent to the server 120, and the server 120 receives the read detail acquisition request from the source client and returns the read details of the corresponding message to the source client so that the source client displays the read details. The read details may include, among other things, a message recipient of the read message and/or a message recipient of the unread message. The source client may also update the corresponding record in the client message receipt table after receiving the read details of the message, but does not update the update time of the client message receipt table at this time.
Further, according to some embodiments of the present invention, the source client may request the server 120 to obtain an offline message when changing from an offline state to an online state. In this case, the source client may transmit a response piece information acquisition request to the server 120 in response to a request to acquire an offline message from the server 120, for example, by executing the above-described steps S350 to S380.
According to further embodiments of the present invention, when the source client requests the server 120 to obtain the history message, the server 120 may return the read number of the history message when returning the history message, so as to be displayed together when the source client displays the history message.
Fig. 4 shows a schematic diagram of a message processing method 400 according to one embodiment of the invention. As shown in fig. 4, the message processing method 400 is performed in the client 110 and starts at step S410.
In step S410, a message is sent to one or more target clients via the server 120. In step S420, in response to receiving the read notification sent by the server 120 or in response to requesting the server 120 to obtain an offline message, a response piece information obtaining request is sent to the server 120. The response piece information obtaining request is used for obtaining the read number and the time stamp corresponding to the read number of one or more predetermined messages sent by the client 110, wherein the predetermined messages are messages of which the read number is changed before and after the update time of the client message response piece table. The client message receipt table and the update time of the client message receipt table are stored in the client, and the client message receipt table is at least used for recording the read number of the messages sent by the client.
Then, in step S430, the read number and the timestamp corresponding to the read number of the one or more predetermined messages returned by the receiving server in response to the receipt information obtaining request are received, and in step S440, the client message receipt table and the update time of the client message receipt table are updated based on the read number and the timestamp corresponding to the read number of the predetermined messages. For example, the read number of the predetermined message in the client message receipt table is updated to the read number returned by the server 120, and the update time of the client message receipt table is updated to the maximum timestamp among the timestamps of the one or more predetermined messages returned by the server.
Finally, in step S450, when displaying the message, the read number of the message is obtained from the client message receipt table and the read number is displayed.
When the client is a target client, the client may also receive a message sent by another client (i.e., a source client) via the server 120, and determine whether the message is displayed in the visual area of the chat interface. If so, a read receipt for the message is sent to the server 120.
In the above detailed description of the instant communication system 100 and the message processing method 300 with reference to fig. 1 to fig. 3, the corresponding processing in each step of the message processing method 400 has been explained in detail, and repeated content is not repeated here.
Fig. 5 shows a schematic diagram of a message processing method 500 according to one embodiment of the invention. As shown in fig. 5, the message processing method 500 is performed in the server 120 and begins at step S510.
In step S510, a message from a source client is received and sent to one or more target clients. In some embodiments, after receiving a message from a source client, a total number of receptions of the message may also be returned to the source client.
Then, in step S520, a read receipt for the message uploaded by the target client is received, and in step S530, the server message receipt table stored by the server is updated in response to the read receipt. The server message receipt table is used for recording the read number of the message and the timestamp corresponding to the read number, and can also record the total receiving number of the message. Specifically, the read number of the message in the server message receipt table is increased by one, and the timestamp corresponding to the read number of the message in the server message receipt table is updated to be the current time.
A response piece information acquisition request from the source client may also be received in step S540. The receipt information acquisition request comprises the update time of the client message receipt table stored by the source client and is used for acquiring the read number of the predetermined message and the timestamp corresponding to the read number. Wherein the predetermined message is a message in which the read number is changed before and after the update time of the client message receipt table.
In some embodiments, the response piece information acquisition request is sent by the source client after receiving a read notification sent by the server to the source client in an online state after receiving a read response piece for the message uploaded by the target client. In still other embodiments, the response piece information fetch request is sent by the source client after requesting a fetch offline message from the server.
Finally, in step S550, in response to the response piece information obtaining request, the server message response piece table is queried, and the read number of the one or more predetermined messages and the timestamp corresponding to the read number are returned to the source client.
In addition, the server can also respond to the received read detail acquisition request for the message sent by the source client, and return the read details of the message to the source client, wherein the read details comprise the user of the read message and the user of the unread message. The server can also return the history message and the read number of the history message to the source client in response to receiving the history message acquisition request sent by the source client.
In the above detailed description of the instant communication system 100 and the message processing method 300 with reference to fig. 1 to fig. 3, the corresponding processing in each step of the message processing method 500 has been explained in detail, and repeated content is not repeated here.
Fig. 6 shows a schematic diagram of a client 110 according to an embodiment of the invention. As shown in fig. 6, the client 110 includes a storage module 111, a communication module 112, an update module 113, and a display module 114. The storage module 111 is adapted to store the client message receipt table and the update time of the client message receipt table. The client message receipt table is used to record the read number of the messages sent by the client 110, and may also record the total number of the messages received.
The communication module 112 is adapted to send a message to one or more target clients via the server 120, and is further adapted to send a response piece information obtaining request to the server 120, wherein the response piece information obtaining request is used for obtaining the read number of one or more predetermined messages sent by the client 110 and the timestamp corresponding to the read number. Wherein the predetermined message is a message whose read number is changed before and after the update time of the client message receipt table stored in the storage module 111. The communication module 112 is further adapted to receive the read number of the predetermined message returned by the server 120 in response to the response piece information obtaining request and the time stamp corresponding to the read number.
The updating module 113 is connected to the storage module 111 and the communication module 112, and is adapted to update the client message receipt table and the updating time of the client message receipt table stored in the storage module 111 based on the read number of the predetermined message and the timestamp corresponding to the read number.
The display module 114 is connected to the storage module 111 and the communication module 112, and is adapted to obtain the read number of the message from the client message receipt table and display the read number when the message is displayed.
In addition, the communication module 112 may also receive a message sent by the source client via the server 120, and the display module 114 may determine whether the message is displayed in a visible area of the chat interface, and if so, send a receipt of the message to the server 120 via the communication module 112, otherwise, not send the receipt.
In the above detailed description of the instant messaging system 100 and the message processing methods 300 to 500 with reference to fig. 1 to 5, the corresponding processing in each module of the client 110 has been explained in detail, and repeated details are not repeated here.
Fig. 7 shows a schematic diagram of a server 120 according to an embodiment of the invention. As shown in fig. 7, the server 120 includes a storage module 121, a communication module 122, an update module 123, and a query module 124.
The storage module 121 is adapted to store a server message receipt table, where the server message receipt table is used to record the read number of the message and the timestamp corresponding to the read number, and may also record the total receiving number of the message.
The communication module 122 is adapted to receive a message from a source client and send the message to one or more target clients; and is further adapted to receive a read receipt of the message uploaded by the target client. The communication module 122 may further receive a receipt information obtaining request from the source client, where the receipt information obtaining request includes an update time of a client message receipt table stored by the source client, and is used to obtain the read number of the predetermined message and a timestamp corresponding to the read number. Wherein the predetermined message is a message in which the read number is changed before and after the update time of the client message receipt table.
The updating module 123 is connected to the storage module 121 and the communication module 122, and is adapted to update the server message receipt table stored in the storage module 121 in response to receiving the read receipt sent by the target client. The query module 124 is also connected to the storage module 121 and the communication module 122, and is adapted to query the server message receipt table in the storage module 121 in response to the receipt information obtaining request, and return the read number of the predetermined message and the timestamp corresponding to the read number to the source client via the communication module 122.
In summary, according to the message processing scheme of the embodiment of the present invention, the client and the server only store the read number field, and do not store a large number of read receipts, thereby saving a large amount of storage space. The client obtains the changed read number from the server in an increment mode according to the updating time of the client message receipt table stored by the client, and unchanged data is not obtained, so that the flow consumption is greatly reduced. And the read receipt sent by the client is simplified in structure, the consumed flow is extremely small, the bandwidth consumption is reduced, and the throughput of the server is improved.
The server responds to the received read receipt, updates the read number of the message, lightens the calculation pressure of the client and improves the accuracy of the read number. And the server adopts the strategies of simple calculation (adding one) and asynchronous persistence (regularly storing the read number of the historical information and the historical information), thereby reducing the occupation of CPU resources.
It should be understood that the various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the various methods of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
The embodiment of the invention also comprises the following steps: a5, the method of A1, wherein the response piece information get request is sent by the source client after requesting to get an offline message from the server. A6, the method as in A1, further comprising: and in response to receiving a read detail acquiring request for the message sent by the source client, returning the read details of the message to the source client, wherein the read details comprise a user who has read the message and a user who has not read the message. A7, the method as in A1, further comprising: and in response to receiving a history message acquisition request sent by the source client, returning the history message and the read number of the history message to the source client.
B9, the method as in B8, wherein sending a response piece information acquisition request to the server comprises: and responding to the received read notification sent by the server, and sending the response piece information acquisition request to the server. B10, the method as in B8, wherein sending a response piece information acquisition request to the server comprises: and responding to the request for obtaining the offline message from the server, and sending the response piece information obtaining request to the server. B11, the method according to B8, wherein updating the client message receipt table and the update time of the client message receipt table based on the read number of the predetermined message and the timestamp corresponding to the read number comprises: updating the read number of the preset message in the client message receipt table to the read number returned by the server; and updating the update time of the client message receipt table to be the maximum timestamp in the timestamps of one or more predetermined messages returned by the server. B12, the method according to B8, further comprising: and when the message is displayed, acquiring the read number of the message from the client message receipt table and displaying the read number. B13, the method according to B8, further comprising: receiving a message sent by a source client through the server; judging whether the message is displayed in a visual area of a chat interface; if so, sending a read receipt for the message to the server.
It should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A message processing method adapted to be executed in a server, the method comprising:
receiving a message from a source client and sending the message to one or more target clients;
receiving a read receipt of the message uploaded by the target client;
responding to the read receipt, updating a server message receipt table stored by a server, wherein the server message receipt table is used for recording the read number of the message and a timestamp corresponding to the read number;
receiving a receipt information acquisition request from the source client, wherein the receipt information acquisition request comprises the update time of a client message receipt table stored by the source client and is used for acquiring the read number of a predetermined message and a timestamp corresponding to the read number, and the predetermined message is a message of which the read number is changed before and after the update time of the client message receipt table; and
and responding to the receipt information acquisition request, inquiring the server message receipt table, and returning the read number of the preset message and the timestamp corresponding to the read number to the source client.
2. The method of claim 1, wherein updating a server stored server message receipt table in response to the read receipt comprises:
adding one to the read number of the message in the server message receipt table; and
and updating the time stamp corresponding to the read number of the message in the server message receipt table to be the current time.
3. The method of claim 1, wherein prior to updating a server stored server message receipt table in response to the read receipt, further comprising:
judging whether the server receives the read receipt of the message by the target server;
and if the message receipt is received, not updating the server message receipt table.
4. The method of claim 1, wherein the response piece information acquisition request is sent by the source client after receiving a read notification sent by the server to the source client in an online state after receiving a read response piece for the message uploaded by the target client.
5. A message processing method, adapted to be executed in a client, the client being adapted to store a client message receipt table and an update time of the client message receipt table, the client message receipt table being used at least for recording a read number of messages sent by the client, the method comprising:
sending a message to one or more target clients via a server;
sending a receipt information acquisition request to the server, wherein the receipt information acquisition request is used for acquiring the read number of one or more predetermined messages sent by the client and a timestamp corresponding to the read number, and the predetermined messages are messages of which the read number changes before and after the update time of a message receipt table of the client;
receiving the read number of a predetermined message returned by the server in response to the receipt information acquisition request and a timestamp corresponding to the read number; and
and updating the client message receipt table and the updating time of the client message receipt table based on the read number of the predetermined message and the timestamp corresponding to the read number.
6. A server, comprising:
a communication module adapted to receive a message from a source client and send the message to one or more target clients; receiving a read receipt of the message uploaded by the target client; receiving a receipt information acquisition request from the source client, wherein the receipt information acquisition request comprises the update time of a client message receipt table stored by the source client and is used for acquiring the read number of a predetermined message and a timestamp corresponding to the read number, and the predetermined message is a message of which the read number is changed before and after the update time of the client message receipt table;
the updating module is suitable for responding to the read receipt and updating a server message receipt table stored by the server, and the server message receipt table is used for recording the read number of the message and the time stamp corresponding to the read number;
the query module is used for responding to the receipt information acquisition request, querying the server message receipt table, and returning the read number of the preset message and the timestamp corresponding to the read number to the source client through the communication module; and
and the storage module is suitable for storing the server message receipt table.
7. A client, comprising:
the storage module is suitable for storing a client message receipt table and the updating time of the client message receipt table, and the client message receipt table is at least used for recording the read number of the messages sent by the client;
a communication module adapted to send a message to one or more target clients via a server; sending a receipt information acquisition request to the server, wherein the receipt information acquisition request is used for acquiring the read number of one or more predetermined messages sent by the client and a timestamp corresponding to the read number, and the predetermined messages are messages of which the read number changes before and after the update time of a message receipt table of the client; receiving the read number of a predetermined message returned by the server in response to the receipt information acquisition request and a timestamp corresponding to the read number;
the updating module is suitable for updating the client message receipt table and the updating time of the client message receipt table based on the read number of the preset message and the timestamp corresponding to the read number; and
and the display module is suitable for displaying the read number of the message when the message is displayed.
8. An instant messaging system comprising a client as claimed in claim 7 and a server as claimed in claim 6.
9. A computing device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the message processing methods of claims 1-5.
10. A readable storage medium storing a program, the program comprising instructions that, when executed by a computing device, cause the computing device to perform any of the message processing methods of claims 1-5.
CN202110319725.7A 2021-03-25 2021-03-25 Message processing method, client, server and instant communication system Active CN113079083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110319725.7A CN113079083B (en) 2021-03-25 2021-03-25 Message processing method, client, server and instant communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110319725.7A CN113079083B (en) 2021-03-25 2021-03-25 Message processing method, client, server and instant communication system

Publications (2)

Publication Number Publication Date
CN113079083A true CN113079083A (en) 2021-07-06
CN113079083B CN113079083B (en) 2022-07-08

Family

ID=76610747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110319725.7A Active CN113079083B (en) 2021-03-25 2021-03-25 Message processing method, client, server and instant communication system

Country Status (1)

Country Link
CN (1) CN113079083B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301885A (en) * 2021-12-13 2022-04-08 天翼爱音乐文化科技有限公司 Data transmission method, device and system
CN115334466A (en) * 2022-08-15 2022-11-11 北京泰迪熊移动科技有限公司 Message sending method and device, electronic equipment and storage medium
CN116595014A (en) * 2023-07-18 2023-08-15 中孚信息股份有限公司 Storage system, method and device for read receipt and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140344711A1 (en) * 2013-05-17 2014-11-20 Research In Motion Limited Method and device for graphical indicator of electronic messages
CN104836719A (en) * 2014-02-11 2015-08-12 阿里巴巴集团控股有限公司 Method and system for synchronizing instant communication unread messages
CN107948050A (en) * 2017-11-08 2018-04-20 用友网络科技股份有限公司 A kind of device and method that group message read states are provided
CN108011812A (en) * 2018-01-16 2018-05-08 吉浦斯信息咨询(深圳)有限公司 Realize that message in instant messaging has read the method and system of unread state synchronization
CN110798392A (en) * 2018-08-01 2020-02-14 阿里巴巴集团控股有限公司 Group message state display method, device and system, electronic equipment and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140344711A1 (en) * 2013-05-17 2014-11-20 Research In Motion Limited Method and device for graphical indicator of electronic messages
CN104836719A (en) * 2014-02-11 2015-08-12 阿里巴巴集团控股有限公司 Method and system for synchronizing instant communication unread messages
CN107948050A (en) * 2017-11-08 2018-04-20 用友网络科技股份有限公司 A kind of device and method that group message read states are provided
CN108011812A (en) * 2018-01-16 2018-05-08 吉浦斯信息咨询(深圳)有限公司 Realize that message in instant messaging has read the method and system of unread state synchronization
CN110798392A (en) * 2018-08-01 2020-02-14 阿里巴巴集团控股有限公司 Group message state display method, device and system, electronic equipment and mobile terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301885A (en) * 2021-12-13 2022-04-08 天翼爱音乐文化科技有限公司 Data transmission method, device and system
CN114301885B (en) * 2021-12-13 2023-04-18 天翼爱音乐文化科技有限公司 Data transmission method, device and system
CN115334466A (en) * 2022-08-15 2022-11-11 北京泰迪熊移动科技有限公司 Message sending method and device, electronic equipment and storage medium
CN115334466B (en) * 2022-08-15 2023-08-04 北京泰镝科技股份有限公司 Message sending method and device, electronic equipment and storage medium
CN116595014A (en) * 2023-07-18 2023-08-15 中孚信息股份有限公司 Storage system, method and device for read receipt and readable storage medium
CN116595014B (en) * 2023-07-18 2023-09-26 中孚信息股份有限公司 Storage system, method and device for read receipt and readable storage medium

Also Published As

Publication number Publication date
CN113079083B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN113079083B (en) Message processing method, client, server and instant communication system
US10986057B2 (en) Message history display system and method
CN111651464B (en) Data processing method, system and computing device
US20100306066A1 (en) Techniques for displaying an advertisement across multiple pages
US20110145347A1 (en) Global presence
US8868943B2 (en) Stateless remote power management of computers
CN113329069B (en) Instant messaging method, system and computing device
US11095598B2 (en) Managing messaging services
KR101636422B1 (en) A light-weight method for delivering the smallest set of new messages to a conversation cache on an intermittently connected mobile email client
EP2857948A1 (en) Method, device and system for shunting information in graphic code
US20050255833A1 (en) Message aggregation system and method for a mobile communication device
US8086674B2 (en) Attachment server network for viewing attachments on a portable electronic device
CN111414383B (en) Data request method, data processing system and computing device
CN101860821B (en) Method and system for acquiring instant messages
US11271884B2 (en) Providing social insight in email
WO2023093325A1 (en) Method and apparatus for adding friend, and server and storage medium
CN104508652B (en) The system and method changed automatically for device Configuration Values
WO2022051928A1 (en) Data push method, data push system, and computer-program product
KR101604606B1 (en) A mechanism for message prefetching in an intermittently connected offline-capable mobile web application
US20150215247A1 (en) Selecting a communication mode
CN114579528B (en) File quick look-up management system based on pre-caching
CN115134328B (en) Corner mark configuration method and device, computer equipment and readable storage medium
CA2633839C (en) Attachment server network for viewing attachments on a portable electronic device

Legal Events

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