CN108809815B - Method for updating unread number of session, session processing method, device and system - Google Patents

Method for updating unread number of session, session processing method, device and system Download PDF

Info

Publication number
CN108809815B
CN108809815B CN201810715477.6A CN201810715477A CN108809815B CN 108809815 B CN108809815 B CN 108809815B CN 201810715477 A CN201810715477 A CN 201810715477A CN 108809815 B CN108809815 B CN 108809815B
Authority
CN
China
Prior art keywords
information
session
server
unread
update
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
CN201810715477.6A
Other languages
Chinese (zh)
Other versions
CN108809815A (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN201810715477.6A priority Critical patent/CN108809815B/en
Publication of CN108809815A publication Critical patent/CN108809815A/en
Application granted granted Critical
Publication of CN108809815B publication Critical patent/CN108809815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/224Monitoring or handling of messages providing notification on incoming messages, e.g. pushed notifications of received messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

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

Abstract

The invention provides a method for updating the unread number of a session, a method for processing the session, a device and a system, wherein the method comprises the following steps: responding to a login request of a session application, and sending the maximum updating time of local session information to a server; receiving an update record of the session information after the maximum update time returned by the server; and updating the local session information according to the updated record, and determining and displaying the unread number of each session according to the updated record. By the scheme, the technical problem that the unread number of each terminal can be synchronized only by storing the unread number of each conversation at the server side in the prior art is solved, and the technical effects of reducing the pressure of the server and simply and efficiently ensuring the synchronization of the unread number of different terminal session information are achieved.

Description

Method for updating unread number of session, session processing method, device and system
Technical Field
The invention relates to the technical field of internet, in particular to a method for updating unread number of sessions, a session processing method, a device and a system.
Background
At present, with the continuous development of internet technology, more and more people begin to use intelligent devices such as mobile phones and computers, and the number of the intelligent devices such as mobile phones and computers is large. For example, a user may have a cell phone, a tablet, an office computer, etc. at the same time. These device users can log in the chat software, for example, the device users can log in the chat software on a mobile phone, and can log in the chat software again on a computer.
For chat software, generally, when a user switches among a plurality of devices, if the existing method needs to realize consistency of unread numbers of a plurality of terminal sessions, the unread number of each session needs to be stored in a server, and the server is notified of 0 after entering each session. The server needs to update all session information every time, so that the implementation is complicated, and the operation pressure of the server is high.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method for updating the number of unread conversation strips, a method for processing the conversation, a device and a system, which aim to simply and efficiently realize the synchronization of the number of unread conversation strips in a plurality of terminals.
The embodiment of the invention provides a method for updating the number of unread conversation strips, which comprises the following steps:
responding to a login request of a session application, and sending the maximum updating time of local session information to a server;
receiving an update record of the session information after the maximum update time returned by the server, wherein the update record comprises: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
and updating the local session information according to the updated record, and determining and displaying the unread number of each session according to the updated record.
In one embodiment, determining and displaying the number of unread bars for each session according to the updated record includes:
comparing the information number of each piece of session information after the maximum updating time with the information number of the last read information of the corresponding session window;
if the number of the information which is larger than the information number of the last read information of the corresponding conversation window, the number of the unread pieces of the conversation window is increased by one.
In one embodiment, receiving an updated record of session information after a maximum update time returned by a server includes:
and receiving an update record of the session information returned by the server after the maximum update time corresponding to the login user, wherein the session information in the server is stored and retrieved based on the user ID.
In one embodiment, after determining and displaying the number of unread bars for each session according to the updated record, the method further comprises:
detecting whether a user checks a session window with unread information;
and under the condition that the user is detected to check the conversation window with the unread information, uploading the information number and the read time point of the latest information of the checked conversation window to the server.
In one embodiment, after determining and displaying the number of unread bars for each session according to the updated record, the method further comprises:
receiving the information number of the new information transmitted by the server;
and updating the unread number of the conversation window of the new information according to the new information.
The embodiment of the invention also provides a session processing method, which comprises the following steps:
receiving a login request of a client responding to a session application, and sending the maximum update time of the sent local session information to a server;
determining an update record of the session information after the maximum update time of the server side according to the maximum update time, wherein the update record comprises: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
and sending the update record to the client, wherein the update record is used for determining and displaying the unread number of each session by the client.
In one embodiment, the above method further comprises:
and receiving and storing the information number and the read time point of the information which is read at last in each session window uploaded by the client.
In one embodiment, the above method further comprises:
receiving session information sent by a client;
and numbering the received session information according to time and sequence to obtain an information number.
The embodiment of the present invention further provides a device for updating the number of unread sessions, including:
the sending module is used for responding to a login request of the session application and sending the maximum updating time of the local session information to the server;
a first receiving module, configured to receive an update record of session information after a maximum update time returned by a server, where the update record includes: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
and the updating display module is used for updating the local session information according to the updating record and determining and displaying the unread number of each session according to the updating record.
In one embodiment, updating the display module comprises:
the comparison unit is used for comparing the information number of each piece of session information after the maximum updating time with the information number of the last read information of the corresponding session window;
and the counting unit is used for increasing the number of unread pieces of the session window by one if the number of the unread pieces of the information which is read last is larger than that of the corresponding session window.
In one embodiment, the first receiving module is specifically configured to receive an update record of session information returned by the server after a maximum update time corresponding to a logged-in user, where the session information in the server is stored and retrieved based on a user ID.
In one embodiment, the above apparatus further comprises:
the detection module is used for detecting whether a user performs viewing operation on a conversation window with unread information after the unread number of each conversation is determined and displayed according to the updated record;
and the uploading module is used for uploading the information number and the read time point of the latest information of the viewed session window to the server under the condition that the viewing operation of the user on the session window with the unread information is detected.
In one embodiment, the above apparatus further comprises:
the second receiving module is used for receiving the information number of the new information transmitted by the server after the unread number of each session is determined and displayed according to the updated record;
and the updating module is used for updating the unread number of the session window of the new information according to the new information.
An embodiment of the present invention further provides a session processing apparatus, including:
the receiving module is used for receiving a login request of a client responding to the session application and sending the maximum updating time of the sent local session information to the server;
a determining module, configured to determine, according to the maximum update time, an update record of the session information after the maximum update time of the server side, where the update record includes: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
and the sending module is used for sending the update record to the client, wherein the update record is used for the client to determine and display the unread number of each session.
An embodiment of the present invention further provides a session processing system, including: server, a plurality of clients, wherein:
the server is used for executing the steps of the method;
the client is used for executing the steps of the method.
Multiple clients may log on to the same session application.
The embodiment of the invention also provides client equipment which comprises a processor and a memory for storing the executable instructions of the processor, wherein the steps of the method are realized when the processor executes the instructions.
The embodiment of the invention also provides a server, which comprises a processor and a memory for storing the executable instructions of the processor, wherein the steps of the method are realized when the processor executes the instructions.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon computer instructions, which when executed, implement the steps of the above-described method.
In the embodiment of the invention, after a user requests to log in a session application, the information number and the receiving time point of each piece of session information after the maximum updating time of the local session information of a client, the information number and the read time point of the information read last in each session window are requested to a server, and then the unread number of each session is calculated based on the information number and the receiving time point of each piece of session information, the information number and the read time point of the information read last in each session window. By the method, the technical problem that the unread number of each terminal can be synchronized only by storing the unread number of each conversation at the server side in the prior art is solved, and the technical effects of reducing the pressure of the server and simply and efficiently ensuring the synchronization of the unread number of different terminal session information are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
FIG. 1 is a system architecture diagram of a session update system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of a session unread number update method, according to an embodiment of the present invention;
FIG. 3 is a method flow diagram of a session handling method according to an embodiment of the invention;
fig. 4 is an architecture diagram of a terminal device according to an embodiment of the present invention;
fig. 5 is a block diagram of a structure of a session unread number update apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of a structure of a session processing apparatus 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, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In view of the existing problem in synchronization of the number of unread pieces of session information of different terminals, in this example, it is considered that if a user reads the unread information at a client side, a background server can be triggered to change or record corresponding identification fields (for example, identification fields such as UDI, image, sequence, time, etc.), and then when the user views the unread information at other clients of different operating systems, the synchronization with the number of unread pieces of session information of the original client can be realized according to the currently corresponding identification fields of the background.
Based on this, in this example, a session update system is provided, which may be as shown in fig. 1, and includes: the system comprises a session server 101, a first terminal 102, a second terminal 103 and a plurality of session opposite terminal devices 104. The first terminal 102, the second terminal 103, and the multiple session peer devices 104 all access to the session server 101 for performing a session.
The first terminal 102 and the second terminal 103 are different clients owned by the same user and logging in a session. For example, the first terminal 102 is a user's mobile phone and the second terminal 103 is a user's computer. Both the first terminal and the second terminal user may log on to enable viewing and initiation of the session, and so on.
In this example, a method for updating the number of unread session pieces is provided, and on the client side, as shown in fig. 2, the method may include the following steps:
step 201: responding to a login request of a session application, and sending the maximum updating time of local session information to a server;
for example, user a clicks on a session application (e.g., WeChat, qq, etc.) on the handset terminal, and then after authentication, may enter the launched application. The operation of starting the application can be used as a login request, and after the terminal receives the login request, the maximum update time of the session information of the local application can be sent to the server, for example, the last update time of the application is 2016, 6, 10, 13:00, and the current time is 2016, 6, 15, 14: 00. The terminal may send 2016 month 6 and 10 day 13:00 to the server side so that the server side knows at which point in time the information on the current terminal is updated by the application.
Step 202: receiving an update record of the session information after the maximum update time returned by the server, wherein the update record comprises: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
after the maximum update time sent by the terminal side is obtained, the server side can send the update record of the application after the maximum update time to the terminal side. The update record is uploaded each time the terminal receives and views the information. For example, it may include: the information number and the receiving time point of each piece of session information, the information number and the read time point of the last read information of each session window. Specifically, for each piece of information, the server side sequentially numbers each piece of session information according to a time sequence, for example, a chat session between the user a and the user B, one piece of information is numbered 1-1, the next piece of information is numbered 1-2, the next piece of information is numbered 1-3, and so on, that is, the session information is sequentially numbered, so that effective distinction of information generation time can be realized.
Step 203: and updating the local session information according to the updated record, and determining and displaying the unread number of each session according to the updated record.
Specifically, the user terminal may compare the information number of each piece of session information after the maximum update time with the information number of the last read information of the corresponding session window; if the number of the information which is larger than the information number of the last read information of the corresponding conversation window, the number of the unread pieces of the conversation window is increased by one.
For a user terminal, detecting whether a user performs viewing operation on a session window with unread information at any moment, and uploading an information number and a read time point of the latest information of the viewed session window to a server under the condition that the user performs viewing operation on the session window with unread information is detected. This allows the application to be viewed on each terminal, and the viewed inodes can be recorded on the server side. Therefore, when other terminals log in, how many pieces of unread information are in the session window can be determined based on the last viewed information number of each session window recorded by the server side, so that the application can realize the synchronization of the number of the unread information when logging in each terminal.
For example, the user a currently logs in the application on a mobile phone, the last time when the information on the mobile phone is updated is 2016, 6 and 10 days, 13:00, and then the user logs in the application on a computer and checks some information of the session window, and the last checking time is 2016, 6 and 18 days, 10: 00. Currently, the user a logs in the application again on the mobile phone in 2016, and transmits the time point of "2016, 6, 10, 13, 00" to the server, and the server obtains the updated record of the session information after the updated record of the session information, wherein the updated record includes the information numbers and the generation time of all the information in 2016, 6, 10, 00, and the last time of each session window viewed in 2016, 6, 10, 13, 00, so that the number of unread information in each session window can be determined based on the last time and the information number of each session window viewed, and the information number and the generation time of each information.
In order to make the server side more convenient to acquire the information, the information can be classified and stored through the user ID, for example, the information in the account of the user a is stored together, and the information in the account of the user B is stored together, so as to improve the effect of searching the information. Specifically, receiving the update record of the session information after the maximum update time returned by the server may include: and receiving an update record of the session information returned by the server after the maximum update time corresponding to the login user, wherein the session information in the server is stored and retrieved based on the user ID.
Because the information of the session window is updated at any time, after the unread number of each session is determined and displayed according to the update record, the information number of the new information transmitted by the server needs to be received at any time, and the unread number of the session window of the new information is updated according to the new information.
For the server side, as shown in fig. 3, a session processing method is provided, which may include the following steps:
step 301: receiving a login request of a client responding to a session application, and sending the maximum update time of the sent local session information to a server;
step 302: determining an update record of the session information after the maximum update time of the server side according to the maximum update time, wherein the update record comprises: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
step 303: and sending the update record to the client, wherein the update record is used for determining and displaying the unread number of each session by the client.
For the server, it is also necessary to receive and store the information number and the read time point of the last read information of each session window uploaded by the client.
For the server, the received session information may also be numbered according to time and sequence to obtain the information number.
The following description is provided with reference to a specific example, however, it should be noted that the specific example is only for better illustrating the present application and should not be construed as limiting the present application.
In this example, after receiving and reading the message on the client a, the user submits the progress through the upload session progress protocol. When the client B is switched to, after the client B logs in, the progress can be read firstly according to the synchronous session progress protocol, and then the message is pulled to calculate the unread number according to the protocol, so that the unread number can be kept consistent when the session application is switched back and forth among a plurality of devices.
Specifically, the method can comprise the following two parts: uploading session progress and synchronizing session progress:
1) the upload session progress is as follows:
a. on the client, each time the user enters a session with unread numbers or receives a message in the session, the client sends seqno of the last message in the session to the server for updating the session progress.
b. And after receiving the request for uploading the session progress, the server writes seqno and the current time into the database.
c. The upload session flow ends.
2) The synchronous session progress is as follows:
a. each piece of information received by the user through the session application has a unique and incremental number: seqno, which is generated by the server side, and is incremented independently for each person.
b. After a client logs in, accessing a server according to the maximum updating time ts in the session progress stored locally by the client, wherein if no session progress exists locally, ts is 0;
c. the server reads session updating progress records larger than ts in all session windows of the user uid according to ts uploaded by the client and returns the session updating progress records to the client;
d. the client saves or updates the progress record according to the record returned by the server, and then calls the server to obtain the latest message.
The seqno and the ts are stored on the server side, and the session content is acquired through a synchronous message protocol after the progress record is updated; after the login is successful, the server informs the user of the largest seqno at the server side, the client side calls a synchronization protocol according to the comparison between the seqno and the locally stored seqno, and if the seqno is smaller than the seqno returned by the server; and if the client has a new message online, the server actively informs the client of the latest seqno, and the client initiates synchronous calling according to the same logic.
e. And the client compares the seqno of each piece of received new information with the seqno of the corresponding session stored locally according to the returned information, if the seqno of the new information is large, the client counts the number of unread messages, and if the seqno of the new information is small, the client counts the number of unread messages.
The method embodiments provided in the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the example of running on a computer terminal, fig. 4 is a block diagram of a hardware structure of the computer terminal of the session unread number updating method according to the embodiment of the present invention. As shown in fig. 4, the computer terminal 10 may include one or more (only one shown) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The memory 104 may be configured to store software programs and modules of application software, such as program instructions/modules corresponding to the method for updating the number of unread sessions in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104, that is, implements the method for updating the number of unread sessions of an application program. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the software layer, the device for updating the number of unread sessions as shown in fig. 5 may include: a sending module 501, a first receiving module 502, and an update display module 503, wherein:
a sending module 501, configured to respond to a login request of a session application and send the maximum update time of local session information to a server;
a first receiving module 502, configured to receive an update record of the session information after the maximum update time returned by the server, where the update record includes: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
and an update display module 503, configured to update the local session information according to the update record, and determine and display the number of unread sessions according to the update record.
In one embodiment, updating the display module 503 may include: the comparison unit is used for comparing the information number of each piece of session information after the maximum updating time with the information number of the last read information of the corresponding session window; and the counting unit is used for increasing the number of unread pieces of the session window by one if the number of the unread pieces of the information which is read last is larger than that of the corresponding session window.
In an embodiment, the first receiving module 502 may be specifically configured to receive an update record of session information returned by a server after a maximum update time corresponding to a logged-in user, where the session information in the server is stored and retrieved based on a user ID.
In an embodiment, the device for updating the number of unread session pieces may further include: the detection module is used for detecting whether a user performs viewing operation on a conversation window with unread information after the unread number of each conversation is determined and displayed according to the updated record; and the uploading module is used for uploading the information number and the read time point of the latest information of the viewed session window to the server under the condition that the viewing operation of the user on the session window with the unread information is detected.
In an embodiment, the device for updating the number of unread session pieces may further include: the second receiving module is used for receiving the information number of the new information transmitted by the server after the unread number of each session is determined and displayed according to the updated record; and the updating module is used for updating the unread number of the session window of the new information according to the new information.
An embodiment of the present invention further provides a session processing apparatus, which is located in a server, and as shown in fig. 6, the session processing apparatus may include: a receiving module 601, a determining module 602, and a sending module 603, wherein:
a receiving module 601, configured to receive a login request of a client responding to a session application, where the maximum update time of the sent local session information is sent to a server;
a determining module 602, configured to determine, according to the maximum update time, an update record of the session information after the maximum update time of the server side, where the update record includes: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
the sending module 603 is configured to send an update record to the client, where the update record is used for the client to determine and display the number of unread pieces of each session.
The client can be a terminal device or software used by a client operation. Specifically, the client may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, or other wearable devices. Of course, the client may also be software that can run in the terminal device. For example: qq, WeChat, or browser.
Although the present application provides method steps as in an embodiment or a flowchart, more or fewer steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
The apparatuses or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. The functionality of the modules may be implemented in the same one or more software and/or hardware implementations of the present application. Of course, a module that implements a certain function may be implemented by a plurality of sub-modules or sub-units in combination.
The methods, apparatus or modules herein may be implemented in computer readable program code means for a controller implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, Application Specific Integrated Circuits (ASICs), programmable logic controllers and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
Some of the modules in the apparatus of the present application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary hardware. Based on such understanding, the technical solutions of the present application may be embodied in the form of software products or in the implementation process of data migration, which essentially or partially contributes to the prior art. The computer software product may be stored in a storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to perform the methods of the various embodiments or portions of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. All or portions of the present application are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (16)

