CN110719145B - Method and device for sending read receipt and computer readable storage medium - Google Patents

Method and device for sending read receipt and computer readable storage medium Download PDF

Info

Publication number
CN110719145B
CN110719145B CN201810774605.4A CN201810774605A CN110719145B CN 110719145 B CN110719145 B CN 110719145B CN 201810774605 A CN201810774605 A CN 201810774605A CN 110719145 B CN110719145 B CN 110719145B
Authority
CN
China
Prior art keywords
receipt
read
sent
packet
read receipt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810774605.4A
Other languages
Chinese (zh)
Other versions
CN110719145A (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.)
Shenzhen Sinosun Technology Co ltd
Original Assignee
Shenzhen Sinosun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sinosun Technology Co ltd filed Critical Shenzhen Sinosun Technology Co ltd
Priority to CN201810774605.4A priority Critical patent/CN110719145B/en
Publication of CN110719145A publication Critical patent/CN110719145A/en
Application granted granted Critical
Publication of CN110719145B publication Critical patent/CN110719145B/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
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for sending a read receipt and a computer readable storage medium, wherein the method for sending the read receipt comprises the following steps: acquiring a read receipt to be sent currently, and packaging the read receipt to obtain a read receipt packet; sending the read receipt packet to a server; receiving a confirmation character packet fed back by the server based on the read receipt packet; and obtaining the sending result of the read receipt packet according to the confirmation character packet. By the invention, when a plurality of pieces of the read receipt need to be sent, the plurality of pieces of the read receipt can be sent to the server side in a packing mode at one time, so that the time for waiting the server side to reply the ACK is reduced, the time for sending the read receipt is shortened, and the sending efficiency of the read receipt is improved.

Description

