CN105245432B - Unread message counting method and device and terminal - Google Patents

Unread message counting method and device and terminal Download PDF

Info

Publication number
CN105245432B
CN105245432B CN201410300277.6A CN201410300277A CN105245432B CN 105245432 B CN105245432 B CN 105245432B CN 201410300277 A CN201410300277 A CN 201410300277A CN 105245432 B CN105245432 B CN 105245432B
Authority
CN
China
Prior art keywords
messages
terminal
unread
sending
numbers
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
CN201410300277.6A
Other languages
Chinese (zh)
Other versions
CN105245432A (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.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410300277.6A priority Critical patent/CN105245432B/en
Publication of CN105245432A publication Critical patent/CN105245432A/en
Application granted granted Critical
Publication of CN105245432B publication Critical patent/CN105245432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an unread message counting method, an unread message counting device and an unread message counting terminal, and belongs to the technical field of internet application. The method comprises the following steps: receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates the n messages, and n is a positive integer; acquiring the maximum number of the read message between the sending terminal and the sending terminal; and calculating the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages. The receiving terminal calculates the number of the unread messages according to the number of the actually received messages and the maximum number of the read messages, solves the problem that the number of the actually stored unread messages is inconsistent with the number of the displayed unread messages, and improves the accuracy rate of counting the unread messages.

Description

Unread message counting method and device and terminal
Technical Field
The invention relates to the technical field of internet application, in particular to an unread message counting method, an unread message counting device and an unread message counting terminal.
Background
With the widespread use of various types of terminals, social applications have also come about. The accurate statistics of unread messages in the social applications becomes a problem to be solved by the social applications.
In the present implementation, there is provided an unread message counting method: under the situation that a sending terminal sends messages to a receiving terminal, after a user using the sending terminal finishes editing n messages which need to be sent to the receiving terminal, the sending terminal generates global numbers for the n messages according to all the messages of the sending terminal, stores the numbers generated for the n messages, counts the number of the messages which are not sent to the receiving terminal as the number of unread messages of the receiving terminal aiming at the sending terminal, and finally sends the n messages, the respective numbers of the n messages and the number of the unread messages to the receiving terminal; and the receiving terminal receives and displays the n messages sent by the sending terminal, the numbers corresponding to the n messages and the number of the unread messages.
In the process of implementing the invention, the inventor finds that the technology at least has the following problems: when the number of messages stored in the receiving terminal is larger than the storage capacity, the receiving terminal eliminates new messages exceeding the storage capacity, and the number of the unread messages displayed is not changed, so that the number of the unread messages actually stored in the receiving terminal is inconsistent with the number of the unread messages displayed.
Disclosure of Invention
In order to solve the problem that the number of unread messages actually stored in a receiving terminal is inconsistent with the number of unread messages displayed, the embodiment of the invention provides an unread message counting method, an unread message counting device and a terminal. The technical scheme is as follows:
according to a first aspect of the present invention, there is provided an unread message counting method for use in a receiving terminal, the method comprising:
receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates the n messages, and n is a positive integer;
acquiring the maximum number of the read message between the sending terminal and the sending terminal;
and calculating the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
According to a second aspect of the present invention, there is provided an unread message counting method for use in a transmitting terminal, the method comprising:
generating n messages to be sent to a receiving terminal, wherein n is a positive integer;
generating respective numbers for the n messages in sequence according to the historical message numbers sent by the sending terminal to the receiving terminal;
and sending the n messages and the respective numbers of the n messages to the receiving terminal so that the receiving terminal can acquire the maximum number of the read messages between the receiving terminal and the sending terminal, and calculating the number of the unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
According to a third aspect of the present invention, there is provided an unread message counting apparatus for use in a receiving terminal, the apparatus comprising:
the receiving module is used for receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated by the sending terminal according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the n messages are generated by the sending terminal, and n is a positive integer;
the acquisition module is used for acquiring the maximum number of the read message between the transmission terminal and the acquisition module;
and the counting module is used for calculating the number of the unread messages according to the respective numbers of the n messages received by the receiving module and the maximum number of the read messages acquired by the acquiring module.
According to a fourth aspect of the present invention, there is provided an unread message counting apparatus for use in a transmitting terminal, the apparatus comprising:
the message generating module is used for generating n messages to be sent to a receiving terminal, wherein n is a positive integer;
a numbering module, configured to sequentially generate respective numbers for the n messages generated by the message generating module according to a historical message number sent by the sending terminal to the receiving terminal;
and the sending module is used for sending the n messages generated by the message generating module and the respective numbers of the n messages generated by the numbering module to the receiving terminal so that the receiving terminal can obtain the maximum number of the read messages between the receiving terminal and the sending terminal, and the number of the unread messages is calculated according to the respective numbers of the n messages and the maximum number of the read messages.
According to a fifth aspect of the present invention, there is provided a receiving terminal 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 including instructions for:
receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates the n messages, and n is a positive integer;
acquiring the maximum number of the read message between the sending terminal and the sending terminal;
and calculating the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
According to a sixth aspect of the present invention, there is provided a transmission terminal 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 including instructions for:
generating n messages to be sent to a receiving terminal, wherein n is a positive integer;
generating respective numbers for the n messages in sequence according to the historical message numbers sent by the sending terminal to the receiving terminal;
and sending the n messages and the respective numbers of the n messages to the receiving terminal so that the receiving terminal can acquire the maximum number of the read messages between the receiving terminal and the sending terminal, and calculating the number of the unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: the receiving terminal obtains the number of the unread messages by receiving the n messages sent by the sending terminal and the respective numbers of the n messages, and finally, the number of the unread messages is obtained by calculation according to the respective numbers of the n messages and the maximum number of the read messages.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an implementation environment related to an unread message counting method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for counting unread messages according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for counting unread messages according to another embodiment of the present invention;
FIG. 4 is a flowchart of a method for counting unread messages according to another embodiment of the present invention;
fig. 5 is a diagram illustrating an effect of displaying the number of unread messages by a receiving terminal according to another embodiment of the present invention;
FIG. 6 is a flowchart of a method for counting unread messages according to another embodiment of the present invention;
fig. 7 is a diagram illustrating an effect of displaying the number of unread messages by a receiving terminal according to still another embodiment of the present invention;
fig. 8 is a diagram illustrating an effect of displaying the number of unread messages by a receiving terminal according to another embodiment of the present invention;
fig. 9 is a block diagram illustrating an architecture of an apparatus for counting unread messages at a receiving terminal according to an embodiment of the present invention;
fig. 10 is a block diagram illustrating an architecture of an unread message counting apparatus at a receiving terminal according to another embodiment of the present invention;
fig. 11 is a block diagram illustrating an architecture of an unread message counting apparatus at a transmitting terminal according to still another embodiment of the present invention;
fig. 12 is a block diagram illustrating a structure of an unread message counting apparatus at a transmitting terminal according to still another embodiment of the present invention;
fig. 13 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, a schematic structural diagram of an implementation environment related to an unread message counting method according to an embodiment of the present invention is shown. The implementation environment includes: a receiving terminal 110 and a transmitting terminal 120.
Receiving terminal 110 is a mobile communication device. The receiving terminal 110 may operate in a mobile phone, a tablet computer, a laptop portable computer, a desktop computer, and the like.
The transmitting terminal 120 is a mobile communication device. The sending terminal 120 may be a mobile phone, a tablet computer, a laptop portable computer, a desktop computer, etc.
The receiving terminal 110 and the transmitting terminal 120 may be connected through a wireless network or a wired network.
Referring to fig. 2, a flowchart of a method for counting unread messages according to an embodiment of the present invention is shown. The embodiment is exemplified by applying the unread message counting method to the implementation environment shown in fig. 1. On the receiving terminal side, the unread message counting method comprises the following steps:
step 201, receiving n messages sent by a sending terminal and respective numbers of the n messages.
The number is generated according to the serial number sequence of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates n messages, and n is a positive integer.
Step 202, obtaining the maximum number of the read message between the sending terminal and the sending terminal.
Step 203, calculating the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
In summary, in the unread message counting method provided in this embodiment, the receiving terminal receives the n messages sent by the sending terminal and the respective numbers of the n messages, obtains the maximum number of the unread messages between the receiving terminal and the sending terminal, and finally obtains the number of the unread messages by performing calculation according to the respective numbers of the n messages and the maximum number of the unread messages.
Referring to fig. 3, a flowchart of a method for counting unread messages according to another embodiment of the present invention is shown. The embodiment is exemplified by applying the unread message counting method to the implementation environment shown in fig. 1. On the side of a sending terminal, the unread message counting method comprises the following steps:
step 301, n messages to be sent to the receiving terminal are generated, where n is a positive integer.
Step 302, according to the historical message numbers sent by the sending terminal to the receiving terminal, generating respective numbers for n messages in sequence.
Step 303, sending the n messages and the respective numbers of the n messages to the receiving terminal, so that the receiving terminal can obtain the maximum number of the read messages between the receiving terminal and the sending terminal, and calculating the number of the unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
In summary, in the unread message counting method provided in this embodiment, the sending terminal generates respective numbers for n messages to be sent to the receiving terminal according to the historical message numbers sent to the receiving terminal, and sends the n messages and the respective numbers of the n messages to the receiving terminal. The sending terminal generates respective numbers for the n messages in sequence according to the historical message numbers sent to the receiving terminal, and ensures the sequential arrangement of the messages and the continuity of the message numbers, thereby solving the problem that the number of the unread messages actually stored by the receiving terminal is inconsistent with the number of the unread messages displayed, and improving the accuracy of counting the unread messages.
Referring to fig. 4, a flowchart of a method for counting unread messages according to another embodiment of the present invention is shown. The embodiment is still exemplified by applying the unread message counting method to the implementation environment shown in fig. 1. As a more preferred embodiment provided based on the embodiments shown in fig. 2 and fig. 3, this embodiment details a specific implementation manner of counting unread messages by a receiving terminal. In the present embodiment, a smart phone is exemplified as an execution subject. The unread message counting method comprises the following steps:
step 401, a sending terminal generates n messages to be sent to a receiving terminal, where n is a positive integer.
In the embodiment provided by the invention, the sending terminal takes the smart phone A as an example, and the receiving terminal takes the smart phone B as an example for explanation. The smart phone A generates n messages to be sent to the smart phone B, wherein n is a positive integer.
For example, the smart phone a corresponds to the user a, the smart phone B corresponds to the user B, and under a situation that the user a edits a microblog by using the smart phone a, the user a edits 3 messages to be sent to the user B using the smart phone B by using the smart phone a, where the 3 messages are shown in table 1:
TABLE 1
Number of message Message content
Message 1 Today weather super good @ user B
Message 2 Eating bar together at night @ user B
Message 3 Night peace, buddies @ user B
Step 402, the sending terminal generates respective numbers for n messages in sequence according to the historical message numbers sent by the sending terminal to the receiving terminal.
The method for generating respective numbers for n messages by a sending terminal according to the historical message numbers sent to a receiving terminal by the sending terminal comprises the following steps:
a. the transmitting terminal generates respective numbers for n messages by sequentially adding a preset counting unit from the maximum number of the history messages transmitted from the transmitting terminal to the receiving terminal according to the sequence of the message generation time from front to back.
That is, the smartphone a sets the number of 3 messages in table 1 with 1 as the counting unit according to the maximum number in the history message numbers sent to the smartphone B, for example, if the maximum message number in the history message numbers sent to the smartphone B by the smartphone a is a10, the 3 messages shown in table 1 are numbered sequentially by adding a predetermined counting unit:
message 1, a10+1, message number a11 of message 1;
message 2, a11+1, message 2 having message number a 12;
message 3, a12+1, message 3 has message number a 13.
The specific numbers are shown in table 2:
TABLE 2
Number of message Message content Message numbering
Message 1 Today weather super good @ user B A11
Message 2 Eating bar together at night @ user B A12
Message 3 Night peace, buddies @ user B A13
In step 403, the sending terminal sends the n messages and their respective numbers to the receiving terminal.
And the smart phone A sends the respective numbers of the 3 messages in the table 1 and the 3 messages in the table 2 to the smart phone B.
In step 404, the receiving terminal receives the n messages sent by the sending terminal and the respective numbers of the n messages.
The number is generated according to the serial number sequence of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates n messages, and n is a positive integer.
And the smart phone B receives the 3 messages sent by the smart phone A and the respective numbers of the 3 messages.
Step 405, the receiving terminal obtains the maximum number of the read message with the sending terminal.
The smartphone B obtains the maximum number of the read message, i.e., the maximum number a10 as described in 402, from the stored messages sent by the smartphone a.
In step 406, the receiving terminal calculates the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
Wherein, the receiving terminal calculates the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages, and comprises the following steps:
406a, the receiving terminal counts the number of the messages with the number larger than the maximum number of the read messages in the n messages.
In the 3 messages received by the smartphone B: the message number of the message 1 is a11, the message number of the message 2 is a12, and the message number of the message 3 is a13, wherein the maximum number of the read message stored in the smartphone B is a10, which is obtained by comparing and counting: a11, a12 and a13 are all greater than the maximum number a10 of the read message, so that the number of messages whose message numbers are greater than the maximum number of the read message in the messages received by the smartphone B is 3.
406b, the receiving terminal takes the counted number of the messages as the number of the unread messages.
The number of unread messages is determined according to the 3 messages counted in step 406 a.
Step 407, the receiving terminal displays the number of unread messages in the communication records of the receiving terminal and the sending terminal.
As shown in fig. 5, the number of unread messages in the microblog message bar displayed by the smartphone B is 3. Since the @ of the user B is used when the user a edits the message using the smartphone a, in fig. 5, the unread message displayed in the message bar displayed on the smartphone B is 3 in the portion where the @ mentions my.
Optionally, as another possible implementation manner, referring to fig. 6, an alternative method of step 407 is:
and step 408, the receiving terminal displays the n messages in sequence according to the sequence of the numbers of the n messages from small to large.
Referring to fig. 7, fig. a shows that the smartphone B backstage arranges 3 unread messages in the order of a11, a12, and a13, and fig. B shows that when the smartphone B displays the unread messages, the smartphone B displays the message 1, the message 2, and the message 3 in the order of fig. a.
In summary, in the unread message counting method provided in this embodiment, the sending terminal sequentially generates respective numbers for n messages according to the historical message numbers sent to the receiving terminal, and sends the n messages and the respective numbers of the n messages to the receiving terminal. The sending terminal numbers independently aiming at different receiving terminals, and the sequence arrangement among the messages and the continuity among the message numbers are ensured by generating the numbers in sequence;
on the other hand, the receiving terminal takes the number of the messages with the number larger than the maximum number of the read messages in the n messages sent by the sending terminal as the number of the unread messages, so that the problem that the number of the unread messages actually received is inconsistent with the number of the unread messages stored is avoided, the receiving terminal can count according to the number of the messages actually received, and the counting accuracy of the number of the unread messages is improved.
In addition, on the basis of the method shown in fig. 4, when the receiving terminal receives n messages sent by multiple sending terminals simultaneously, please refer to fig. 8, the message sent by the smartphone C is added to the message received by the smartphone B, where the smartphone C corresponds to the user C, and as shown in a in fig. 8, the message received by the smartphone B includes messages with message numbers C14, C15, and C16 sent by the smartphone C in addition to 3 messages sent by the smartphone a. The messages with message numbers C14, C15, and C16 sent by the smartphone C and received by the smartphone B are shown in table 3:
TABLE 3
Number of message Message content Message numbering
Message 1 This well-skilled dazzle @ user B C14
Message 2 New movie, watching bar together @ user B C15
Message 3 Classmates to be examined pay attention to @ user B C16
Here, the maximum number of the read message for the smartphone C in the smartphone B is C12, and according to the message number sent by the smartphone C and received as shown in table 3, the statistical calculation results that C14, C15, and C16 are respectively greater than the maximum number C12 of the read message for the smartphone C in the smartphone B, so that 3 unread messages sent by the smartphone C are obtained, and in combination with the number of the messages sent by the smartphone a in fig. 4, the number of the unread messages counted by the smartphone B is: 6 strips.
As shown in fig. B1 and B2, according to the method described in step 407 or step 408, the smartphone B displays the unread message, which is the same as the method of the embodiment corresponding to fig. 4 and is not described here again.
The unread message counting method provided by the embodiment of the invention is only explained by taking a microblog as an example, and is also suitable for counting unread messages by third-party software such as WeChat, QQ and American whisper, and the like, and the application range is not limited so as to realize the unread message counting method provided by the invention.
Referring to fig. 9, a block diagram of an unread message counting apparatus according to an embodiment of the present invention is shown. The unread message counting apparatus is used in a receiving terminal, wherein the unread message counting apparatus includes: a receiving module 510, an obtaining module 520, and a counting module 530.
A receiving module 510, configured to receive n messages sent by a sending terminal and respective numbers of the n messages, where the numbers are generated by the sending terminal according to a sequence of numbers of historical messages sent by the sending terminal to a receiving terminal after the sending terminal generates the n messages, and n is a positive integer;
an obtaining module 520, configured to obtain a maximum number of a read message between a sending terminal and the receiving terminal;
a counting module 530, configured to calculate the number of unread messages according to the respective numbers of the n messages received by the receiving module 510 and the maximum number of the read messages acquired by the acquiring module 520.
In summary, in the unread message counting apparatus provided in this embodiment, the receiving terminal receives the n messages sent by the sending terminal and the respective numbers of the n messages, obtains the maximum number of the unread messages between the receiving terminal and the sending terminal, and finally obtains the number of the unread messages by performing calculation according to the respective numbers of the n messages and the maximum number of the unread messages.
Referring to fig. 10, a block diagram of an unread message counting apparatus according to another embodiment of the present invention is shown. The unread message counting apparatus is used in a receiving terminal, wherein the unread message counting apparatus includes: a receiving module 510, an obtaining module 520, a counting module 530, a displaying module 540, and a presenting module 550.
A receiving module 510, configured to receive n messages sent by a sending terminal and respective numbers of the n messages, where the numbers are generated by the sending terminal according to a sequence of numbers of historical messages sent by the sending terminal to a receiving terminal after the sending terminal generates the n messages, and n is a positive integer;
an obtaining module 520, configured to obtain a maximum number of a read message between a sending terminal and the receiving terminal;
a counting module 530, configured to calculate the number of unread messages according to the respective numbers of the n messages received by the receiving module 510 and the maximum number of the read messages acquired by the acquiring module 520.
Optionally, the counting module 530 includes:
a counting unit 531, configured to count the number of messages in the n messages, where the number of the messages is greater than the maximum number of the read messages;
a determining unit 532, configured to use the number of messages counted by the counting unit 531 as the number of unread messages.
Optionally, the unread message counting apparatus further includes:
and a display module 540, configured to display the number of unread messages in the communication records of the receiving terminal and the sending terminal after calculating the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
Optionally, the unread message counting apparatus further includes:
and a display module 550, configured to calculate the number of unread messages according to the respective numbers of the n messages and the maximum number of the read messages, and then sequentially display the n messages according to the sequence of the numbers of the n messages from small to large.
In summary, in the unread message counting apparatus provided in this embodiment, the receiving terminal receives the n messages sent by the sending terminal and the respective numbers of the n messages, obtains the maximum number of the unread messages between the receiving terminal and the sending terminal, and finally obtains the number of the unread messages by performing calculation according to the respective numbers of the n messages and the maximum number of the unread messages.
Referring to fig. 11, a block diagram of an unread message counting apparatus according to another embodiment of the present invention is shown. The unread message counting apparatus is used in a sending terminal, wherein the unread message counting apparatus includes: a message generation module 610, a numbering module 620 and a sending module 630.
A message generating module 610, configured to generate n messages to be sent to a receiving terminal, where n is a positive integer;
a numbering module 620, configured to sequentially generate respective numbers for the n messages generated by the message generating module 610 according to the historical message numbers sent by the sending terminal to the receiving terminal;
a sending module 630, configured to send the n messages generated by the message generating module 610 and the respective numbers of the n messages generated by the numbering module 620 to the receiving terminal, so that the receiving terminal obtains the maximum number of the read messages with the sending terminal, and calculates the number of the unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
In summary, in the unread message counting apparatus provided in this embodiment, the sending terminal generates respective numbers for n messages to be sent to the receiving terminal according to the historical message numbers sent to the receiving terminal, and sends the n messages and the respective numbers of the n messages to the receiving terminal. The sending terminal generates respective numbers for the n messages in sequence according to the historical message numbers sent to the receiving terminal, and ensures the sequential arrangement of the messages and the continuity of the message numbers, thereby solving the problem that the number of the unread messages actually stored by the receiving terminal is inconsistent with the number of the unread messages displayed, and improving the accuracy of counting the unread messages.
Referring to fig. 12, a block diagram of an unread message counting apparatus according to another embodiment of the present invention is shown. The unread message counting apparatus is used in a sending terminal, wherein the unread message counting apparatus includes: a message generation module 610, a numbering module 620 and a sending module 630.
A message generating module 610, configured to generate n messages to be sent to a receiving terminal, where n is a positive integer;
a numbering module 620, configured to sequentially generate respective numbers for the n messages generated by the message generating module 610 according to the historical message numbers sent by the sending terminal to the receiving terminal;
optionally, the numbering module 620 includes:
a numbering unit 621, configured to sequentially increment a predetermined count unit by n messages to generate respective numbers, in order from the maximum number of the history message sent from the sending terminal to the receiving terminal, according to the message generation time from the front to the back.
A sending module 630, configured to send the n messages generated by the message generating module 610 and the respective numbers of the n messages generated by the numbering module 620 to the receiving terminal, so that the receiving terminal obtains the maximum number of the read messages with the sending terminal, and calculates the number of the unread messages according to the respective numbers of the n messages and the maximum number of the read messages.
In summary, in the unread message counting apparatus provided in this embodiment, the sending terminal generates respective numbers for n messages to be sent to the receiving terminal according to the historical message numbers sent to the receiving terminal, and sends the n messages and the respective numbers of the n messages to the receiving terminal. The sending terminal generates respective numbers for the n messages in sequence according to the historical message numbers sent to the receiving terminal, and ensures the sequential arrangement of the messages and the continuity of the message numbers, thereby solving the problem that the number of the unread messages actually stored by the receiving terminal is inconsistent with the number of the unread messages displayed, and improving the accuracy of counting the unread messages.
Referring to fig. 13, which shows a block diagram of a terminal according to an embodiment of the present invention, the terminal 700 may include a communication unit 710, a memory 720 including one or more computer-readable storage media, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a WIFI (Wireless Fidelity) module 770, a processor 780 including one or more processing cores, and a power supply 790. Those skilled in the art will appreciate that the terminal structure shown in fig. 13 is not intended to be limiting and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the communication unit 710 may be used for receiving and transmitting information or signals during a call, and the communication unit 710 may be an RF (Radio Frequency) circuit, a router, a modem, or other network communication devices. In particular, when the communication unit 710 is an RF circuit, downlink information of a base station is received and then delivered to one or more processors 780 for processing; in addition, data relating to uplink is transmitted to the base station. Generally, the RF circuit as a communication unit includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the communication unit 710 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (general packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (long term Evolution), email, SMS (Short Messaging Service), and the like. The memory 720 may be used to store software programs and modules, and the processor 780 performs various functional applications and data processing by operating the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 700, and the like. Further, the memory 720 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 720 may also include a memory controller to provide access to memory 720 by processor 780 and input unit 730.
The input unit 730 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Preferably, the input unit 730 may include a touch-sensitive surface 731 as well as other input devices 732. Touch-sensitive surface 731, also referred to as a touch display screen or touch pad, can collect touch operations by a user on or near touch-sensitive surface 731 (e.g., operations by a user on or near touch-sensitive surface 731 using a finger, stylus, or any other suitable object or attachment) and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 731 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 780, and can receive and execute commands from the processor 780. In addition, the touch-sensitive surface 731 can be implemented in a variety of types, including resistive, capacitive, infrared, and surface acoustic wave. The input unit 730 may also include other input devices 732 in addition to the touch-sensitive surface 731. Preferably, other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 740 may be used to display information input by or provided to the user and various graphic user interfaces of the terminal 700, which may be configured by graphics, text, icons, video, and any combination thereof. The Display unit 740 may include a Display panel 741, and optionally, the Display panel 741 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 731 can overlay display panel 741, such that when touch-sensitive surface 731 detects a touch event thereon or nearby, processor 780 can determine the type of touch event, and processor 780 can then provide a corresponding visual output on display panel 741 based on the type of touch event. Although in FIG. 13 the touch-sensitive surface 731 and the display panel 741 are implemented as two separate components to implement input and output functions, in some embodiments the touch-sensitive surface 731 and the display panel 741 may be integrated to implement input and output functions.
The terminal 700 can also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. The light sensor may include an ambient light sensor that may adjust the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 741 and/or a backlight when the terminal 700 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 700, detailed descriptions thereof are omitted.
Audio circuitry 760, speaker 761, and microphone 762 may provide an audio interface between a user and terminal 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 and output; on the other hand, the microphone 762 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 760, processes the audio data by the audio data output processor 780, and transmits the processed audio data to, for example, another terminal via the communication unit 710, or outputs the audio data to the memory 720 for further processing. The audio circuitry 760 may also include an earbud jack to provide communication of a peripheral headset with the terminal 700.
In order to implement wireless communication, a wireless communication unit 770 may be configured on the terminal, and the wireless communication unit 770 may be a WIFI module. WIFI belongs to a short-distance wireless transmission technology, and the terminal 700 can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the wireless communication unit 770, and provides wireless broadband internet access for the user. Although the wireless communication unit 770 is shown in the drawing, it is understood that it does not belong to the essential constitution of the terminal 700 and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 780 is a control center of the terminal 700, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 700 and processes data by operating or executing software programs and/or modules stored in the memory 720 and calling data stored in the memory 720, thereby integrally monitoring the handset. Optionally, processor 780 may include one or more processing cores; preferably, the processor 780 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 780.
The terminal 700 also includes a power supply 790 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 780 via a power management system that may be used to manage charging, discharging, and power consumption. The power supply 760 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal 700 may further include a camera, a bluetooth module, etc., which will not be described herein.
In this embodiment, the terminal further includes one or more programs, which are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the unread message counting method provided by the embodiments of the present invention. The receiving terminal and the sending terminal provided by the embodiment of the invention have the same structures as the terminals.
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.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. An unread message counting method, for use in a receiving terminal, the method comprising:
receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates the n messages, and n is a positive integer;
acquiring the maximum number of the read message between the sending terminal and the sending terminal;
counting the number of the messages with the number larger than the maximum number of the read messages in the n messages;
taking the counted message number as the unread message number;
displaying the number of the unread messages in the communication records of the receiving terminal and the sending terminal;
the method further comprises the following steps:
and when the receiving terminal receives the messages sent by a plurality of sending terminals at the same time, taking the sum of the unread messages sent by the sending terminals as the number of the unread messages obtained by statistics.
2. An unread message counting method, for use in a transmitting terminal, the method comprising:
generating n messages to be sent to a receiving terminal, wherein n is a positive integer;
generating respective numbers for the n messages in sequence according to the historical message numbers sent by the sending terminal to the receiving terminal;
sending the n messages and respective numbers of the n messages to the receiving terminal so that the receiving terminal can obtain the maximum number of the read messages between the receiving terminal and the sending terminal, counting the number of the messages of which the numbers are greater than the maximum number of the read messages in the n messages, taking the counted number of the messages as the number of unread messages, displaying the number of the unread messages in communication records of the receiving terminal and the sending terminal, and when the receiving terminal receives the messages sent by a plurality of sending terminals at the same time, taking the sum of the number of the unread messages sent by the sending terminals as the counted number of the unread messages.
3. The method according to claim 2, wherein the sequentially generating respective numbers for the n messages according to the historical message numbers sent by the sending terminal to the receiving terminal comprises:
and sequentially adding a preset counting unit to generate respective numbers for the n messages from the maximum number of the historical messages sent from the sending terminal to the receiving terminal according to the sequence of the message generation time from front to back.
4. An unread message counting apparatus, for use in a receiving terminal, the apparatus comprising:
the receiving module is used for receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated by the sending terminal according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the n messages are generated by the sending terminal, and n is a positive integer;
the acquisition module is used for acquiring the maximum number of the read message between the transmission terminal and the acquisition module;
the counting module is used for counting the number of the messages with the number larger than the maximum number of the read messages in the n messages, and taking the number of the messages counted by the counting unit as the number of the unread messages;
the display module is used for displaying the number of the unread messages in the communication records of the receiving terminal and the sending terminal;
the apparatus is further configured to: and when the receiving terminal receives the messages sent by a plurality of sending terminals at the same time, taking the sum of the unread messages sent by the sending terminals as the number of the unread messages obtained by statistics.
5. An unread message counting apparatus, for use in a transmitting terminal, the apparatus comprising:
the message generating module is used for generating n messages to be sent to a receiving terminal, wherein n is a positive integer;
a numbering module, configured to sequentially generate respective numbers for the n messages generated by the message generating module according to a historical message number sent by the sending terminal to the receiving terminal;
a sending module, configured to send the n messages generated by the message generating module and the respective numbers of the n messages generated by the numbering module to the receiving terminal, so that the receiving terminal obtains a maximum number of the read messages with the sending terminal, counts the number of the messages in the n messages, of which the number is greater than the maximum number of the read messages, takes the counted number of the messages as the number of unread messages, displays the number of the unread messages in the communication records of the receiving terminal and the sending terminal, and the receiving terminal is further configured to take the sum of the number of the unread messages sent by the multiple sending terminals as the number of the unread messages obtained by counting when the receiving terminal receives the messages sent by the multiple sending terminals at the same time.
6. The apparatus of claim 5, wherein the numbering module comprises:
and the numbering unit is used for sequentially adding a preset counting unit to generate respective numbers for the n messages according to the sequence of the message generation time from front to back from the maximum number of the history messages transmitted from the transmitting terminal to the receiving terminal.
7. A receiving terminal, characterized in that the receiving terminal comprises:
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:
receiving n messages sent by a sending terminal and respective numbers of the n messages, wherein the numbers are generated according to the sequence of the numbers of the historical messages sent to the receiving terminal by the sending terminal after the sending terminal generates the n messages, and n is a positive integer;
acquiring the maximum number of the read message between the sending terminal and the sending terminal;
counting the number of the messages with the number larger than the maximum number of the read messages in the n messages;
taking the counted message number as the unread message number;
displaying the number of the unread messages in the communication records of the receiving terminal and the sending terminal;
and when the receiving terminal receives the messages sent by a plurality of sending terminals at the same time, taking the sum of the unread messages sent by the sending terminals as the number of the unread messages obtained by statistics.
8. A transmitting terminal, characterized in that the transmitting terminal comprises:
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:
generating n messages to be sent to a receiving terminal, wherein n is a positive integer;
generating respective numbers for the n messages in sequence according to the historical message numbers sent by the sending terminal to the receiving terminal;
sending the n messages and respective numbers of the n messages to the receiving terminal so that the receiving terminal can obtain the maximum number of the read messages between the receiving terminal and the sending terminal, counting the number of the messages of which the numbers are greater than the maximum number of the read messages in the n messages, taking the counted number of the messages as the number of unread messages, displaying the number of the unread messages in communication records of the receiving terminal and the sending terminal, and when the receiving terminal receives the messages sent by a plurality of sending terminals at the same time, taking the sum of the number of the unread messages sent by the sending terminals as the counted number of the unread messages.
CN201410300277.6A 2014-06-26 2014-06-26 Unread message counting method and device and terminal Active CN105245432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410300277.6A CN105245432B (en) 2014-06-26 2014-06-26 Unread message counting method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410300277.6A CN105245432B (en) 2014-06-26 2014-06-26 Unread message counting method and device and terminal

Publications (2)

Publication Number Publication Date
CN105245432A CN105245432A (en) 2016-01-13
CN105245432B true CN105245432B (en) 2020-01-10

Family

ID=55042940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410300277.6A Active CN105245432B (en) 2014-06-26 2014-06-26 Unread message counting method and device and terminal

Country Status (1)

Country Link
CN (1) CN105245432B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106982394B (en) * 2017-03-30 2020-12-01 腾讯科技(深圳)有限公司 Network live broadcast unread message prompting method and device
CN107948050A (en) * 2017-11-08 2018-04-20 用友网络科技股份有限公司 A kind of device and method that group message read states are provided
CN108809815B (en) * 2018-06-29 2021-06-22 上海哔哩哔哩科技有限公司 Method for updating unread number of session, session processing method, device and system
CN109040118A (en) * 2018-09-06 2018-12-18 北京达佳互联信息技术有限公司 Message treatment method, device, electronic equipment and storage medium
CN109408166A (en) * 2018-09-21 2019-03-01 北京达佳互联信息技术有限公司 A kind of method, apparatus, electronic equipment and storage medium showing unread message quantity

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1282486A (en) * 1997-12-17 2001-01-31 夸尔柯姆股份有限公司 Apparatus and method for receiving voicemail messages in wireless communication system
CN101184296A (en) * 2006-11-13 2008-05-21 三洋电机株式会社 Information communication terminal, method of marking mail as read, and program for marking mail as read
CN103310004A (en) * 2013-06-28 2013-09-18 北京小米科技有限责任公司 Method, device and equipment for displaying number of unread messages
CN103547342A (en) * 2013-05-14 2014-01-29 华为技术有限公司 Information sending method, information reading and notifying method, information receiving method and device
CN103688560A (en) * 2013-10-15 2014-03-26 华为技术有限公司 Method and device for processing management information of radio access network information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070129112A1 (en) * 2005-12-01 2007-06-07 Liang-Chern Tarn Methods of Implementing an Operation Interface for Instant Messages on a Portable Communication Device
US20080086458A1 (en) * 2006-09-15 2008-04-10 Icebreaker, Inc. Social interaction tagging

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1282486A (en) * 1997-12-17 2001-01-31 夸尔柯姆股份有限公司 Apparatus and method for receiving voicemail messages in wireless communication system
CN101184296A (en) * 2006-11-13 2008-05-21 三洋电机株式会社 Information communication terminal, method of marking mail as read, and program for marking mail as read
CN103547342A (en) * 2013-05-14 2014-01-29 华为技术有限公司 Information sending method, information reading and notifying method, information receiving method and device
CN103310004A (en) * 2013-06-28 2013-09-18 北京小米科技有限责任公司 Method, device and equipment for displaying number of unread messages
CN103688560A (en) * 2013-10-15 2014-03-26 华为技术有限公司 Method and device for processing management information of radio access network information

Also Published As

Publication number Publication date
CN105245432A (en) 2016-01-13

Similar Documents

Publication Publication Date Title
CN105245432B (en) Unread message counting method and device and terminal
CN104518953B (en) Method for deleting message, instant communication terminal and system
WO2016169465A1 (en) Method, apparatus and system for displaying screen information
EP2988199A1 (en) Clicking control method and terminal
CN106506321B (en) Group message processing method and terminal device
CN104852885B (en) Method, device and system for verifying verification code
CN104618222B (en) A kind of method and device for matching facial expression image
US10657347B2 (en) Method for capturing fingerprint and associated products
WO2014086218A1 (en) Interface adjustment method, device and terminal
CN106203459B (en) Picture processing method and device
CN105302452B (en) Operation method and device based on gesture interaction
CN104778055B (en) Method and device for displaying progress bar
US20180018798A1 (en) Method and Apparatus for Displaying Historical Chat Record
CN105094501B (en) Method, device and system for displaying messages in mobile terminal
CN106453597B (en) The method of adjustment of data synchronizing cycles, apparatus and system
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN108492837B (en) Method, device and storage medium for detecting audio burst white noise
CN108924357A (en) A kind of method, apparatus and terminal that adjustment terminal desktop is shown
CN107622234B (en) Method and device for displaying budding face gift
CN104238931B (en) Information input method and device and electronic equipment
CN107632985B (en) Webpage preloading method and device
CN106302101B (en) Message reminding method, terminal and server
CN106341436B (en) Method and device for detecting acceleration effect
CN105631059B (en) Data processing method, data processing device and data processing system
CN105159655B (en) Behavior event playing method and device

Legal Events

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