1. A method for updating the number of unread sessions, comprising:
responding to a login request of a session application, and sending the maximum updating time of local session information to a server;
receiving an update record of the session information after the maximum update time returned by the server, wherein the update record comprises: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
updating the local session information according to the update record, and determining and displaying the unread number of each session according to the update record;
the determining and displaying the number of unread pieces of each session according to the updated record comprises:
comparing the information number of each piece of session information after the maximum updating time with the information number of the last read information of the corresponding session window;
if the number of the information which is larger than the information number of the last read information of the corresponding conversation window, the number of the unread pieces of the conversation window is increased by one.
2. The method of claim 1, wherein receiving an updated record of session information after a maximum update time returned by the server comprises:
and receiving an update record of the session information returned by the server after the maximum update time corresponding to the login user, wherein the session information in the server is stored and retrieved based on the user ID.
3. The method of claim 1, wherein after determining and displaying the number of unread bars for each session based on the updated record, the method further comprises:
detecting whether a user checks a session window with unread information;
and under the condition that the user is detected to check the conversation window with the unread information, uploading the information number and the read time point of the latest information of the checked conversation window to the server.
4. The method of claim 1, wherein after determining and displaying the number of unread bars for each session based on the updated record, the method further comprises:
receiving the information number of the new information transmitted by the server;
and updating the unread number of the conversation window of the new information according to the new information.
5. A session processing method, comprising:
receiving a login request of a client responding to a session application, and sending the maximum update time of the sent local session information to a server;
determining an update record of the session information after the maximum update time of the server side according to the maximum update time, wherein the update record comprises: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
sending the update record to the client, wherein the update record is used for the client to determine and display the unread number of each session;
and receiving and storing the information number and the read time point of the information which is read at last in each session window uploaded by the client.
6. The method of claim 5, further comprising:
receiving session information sent by a client;
and numbering the received session information according to time and sequence to obtain an information number.
7. A session unread number update apparatus, comprising:
the sending module is used for responding to a login request of the session application and sending the maximum updating time of the local session information to the server;
a first receiving module, configured to receive an update record of session information after a maximum update time returned by a server, where the update record includes: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
the updating display module is used for updating the local session information according to the updating record and determining and displaying the unread number of each session according to the updating record;
wherein, update the display module and include:
the comparison unit is used for comparing the information number of each piece of session information after the maximum updating time with the information number of the last read information of the corresponding session window;
and the counting unit is used for increasing the number of unread pieces of the session window by one if the number of the unread pieces of the information which is read last is larger than that of the corresponding session window.
8. The apparatus of claim 7, wherein the first receiving module is specifically configured to receive an update record of the session information returned by the server after a maximum update time corresponding to the logged-in user, wherein the session information in the server is stored and retrieved based on the user ID.
9. The apparatus of claim 7, further comprising:
the detection module is used for detecting whether a user performs viewing operation on a conversation window with unread information after the unread number of each conversation is determined and displayed according to the updated record;
and the uploading module is used for uploading the information number and the read time point of the latest information of the viewed session window to the server under the condition that the viewing operation of the user on the session window with the unread information is detected.
10. The apparatus of claim 7, further comprising:
the second receiving module is used for receiving the information number of the new information transmitted by the server after the unread number of each session is determined and displayed according to the updated record;
and the updating module is used for updating the unread number of the session window of the new information according to the new information.
11. A session processing apparatus, comprising:
the first receiving module is used for receiving a login request of a client responding to the session application, and sending the maximum updating time of the sent local session information to the server;
a determining module, configured to determine, according to the maximum update time, an update record of the session information after the maximum update time of the server side, where the update record includes: the information number and the receiving time point of each piece of session information, and the information number and the read time point of the information which is read at last in each session window, wherein the information numbers are obtained according to the time sequence numbers of the session information received by the server;
the sending module is used for sending the update record to the client, wherein the update record is used for the client to determine and display the unread number of each session;
and the second receiving module is used for receiving and storing the information number and the read time point of the information which is read at last in each session window uploaded by the client.
12. A session processing system, comprising: server, a plurality of clients, wherein:
the server is adapted to perform the steps of the method of any of claims 5 to 6;
the client is used for executing the steps of the method of any one of claims 1 to 4;
multiple clients may log on to the same session application.
13. A client device comprising a processor and a memory for storing processor-executable instructions that, when executed by the processor, implement the method of any one of claims 1 to 4.
14. A server comprising a processor and a memory for storing processor-executable instructions that when executed by the processor implement the method of any one of claims 5 to 6.
15. A computer-readable storage medium, on which a computer program is stored which is executed by a processor to carry out the steps of the method of any one of claims 1 to 4.
16. A computer-readable storage medium, on which a computer program is stored which is executed by a processor to carry out the steps of the method of any one of claims 5 to 6.
CN201810715477.6A 2018-06-29 2018-06-29 Method for updating unread number of session, session processing method, device and system Active CN108809815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810715477.6A CN108809815B (en) 2018-06-29 2018-06-29 Method for updating unread number of session, session processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810715477.6A CN108809815B (en) 2018-06-29 2018-06-29 Method for updating unread number of session, session processing method, device and system