Method and device for sending read receipt and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a read receipt sending method, an apparatus, and a computer-readable storage medium.
Background
Currently, most of the instant messaging message sending processes are as follows: 1. a client adds a message to be sent into a message sending queue (the message sending queue is often designed to ensure that a user thread is not blocked); 2. the sending thread takes out the message from the head of the message sending queue and sends the message to the server, and the blocking thread waits for the server to reply to the ACK (Acknowledgement character) of the message; 3. the server receives the message and replies ACK of the message to the client; 4. the client receives the ACK; 5. and the sending thread removes the blockage and processes the next message.
However, in the current group communication, dozens or even hundreds of clients (client B to client N) simultaneously transmit messages, and when receiving a message, the client a needs to reply to a read receipt, and then needs to transmit a large amount of read receipts to the server. According to the message sending process, if the client a needs to send the communication message at the same time, a large number of messages to be sent (including the read receipt and the communication message that the user needs to send) exist in the message sending queue, and because the message identifies the sending time and the timeout event, the messages to be sent behind the message sending queue often cannot be sent in time, and finally timeout is caused. For example, if a communication message that a user needs to send is behind a message sending queue, a sending timeout may occur, so that the communication message cannot be sent immediately.
In order to solve the problem, the current method is to reduce the priority of the read receipt, namely, the communication information which needs to be sent by the user is sent first, and then the read receipt is sent, so that the user experience is reduced (the user cannot know whether the message sent by the user is read by the other party at the first time); or only send the read receipt of the message X (the latest received message), and after the receiving end of the read receipt receives the receipt, the receiving end of the read receipt considers that the messages before the message X are all read.
Disclosure of Invention
In view of the technical problems in the prior art, the present invention provides a read receipt sending method, device and computer readable storage medium.
The invention provides a method for sending a receipt, which comprises the following steps:
acquiring a read receipt to be sent currently, and packaging the read receipt to obtain a read receipt packet;
sending the read receipt packet to a server;
receiving a confirmation character packet fed back by the server based on the read receipt packet;
and obtaining the sending result of the read receipt packet according to the confirmation character packet.
Optionally, the step of obtaining the current read receipt to be sent includes:
and when the information state is detected to be changed from unread to read, acquiring the read receipt of the information to obtain the read receipt to be sent currently.
Optionally, the step of obtaining the current to-be-sent receipt and packing the receipt to obtain the receipt package includes:
acquiring the current read receipt to be sent, and detecting whether the number of the current read receipt to be sent reaches a preset threshold value;
and if the number of the current to-be-sent read receipts reaches a preset threshold value, packaging the current to-be-sent read receipts to obtain read receipt packages.
Optionally, the step of obtaining the sending result of the read receipt packet according to the confirmation character packet includes:
detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet or not;
and if the quantity of the confirmation characters in the confirmation character packet is the same as the quantity of the read receipt in the read receipt packet, confirming that the read receipt packet is successfully sent.
Optionally, after detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet, the method further includes:
and if the number of the confirmation characters in the confirmation character packet is less than the number of the read receipts in the read receipt packet, acquiring the first type of read receipts which do not correspond to the confirmation characters, and confirming that the first type of read receipts fail to be sent.
Optionally, after confirming that the sending of the first type of read receipt fails, the method further includes:
marking the first type of the receipt as a to-be-sent receipt, acquiring the current to-be-sent receipt, and packaging the receipt to obtain a receipt packet.
Further, in order to achieve the above object, the present invention provides a read receipt transmitting apparatus comprising: a memory, a processor, and a transmission of a receipt already read stored on the memory and executable on the processor, the transmission of a receipt already read implementing the steps of the transmission of a receipt already read as described above when executed by the processor.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a read receipt transmission program that, when executed by a processor, implements the steps of the read receipt transmission method as described above.
In the invention, the current read receipt to be sent is obtained, and the read receipt is packaged to obtain a read receipt packet; sending the read receipt packet to a server; receiving a confirmation character packet fed back by the server based on the read receipt packet; and obtaining the sending result of the read receipt packet according to the confirmation character packet. By the invention, when a plurality of pieces of the read receipt need to be sent, the plurality of pieces of the read receipt can be sent to the server side in a packing mode at one time, so that the time for waiting the server side to reply the ACK is reduced, the time for sending the read receipt is shortened, and the sending efficiency of the read receipt is improved.
Drawings
FIG. 1 is a block diagram of an exemplary architecture of a read receipt sending device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for sending a receipt read according to a first embodiment of the present invention;
FIG. 3 is a diagram of a transmission queue in an embodiment of a method for sending a read receipt according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 is a schematic structural diagram of a read receipt transmitting device in a hardware operating environment according to an embodiment of the present invention.
The read receipt sending device in the embodiment of the invention can be a PC, and can also be terminal equipment such as a smart phone, a tablet personal computer, a portable computer and the like.
As shown in fig. 1, the read receipt transmitting device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the read return receipt sending device configuration shown in fig. 1 does not constitute a limitation of the read return receipt sending device and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a read receipt transmitting program.
In the read receipt sending apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the read receipt sending program stored in the memory 1005 and perform the following operations:
acquiring a read receipt to be sent currently, and packaging the read receipt to obtain a read receipt packet;
sending the read receipt packet to a server;
receiving a confirmation character packet fed back by the server based on the read receipt packet;
and obtaining the sending result of the read receipt packet according to the confirmation character packet.
Further, the processor 1001 may call the read receipt transmitting program stored in the memory 1005, and also perform the following operations:
and when the information state is detected to be changed from unread to read, acquiring the read receipt of the information to obtain the read receipt to be sent currently.
Further, the processor 1001 may call the read receipt transmitting program stored in the memory 1005, and also perform the following operations:
acquiring the current read receipt to be sent, and detecting whether the number of the current read receipt to be sent reaches a preset threshold value;
and if the number of the current to-be-sent read receipts reaches a preset threshold value, packaging the current to-be-sent read receipts to obtain read receipt packages.
Further, the processor 1001 may call the read receipt transmitting program stored in the memory 1005, and also perform the following operations:
detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet or not;
and if the quantity of the confirmation characters in the confirmation character packet is the same as the quantity of the read receipt in the read receipt packet, confirming that the read receipt packet is successfully sent.
Further, the processor 1001 may call the read receipt transmitting program stored in the memory 1005, and also perform the following operations:
and if the number of the confirmation characters in the confirmation character packet is less than the number of the read receipts in the read receipt packet, acquiring the first type of read receipts which do not correspond to the confirmation characters, and confirming that the first type of read receipts fail to be sent.
Further, the processor 1001 may call the read receipt transmitting program stored in the memory 1005, and also perform the following operations:
marking the first type of the receipt as a to-be-sent receipt, acquiring the current to-be-sent receipt, and packaging the receipt to obtain a receipt packet.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for sending a read receipt according to a first embodiment of the present invention.
In one embodiment, the method for sending the read receipt comprises the following steps:
step S10, obtaining the current read receipt to be sent, packing the read receipt to obtain a read receipt packet;
in this embodiment, when the client (i.e., the read receipt sending device) receives and displays a new message, the status of the new message is changed from the unread status to the read status. In a group communication, tens or even hundreds of simultaneous messages may occur, and for a message receiving end (taking the client a as an example), if the messages are displayed on a display interface of the client a, the client a needs to reply a read receipt corresponding to the messages to the server.
In an embodiment of the present invention, if the client a detects that the states of the 50 new messages are changed from the unread state to the read state, it needs to reply the read receipts corresponding to the 50 new messages to the server. Client a adds the read receipts of these 50 new messages into the send queue. Referring to fig. 3, fig. 3 is a schematic diagram of a transmission queue in an embodiment of a read receipt transmission method according to the present invention. As shown in fig. 3, according to the time sequence of the new message status change, the corresponding read receipt is added into the sending queue in turn. The time of the new message state change corresponding to the receipt 1 is earlier than the time of the new message state change corresponding to the receipt 2, the time of the new message state change corresponding to the receipt 2 is earlier than the time of the new message state change corresponding to the receipt 3, and so on, the time of the new message state change corresponding to the receipt 48 is earlier than the time of the new message state change corresponding to the receipt 49, and the time of the new message state change corresponding to the receipt 49 is earlier than the time of the new message state change corresponding to the receipt 50.
In an embodiment of the present invention, after all the to-be-sent receipts are added to the send queue, the send thread is notified to start the subsequent sending of the to-be-sent receipts. After receiving the notification, the sending thread sequentially obtains X pieces of read receipts from the sending queue (X is set according to actual conditions, and is not limited herein) according to a sequence from top to bottom, and performs packing processing on the obtained X pieces of read receipts to obtain a read receipt packet, where the read receipt packet may include X pieces of read receipts. In an optional embodiment, when 50 readback executions to be sent are to be sent, the 50 readback executions are all added into a sending queue, a sending thread sequentially acquires 20 readback executions from the sending queue according to the sequence from top to bottom, performs packing processing on the acquired readback executions 1 to 20 to obtain a readback receipt packet 1, then acquires the readback executions 21 to 40 according to the same steps, performs packing processing on the acquired readback executions 21 to 40 to obtain a readback receipt packet 2, and then continues to acquire the readback executions, and when the readback executions 50 are acquired by the readback executions 41, performs packing processing on the readback executions 41 to 50 due to the fact that no readback executions exist subsequently to obtain a readback receipt packet 3. In this embodiment, the implementation means for obtaining the read receipt package through the packaging processing may be to store a single read receipt as a set in the read receipt package according to a predefined protocol, and then serialize the read receipt package into a binary system.
Step S20, sending the read receipt packet to a server;
step S30, receiving the confirmation character packet fed back by the server based on the read receipt packet;
in this embodiment, after obtaining the read receipt packet, the client a sends the read receipt packet to the server, and the server receives the read receipt packet, determines the read receipt included in the received read receipt packet, and replies a corresponding ACK. Ack (acknowledgement) is an acknowledgement character, and in data communication, a transmission control character sent by the receiving station to the sending station indicates that the received data is acknowledged and error-free. In this embodiment, the ACK to be replied is packaged to obtain an ACK packet, and then the ACK packet is fed back to the client a. In an embodiment, if the server receives the response piece packet and the received response piece packet includes the response pieces 1 to 50, the ACK1 to 50 corresponding to the response pieces 1 to 50 needs to be replied, the ACK1 to 50 is packaged to obtain the acknowledgement character packet, and the acknowledgement character packet is sent to the client a.
In this embodiment, a process of packing the ACK that needs to be replied by the service end is similar to a process of packing the read receipt to be sent by the client end. In an embodiment, if there are 50 ACKs to be replied, Y (the specific value of Y is set according to actual needs, and is not limited herein) may be used as a group, and then the ACK is packed to obtain the ACK packet. For example, when Y is set to 20, ACK 1-20 are packed to obtain acknowledgement character packet 1, ACK 21-40 are packed to obtain acknowledgement character packet 2, ACK 41-50 are packed to obtain acknowledgement character packet 3, and acknowledgement character packets 1-3 are sent to client a.
And step S40, obtaining the sending result of the read receipt packet according to the confirmation character packet.
In this embodiment, after receiving the acknowledgement character packet fed back by the server based on the read receipt packet, the client first detects whether the number of the acknowledgement characters included in the acknowledgement character packet is the same as the number of the read receipts included in the read receipt packet sent by the client, and if the number of the acknowledgement characters included in the read receipt packet is the same as the number of the read receipts included in the read receipt packet sent by the client, it indicates that the current read receipt to be sent has been successfully sent, and the read receipt to be sent can be removed from the sending queue.
In an optional embodiment of the present invention, if it is detected that the number of the acknowledgment characters included in the acknowledgment character packet is smaller than the number of the acknowledgement receipts included in the acknowledgement receipt packet sent by the client, that is, the acknowledgment characters corresponding to the partially sent acknowledgement receipts are not received, for example, the acknowledgment characters corresponding to the acknowledgement receipts 41 to 50 are not received, it is indicated that the acknowledgement receipts 41 to 50 are not successfully sent, the acknowledgement receipts 1 to 40 can be removed from the sending queue, and the acknowledgement receipts 41 to 50 are still retained in the sending queue for waiting for the next sending.
In the embodiment, a read receipt to be sent currently is obtained, and the read receipt is packaged to obtain a read receipt packet; sending the read receipt packet to a server; receiving a confirmation character packet fed back by the server based on the read receipt packet; and obtaining the sending result of the read receipt packet according to the confirmation character packet. By the embodiment, when a plurality of pieces of read receipts need to be sent, the plurality of pieces of read receipts can be sent to the server side in a packaging mode at one time, so that the time for waiting the server side to reply the ACK is shortened, the time for sending the read receipts is shortened, and the sending efficiency of the read receipts is improved.
Further, in an embodiment of the read receipt sending method of the present invention, the step of acquiring the current read receipt to be sent includes:
and when the information state is detected to be changed from unread to read, acquiring the read receipt of the information to obtain the read receipt to be sent currently.
In this embodiment, when the client (i.e., the read receipt sending device) receives and displays a new message, the status of the new message is changed from the unread status to the read status. In a group communication, tens or even hundreds of simultaneous messages may occur, and for a message receiving end (taking the client a as an example), if the messages are displayed on a display interface of the client a, the client a needs to reply a read receipt corresponding to the messages to the server.
In this embodiment, whether the information is changed from the unread state to the read state is determined according to whether the information is displayed on the display interface of the client, and when the information is changed from the unread state to the read state, a subsequent step of sending a read receipt of the information to the server is performed. Through the embodiment, the authenticity of the receipt is improved, so that the receipt received by both parties of instant messaging is more practical, and the user experience is improved.
Further, in an embodiment of the read receipt sending method of the present invention, step S10 includes:
acquiring the current read receipt to be sent, and detecting whether the number of the current read receipt to be sent reaches a preset threshold value;
and if the number of the current to-be-sent read receipts reaches a preset threshold value, packaging the current to-be-sent read receipts to obtain read receipt packages.
In this embodiment, when the current to-be-sent receipt is obtained, it is first detected whether the number of the current to-be-sent receipts reaches a preset threshold (the preset threshold is set according to an actual situation, and is not limited herein), and if the number of the current to-be-sent receipts reaches the preset threshold, the current to-be-sent receipts are packed to obtain the receipt package. In this embodiment, the embodiment of performing the packing processing on the currently to-be-sent read receipt is the same as the embodiment of step S10, and details thereof are not described herein.
In this embodiment, if the number of the current read receipts to be sent is small, the processing is performed according to the existing instant messaging message sending flow: 1. a client adds a message to be sent into a message sending queue (the message sending queue is often designed to ensure that a user thread is not blocked); 2. the sending thread takes out the message from the head of the message sending queue and sends the message to the server, and the blocking thread waits for the server to reply to the ACK (Acknowledgement character) of the message; 3. the server receives the message and replies ACK of the message to the client; 4. the client receives the ACK; 5. and the sending thread removes the blockage and processes the next message.
If the number of the current to-be-sent read receipts reaches the preset threshold, that is, the number of the current to-be-sent read receipts is large, the multiple read receipts can be sent to the server once in a packaging manner, so that the time for waiting the server to reply the ACK is shortened, the time for sending the read receipts is shortened, and the sending efficiency of the read receipts is improved.
Further, in an embodiment of the read receipt sending method of the present invention, step S40 includes:
detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet or not;
and if the quantity of the confirmation characters in the confirmation character packet is the same as the quantity of the read receipt in the read receipt packet, confirming that the read receipt packet is successfully sent.
In this embodiment, after receiving the acknowledgement character packet fed back by the server based on the read receipt packet, the client first detects whether the number of the acknowledgement characters included in the acknowledgement character packet is the same as the number of the read receipts included in the read receipt packet sent by the client, and if the number of the acknowledgement characters included in the read receipt packet is the same as the number of the read receipts included in the read receipt packet sent by the client, it indicates that the current read receipt to be sent has been successfully sent, and the read receipt to be sent can be removed from the sending queue.
In this embodiment, if the number of the acknowledgment characters included in the acknowledgment character packet is the same as the number of the read receipts included in the read receipt packet sent by the client, it indicates that the current read receipt to be sent has been sent successfully, and the read receipt to be sent can be removed from the sending queue, so that the read receipt that has been sent successfully can be prevented from being sent repeatedly.
Further, in an embodiment of the read receipt sending method of the present invention, after detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet, the method further includes:
and if the number of the confirmation characters in the confirmation character packet is less than the number of the read receipts in the read receipt packet, acquiring the first type of read receipts which do not correspond to the confirmation characters, and confirming that the first type of read receipts fail to be sent.
In an optional embodiment of the present invention, if it is detected that the number of the acknowledgment characters included in the acknowledgment character packet is smaller than the number of the acknowledgement characters included in the read receipt packet sent by the client, that is, the acknowledgment characters corresponding to the partially sent read receipts are not received, for example, the acknowledgment characters corresponding to the read receipts 41 to 50 (i.e., the first type of read receipts) are not received, it is indicated that the sending of the read receipts 41 to 50 is not successful, the read receipts 1 to 40 can be removed from the sending queue, and the read receipts 41 to 50 are still retained in the sending queue to wait for the next sending.
Further, in an embodiment of the read receipt sending method of the present invention, after confirming that the sending of the first type of read receipt fails, the method further includes:
marking the first type of the receipt as a to-be-sent receipt, acquiring the current to-be-sent receipt, and packaging the receipt to obtain a receipt packet.
In this embodiment, the first type of the read receipt is marked as the read receipt to be sent, when the next sending time is reached, the first type of the read receipt and the read receipt to be sent obtained according to step S10 are taken together as the read receipt to be sent, and then the read receipt is packaged to obtain the read receipt package; sending the read receipt packet to a server; receiving a confirmation character packet fed back by the server based on the read receipt packet; and obtaining the sending result of the read receipt packet according to the confirmation character packet.
In this embodiment, if part of the pieces of the read receipt fail to be sent, the part of the pieces of the read receipt are marked as pieces of the read receipt to be sent, and when the time point reaches the next sending time point, the part of the pieces of the read receipt and the pieces of the read receipt to be sent obtained according to step S10 are taken as pieces of the read receipt to be sent together, and then the subsequent steps of sending the pieces of the read receipt are executed, so that the pieces of the read receipt which fail to be sent are ensured not to be missed to be sent in a retransmission manner.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a read receipt sending program is stored on the computer-readable storage medium, and when executed by a processor, the read receipt sending program implements the following steps:
acquiring a read receipt to be sent currently, and packaging the read receipt to obtain a read receipt packet;
sending the read receipt packet to a server;
receiving a confirmation character packet fed back by the server based on the read receipt packet;
and obtaining the sending result of the read receipt packet according to the confirmation character packet.
The read receipt sender when executed by the processor further performs the steps of:
and when the information state is detected to be changed from unread to read, acquiring the read receipt of the information to obtain the read receipt to be sent currently.
The read receipt sender when executed by the processor further performs the steps of:
acquiring the current read receipt to be sent, and detecting whether the number of the current read receipt to be sent reaches a preset threshold value;
and if the number of the current to-be-sent read receipts reaches a preset threshold value, packaging the current to-be-sent read receipts to obtain read receipt packages.
The read receipt sender when executed by the processor further performs the steps of:
detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet or not;
and if the quantity of the confirmation characters in the confirmation character packet is the same as the quantity of the read receipt in the read receipt packet, confirming that the read receipt packet is successfully sent.
The read receipt sender when executed by the processor further performs the steps of:
and if the number of the confirmation characters in the confirmation character packet is less than the number of the read receipts in the read receipt packet, acquiring the first type of read receipts which do not correspond to the confirmation characters, and confirming that the first type of read receipts fail to be sent.
The read receipt sender when executed by the processor further performs the steps of:
marking the first type of the receipt as a to-be-sent receipt, acquiring the current to-be-sent receipt, and packaging the receipt to obtain a receipt packet.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the above-mentioned read receipt sending method, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for sending a receipt, comprising:
acquiring the current read receipt to be sent, and detecting whether the number of the current read receipt to be sent reaches a preset threshold value;
if the number of the current to-be-sent read receipts reaches a preset threshold value, packaging the current to-be-sent read receipts to obtain read receipt packages;
sending the read receipt package to a server side, so that the server side replies corresponding confirmation characters based on the read receipt contained in the received read receipt package, and packaging the confirmation characters to obtain a confirmation character package;
receiving a confirmation character packet fed back by the server based on the read receipt packet;
and obtaining the sending result of the read receipt packet according to the confirmation character packet.
2. The method for sending a receipt as claimed in claim 1, wherein the step of obtaining the receipt currently to be sent comprises:
and when the information state is detected to be changed from unread to read, acquiring the read receipt of the information to obtain the read receipt to be sent currently.
3. The method of sending the receipt as read in claim 1, wherein the step of obtaining the sending result of the receipt based on the confirmation character packet comprises:
detecting whether the number of the confirmation characters in the confirmation character packet is the same as the number of the read receipts in the read receipt packet or not;
and if the quantity of the confirmation characters in the confirmation character packet is the same as the quantity of the read receipt in the read receipt packet, confirming that the read receipt packet is successfully sent.
4. The method of sending the acknowledgement receipt according to claim 3, wherein after detecting whether the number of the acknowledgement characters in the acknowledgement character packet is the same as the number of the acknowledgement receipts in the acknowledgement character packet, the method further comprises:
and if the number of the confirmation characters in the confirmation character packet is less than the number of the read receipts in the read receipt packet, acquiring the first type of read receipts which do not correspond to the confirmation characters, and confirming that the first type of read receipts fail to be sent.
5. The method of claim 4, wherein after confirming that the first type of receipt has failed to be sent, further comprising:
marking the first type of the receipt as a to-be-sent receipt, acquiring the current to-be-sent receipt, and packaging the receipt to obtain a receipt packet.
6. A read receipt transmitting device, comprising: a memory, a processor, and a read receipt-sending program stored on the memory and executable on the processor, the read receipt-sending program when executed by the processor implementing the steps of:
acquiring the current read receipt to be sent, and detecting whether the number of the current read receipt to be sent reaches a preset threshold value;
if the number of the current to-be-sent read receipts reaches a preset threshold value, packaging the current to-be-sent read receipts to obtain read receipt packages;
sending the read receipt package to a server side, so that the server side replies corresponding confirmation characters based on the read receipt contained in the received read receipt package, and packaging the confirmation characters to obtain a confirmation character package;
receiving a confirmation character packet fed back by the server based on the read receipt packet;
and obtaining the sending result of the read receipt packet according to the confirmation character packet.
7. The read receipt sender device of claim 6, wherein the read receipt sender program when executed by the processor further performs the steps of:
and when the information state is detected to be changed from unread to read, acquiring the read receipt of the information to obtain the read receipt to be sent currently.
8. The receipt sent device of claim 6, wherein the receipt sent program when executed by the processor further implements the steps of the receipt sent method of any of claims 3 to 5.
9. A computer-readable storage medium, having a read receipt sending program stored thereon, which when executed by a processor implements the steps of the read receipt sending method of any of claims 1-5.
CN201810774605.4A 2018-07-13 2018-07-13 Method and device for sending read receipt and computer readable storage medium Active CN110719145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810774605.4A CN110719145B (en) 2018-07-13 2018-07-13 Method and device for sending read receipt and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810774605.4A CN110719145B (en) 2018-07-13 2018-07-13 Method and device for sending read receipt and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110719145A CN110719145A (en) 2020-01-21
CN110719145B true CN110719145B (en) 2022-04-19