Publications (2)

Publication Number Publication Date
CN108809815A CN108809815A (en) 2018-11-13
CN108809815B true CN108809815B (en) 2021-06-22

Family

ID=64074160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810715477.6A Active CN108809815B (en) 2018-06-29 2018-06-29 Method for updating unread number of session, session processing method, device and system

Country Status (1)

Country Link
CN (1) CN108809815B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138652B (en) * 2019-05-21 2022-03-25 北京达佳互联信息技术有限公司 Session updating method and device and client device
CN113472630A (en) * 2021-05-20 2021-10-01 合肥市智享亿云信息科技有限公司 Method for synchronizing unread messages
CN114461116A (en) * 2022-01-07 2022-05-10 北京快乐茄信息技术有限公司 Unread message processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051516A (en) * 2011-10-17 2013-04-17 腾讯科技(深圳)有限公司 Message prompting method and device of instant messaging client
CN105245432A (en) * 2014-06-26 2016-01-13 腾讯科技(北京)有限公司 Unread message counting method, unread message counting device and terminal
CN106341310A (en) * 2016-09-28 2017-01-18 江西博瑞彤芸科技有限公司 Session message display method
CN107465802A (en) * 2016-06-03 2017-12-12 北京融聚世界网络科技有限公司 A kind of methods, devices and systems for showing communication message

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7185026B2 (en) * 2004-04-15 2007-02-27 International Business Machines Corporation Method for synchronizing read/unread data during LOTUS NOTES database migration
CN101232467A (en) * 2008-02-22 2008-07-30 中兴通讯股份有限公司 Method for obtaining information using time jab in real time communicating business
CN103370683A (en) * 2011-02-15 2013-10-23 Nec卡西欧移动通信株式会社 Portable terminal device and screen display method thereof
CN103326929B (en) * 2013-06-24 2017-02-08 小米科技有限责任公司 Method and device for transmitting messages
CN110086704B (en) * 2014-02-11 2022-03-22 阿里巴巴集团控股有限公司 Method and system for synchronizing unread messages in instant messaging
CN106020784B (en) * 2015-03-18 2020-09-08 小米科技有限责任公司 Application message display method and device and terminal
US20170346938A1 (en) * 2016-05-31 2017-11-30 International Business Machines Corporation Sent Text Correction Feature
CN106209608B (en) * 2016-09-14 2020-01-14 Oppo广东移动通信有限公司 Method and device for distinguishing and synchronizing chat information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051516A (en) * 2011-10-17 2013-04-17 腾讯科技(深圳)有限公司 Message prompting method and device of instant messaging client
CN105245432A (en) * 2014-06-26 2016-01-13 腾讯科技(北京)有限公司 Unread message counting method, unread message counting device and terminal
CN107465802A (en) * 2016-06-03 2017-12-12 北京融聚世界网络科技有限公司 A kind of methods, devices and systems for showing communication message
CN106341310A (en) * 2016-09-28 2017-01-18 江西博瑞彤芸科技有限公司 Session message display method