Family

ID=69208716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810774605.4A Active CN110719145B (en) 2018-07-13 2018-07-13 Method and device for sending read receipt and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110719145B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006880B (en) * 2021-10-25 2023-06-27 北京有竹居网络技术有限公司 Method and device for acquiring message receipt, electronic equipment and storage medium
CN116595014B (en) * 2023-07-18 2023-09-26 中孚信息股份有限公司 Storage system, method and device for read receipt and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000079431A1 (en) * 1999-06-18 2000-12-28 Carter William T Certified mailer and method of using the same
CN101409872A (en) * 2008-11-19 2009-04-15 中兴通讯股份有限公司 Method for processing color message group send acknowledgement
US7774791B1 (en) * 2002-04-24 2010-08-10 Informatica Corporation System, method and computer program product for data event processing and composite applications
CN106130876A (en) * 2016-06-22 2016-11-16 北京小米移动软件有限公司 A kind of method and device of information flag
CN107515908A (en) * 2017-08-11 2017-12-26 新智数通(北京)技术服务有限公司 A kind of data processing method and device
CN108183854A (en) * 2018-03-16 2018-06-19 北京邦邦共赢网络科技有限公司 A kind of realization message receipt method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7099997B2 (en) * 2003-02-27 2006-08-29 International Business Machines Corporation Read-modify-write avoidance using a boundary word storage mechanism
US8036221B2 (en) * 2004-06-14 2011-10-11 Cisco Technology, Inc. Method and system for dynamic secured group communication
US8285761B2 (en) * 2007-10-26 2012-10-09 Microsoft Corporation Aggregation of metadata associated with digital media files
US9552458B2 (en) * 2012-03-16 2017-01-24 The Research Institute At Nationwide Children's Hospital Comprehensive analysis pipeline for discovery of human genetic variation
CN103731334B (en) * 2012-10-10 2019-02-26 中兴通讯股份有限公司 Message status methods of exhibiting and device
CN107734012B (en) * 2017-09-27 2021-06-15 努比亚技术有限公司 Message pushing method, system and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000079431A1 (en) * 1999-06-18 2000-12-28 Carter William T Certified mailer and method of using the same
US7774791B1 (en) * 2002-04-24 2010-08-10 Informatica Corporation System, method and computer program product for data event processing and composite applications
CN101409872A (en) * 2008-11-19 2009-04-15 中兴通讯股份有限公司 Method for processing color message group send acknowledgement
CN106130876A (en) * 2016-06-22 2016-11-16 北京小米移动软件有限公司 A kind of method and device of information flag
CN107515908A (en) * 2017-08-11 2017-12-26 新智数通(北京)技术服务有限公司 A kind of data processing method and device
CN108183854A (en) * 2018-03-16 2018-06-19 北京邦邦共赢网络科技有限公司 A kind of realization message receipt method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Lane Change and Merge Maneuvers for Connected and Automated Vehicles: A Survey;David Bevly;《IEEE》;20160718;全文 *
助力"互联网+"行动:解读北信源的信息网络安全——基于"互联网+"行动背景下的北信源信息安全及战略布局;崔传桢;《信息安全研究》;20160305;全文 *

Also Published As

Publication number Publication date
CN110719145A (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN106850402B (en) Message transmission method and device
CN110233881B (en) Service request processing method, device, equipment and storage medium
CN109474688B (en) Method, device, equipment and medium for sending instant communication network request message
US8271683B2 (en) Content push service
CN109743143B (en) Data retransmission method, device and computer readable storage medium
EP1768296A2 (en) Method and apparatus for transmitting signaling data messages in a wireless communications system
US9037935B2 (en) Apparatus and method for retransmitting message in message transmission system
EP2227066A1 (en) Message service implementation method and device
CN110719145B (en) Method and device for sending read receipt and computer readable storage medium
CN107623545A (en) Document transmission method and device
CN112929455B (en) UDP-based data transmission method, device, equipment and readable storage medium
JP4354924B2 (en) Method for split transmission and automatic retransmission of MMS messages
CN107547289A (en) Message delivery system, message method and device, method of reseptance and device
EP3961947B1 (en) Data retransmission method and apparatus
CN110995780A (en) API calling method and device, storage medium and electronic equipment
CN112468386B (en) Method and terminal for processing repeated messages
CN102137346A (en) Method for processing multimedia messaging service (MMS) as well as related equipment and system
KR20160131632A (en) Method and System for Sending and Receiving Push Data
CN112333115B (en) Data transmission method, terminal device, server and storage medium
CN112867063A (en) Data transmission method, data receiving method, base station and electronic price tag
JP6934523B2 (en) Transmission device, transmission method, and transmission program
CN103795507B (en) The instruction Retransmission timeout method of EPON system and instruction Retransmission timeout system
JP2020013324A (en) Settlement system, settlement terminal, service provider terminal, user terminal, information processing method, and program
TWI825486B (en) Communication apparatus and method having data transmission sorting mechanism
JP2011221864A (en) Information processing system and information processing method

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