Also Published As

Publication number Publication date
CN108809815A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
US10715613B2 (en) Presence indicators
EP3334127B1 (en) Message pushing method and apparatus thereof
CN105721462B (en) Information pushing method and device
CN104253741B (en) A kind of method for sending information, relevant apparatus and system
CN108809815B (en) Method for updating unread number of session, session processing method, device and system
EP2770788A1 (en) Notification push method, device, and system
CN105187266B (en) information monitoring method and device
CN110233742B (en) Group establishing method, system, terminal and server
US10599402B2 (en) Techniques to configure a web-based application for bot configuration
CN111818350B (en) Method, system, device, electronic equipment and storage medium for displaying information
CN112312222A (en) Video sending method and device and electronic equipment
CN105447015A (en) Mobile terminal based job information pushing method, apparatus and system
JP6517911B2 (en) System and method for determining appropriate content for an event content stream
CN103167014A (en) Method and device of sharing resources with browsers
CN110505072B (en) Method, terminal device and computer readable medium for backing up chat records
CN109218041B (en) Request processing method and device for server system
CN115202599A (en) Screen projection display method and related device
EP3506599A1 (en) Method for synchronizing contact information, apparatus, medium, electronic device and system
CN111447191A (en) Information interaction method and device and electronic equipment
US20150163325A1 (en) Method, device and system for information transmission
CN108418890B (en) Face special effect resource generation method, device and system and readable storage medium
CN112910741B (en) Interface testing method and device, computer equipment and storage medium
CN104639973B (en) Information pushing method and device
CN113050904A (en) Screen sharing method and device
KR102005338B1 (en) Location based social networking system and 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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Duan Lijun

Inventor after: Tian Zuojian

Inventor before: Duan Lijun

Inventor before: Tian Zuojian

REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40000239

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant