CN112333080A - Instant communication off-line message pushing method - Google Patents

Instant communication off-line message pushing method Download PDF

Info

Publication number
CN112333080A
CN112333080A CN202011160233.XA CN202011160233A CN112333080A CN 112333080 A CN112333080 A CN 112333080A CN 202011160233 A CN202011160233 A CN 202011160233A CN 112333080 A CN112333080 A CN 112333080A
Authority
CN
China
Prior art keywords
messages
message
offline
chat session
client
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.)
Pending
Application number
CN202011160233.XA
Other languages
Chinese (zh)
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.)
Hefei Zhixiang Yiyun Information Technology Co ltd
Original Assignee
Hefei Zhixiang Yiyun Information 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 Hefei Zhixiang Yiyun Information Technology Co ltd filed Critical Hefei Zhixiang Yiyun Information Technology Co ltd
Priority to CN202011160233.XA priority Critical patent/CN112333080A/en
Publication of CN112333080A publication Critical patent/CN112333080A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

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

Abstract

The invention relates to an instant communication offline message pushing method, which comprises the following steps: the client is opened, and the time of the last message received by the client, namely the synchronization point of the message, is sent to the server; after receiving the synchronization point, the server queries all messages after the user synchronization point from a synchronization library (i.e. a database for storing messages), and the messages received and sent by the user are stored in the synchronization library; classifying the inquired messages according to the chat session; counting the number of unread messages of each chat session, removing the chat sessions of the offline messages with the number exceeding the set number, and only keeping the offline messages with the last set number; packaging, simplifying and arranging the offline messages into a message and returning the message to the client, wherein each chat session comprises the unread number, the Id of a chat session object and the last message of the chat session object; and the client analyzes the received offline message.

Description

Instant communication off-line message pushing method
Technical Field
The invention relates to the technical field of information processing, in particular to an instant messaging offline message pushing method.
Background
The current mainstream method for pushing the offline messages is to push all messages, and when the message volume is large, if all the offline messages are loaded, the messages of the client are bombed, and the client is stuck. In addition, the existing (traditional) offline message pushing is one-by-one pushing and is based on a time model, which may cause the jitter of a message list page of a client, and in addition, a message synchronization library based on the time model requires the client to send message synchronization points, which are lost when the application is uninstalled and reinstalled, so that the offline message cannot be successfully pushed to the client, even is lost.
Disclosure of Invention
The invention aims to provide an instant messaging offline message pushing method, aiming at all the defects in the prior art, the scheme of pushing the offline message at one time is adopted, so that a client can directly display the final interface without repeated refreshing of the interface as long as one offline message is analyzed. Specifically, for the problem of too large offline messages, a maximum number of messages are pushed per dialog box (the number can be configured by the system, and is assumed to be N), and by adding the number of unread messages per dialog box, the user can request earlier data from the server if the user needs to inquire earlier information.
In order to solve the technical problems, the invention is realized by the following technical scheme: the invention provides an instant communication offline message pushing method, which comprises the following steps:
(1) the client is opened, and the time of the last message received by the client, namely the synchronization point of the message, is sent to the server;
(2) after receiving the synchronization point, the server queries all messages after the user synchronization point from a synchronization library (i.e. a database for storing messages), and the messages received and sent by the user are stored in the synchronization library;
(3) classifying the inquired messages according to the chat session;
(4) counting the number of unread messages of each chat session, removing the chat sessions of the offline messages with the number exceeding the set number, and only keeping the offline messages with the last set number; counting the quantity of unread messages of each chat session, and only keeping the set N offline messages;
(5) packaging, simplifying and arranging the offline messages into a message and returning the message to the client, wherein each chat session comprises the unread number, the Id of a chat session object and the last message of the chat session object;
(6) and after receiving the offline message, the client analyzes, each chat session only analyzes the last set number, the unread number is given, the number of unread objects of each chat session is directly displayed, and the last offline message is displayed when the user clicks a chat session frame.
Preferably, the set number is 20 (this number can be configured by the system).
Further, the client is a PC device, an android device, or an ios device.
Still further, the database of the synchronization library is an elastic search database, that is, a database for storing messages.
Still further, the offline message refers to all messages that are not received after the client goes offline (including messages that are not read or have been read at other end).
Still further, the method for processing the offline message comprises the following steps:
1) using the pool query of the elastic search, and filtering and searching all messages after the synchronization point according to the range time point; query ": {" bone ": {" mut ": {" match \ ": {" sourceUid ":, + uid +" }, "+" "filter": { "range \": { "long time \": "+ time +" } is used to determine the sequence of the target
2) Analyzing the messages, and encapsulating each message into a chat session object chaPojo;
3) judging whether the object exists in the chat session array or not, and offfer the object to a LimittQueue queue, wherein the maximum number of the queue is N, and the last N messages (N can be set, and is preferably 20) are always reserved;
that is, further, the maximum number of the queue is 20, and the last 20 messages are always reserved;
4) if the analyzed message is unread, namely, the read is 1, then the unreaddcoun t +1 of the chat session is carried out;
5) and converting the packaged message into a data format which can be resolved by the corresponding client.
The invention has the technical effects that:
(1) the invention overcomes the defect that one offline message is pulled in the prior art, the client does not need to repeatedly refresh the user interface, and the interface which is finally required to be displayed is loaded at one time, thereby improving the performance of the client.
(2) The invention improves the method for pushing all offline messages in the prior art, provides a method for setting the number of unread messages in the last N (N can be set, preferably 20) dialog boxes, reduces the transmission quantity of messages, reduces the flow for user equipment, and allows a user to pull the offline messages at earlier time as required.
(3) The invention provides a method for unloading and reloading without losing a message list and the unread message number, which solves the problems that local data of a backup client is usually imported to new equipment and all data can be lost if equipment failure occurs in the prior art. The invention not only provides a complete message list, but also provides the unread number of the dialog boxes, thereby providing a sense of experience for users without uninstalling and reinstalling.
Drawings
FIG. 1 is a flow chart of reading offline messages with synchronization points according to the present invention;
fig. 2 is a flow chart of reading an offline message when an out-of-sync point is first installed according to the scheme of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The invention relates to an instant communication off-line message pushing method, which comprises the following specific scheme steps:
(1) the client is opened, and the time of the last message received by the client (terminal) is sent to the server, namely the synchronization point of the message;
(2) after receiving the synchronization point, the (IM) server inquires all messages behind the user synchronization point from a synchronization library (namely a database for storing messages), and the messages sent and received by the user are stored in the synchronization library;
(3) classifying the inquired messages according to chat sessions (namely chat objects);
(4) counting the number of unread messages of each chat session, and only keeping the set N offline messages;
further, N is 20, that is, the chat sessions of more than 20 offline messages are removed, and only the last 20 offline messages are retained;
(5) packaging, simplifying and arranging the offline messages into a message and returning the message to the client, wherein each chat session comprises unread number, Id of a chat (session) object and the last message of the chat (session) object;
(6) the client analyzes after receiving the offline messages, each chat session only analyzes the last N messages, the unread number is given, the number of unread messages of each chat session object is directly displayed, and the last offline message is displayed when the user clicks the chat session frame.
Further, each chat session only parses the last 20.
An algorithm scheme for sorting off-line messages:
1) using the pool query of the elastic search, and filtering according to the range time point to find all messages after the synchronization point; query ": {" bone ": {" mut ": {" match \ ": {" sourceUid ":, + uid +" }, "+" "filter": { "range \": { "long time \": "+ time +" } is used to determine the sequence of the target
2) Analyzing the messages, and encapsulating each message into a chat session object chaPojo;
3) judging whether the object exists in the chat session array or not, and offfer the object to a LimittQueue queue, wherein the maximum number of the queue is N, and the last N messages (N can be set, and is preferably 20) are always reserved;
namely, the maximum number of the queue is 20, and the last 20 messages are always reserved;
4) if the parsed message is unread, i.e., readd is 1, then unreandedcoun t +1 of the chat session;
5) convert the encapsulated message into a data format that is parsable by the corresponding client.
By adopting the above scheme, the first object of the present invention is to provide an efficient offline message synchronization method, which avoids that a client repeatedly refreshes a user interface, and avoids that the client interface is repeatedly refreshed due to one piece of offline message analysis, which causes the client to be stuck, and the user waits for the completion of the offline message analysis, which causes poor user experience.
The first purpose of the invention is realized by adopting the following specific technical scheme: when a client logs in the system, a server inquires all offline messages from a synchronous library (namely a database for storing messages) according to a synchronous point (a timestamp of the last message received by the client), assembles the offline messages, classifies the same dialog messages, only reserves set N offline messages for each dialog, inquires the total unread value of a certain chat session from the synchronous library, and pushes the offline messages at one time.
Further, the client is a Windows/MacOs/Linux device, an android device or an ios device.
The last session activity timestamp is the time of the last message sent or the last message received, which is locally stored by a certain client.
The synchronous database is an elastic search database, namely a database for storing messages.
A second object of the present invention is to reduce the message volume of offline messages. When a certain user logs in the client for a long time, the number of offline messages of the user can reach thousands, but the user does not need to read all the offline messages from back to front, only needs to display the latest message of each chat conversation box of the user, and the user is informed that a plurality of unread messages exist in a certain (chat) conversation box, and when the user needs to check, the conversation box (namely the conversation box) is pulled down, and the offline messages are continuously pulled from the server.
The offline message refers to all messages that are not received after the client goes offline (possibly including messages that are not read or have been read at other ends). A client disconnects from the instant messaging server during which messages are received, but messages that have not been received because the user did not open the application. Further, the method also comprises messages received by the user at other clients or sent messages which are not offline.
The third purpose of the invention is to provide a method for unloading the reloading pull-out completion message list and the unread message number, in the instant messaging application, the latest chat list information of each user is stored from the background, so that the client can pull the latest message list after uninstalling and reinstallating conveniently, the unread number of each session is pulled from the cloud, and the user can unload the reloading with ease, does not need to backup the chat information, and completely pulls the latest chat list and the unread message number.
The message list is that when a user initiates a chat and receives a message, a new session is created on a chat list page, the content of the session always displays the content of the last message of the session, and the number of unread messages of the session frame is displayed.
The unread number for each session is pulled from the cloud, which is a pull from the elastic search database.
The invention has the advantages that:
(1) the invention overcomes the defect that one offline message is pulled in the prior art, the client does not need to repeatedly refresh the user interface, and the interface which is finally required to be displayed is loaded at one time, thereby improving the performance of the client.
(2) The invention improves the method for pushing all offline messages in the prior art, provides a method for setting the number of unread messages in the last N (N can be set, preferably 20) dialog boxes, reduces the transmission quantity of messages, reduces the flow for user equipment, and allows a user to pull the offline messages at earlier time as required.
(3) The invention provides a method for unloading and reloading without losing a message list and the unread message number, which solves the problems that local data of a backup client is usually imported to new equipment and all data can be lost if equipment failure occurs in the prior art. The invention not only provides a complete message list, but also provides the unread number of the dialog boxes, thereby providing a sense of experience for users without uninstalling and reinstalling.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, but only the principle of the invention is described in the above examples and specification, and that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (6)

1. An instant messaging offline message pushing method is characterized by comprising the following steps:
(1) the client is opened, and the time of the last message received by the client, namely the synchronization point of the message, is sent to the server;
(2) after receiving the synchronization point, the server inquires all messages behind the user synchronization point from the synchronization library, and the messages received and sent by the user are stored in the synchronization library;
(3) classifying the inquired messages according to the chat session;
(4) counting the number of unread messages of each chat session, removing the chat sessions of the offline messages with the number exceeding the set number, and only keeping the offline messages with the last set number;
(5) packaging, simplifying and arranging the offline messages into a message and returning the message to the client, wherein each chat session comprises the unread number, the Id of a chat session object and the last message of the chat session object;
(6) and after receiving the offline message, the client analyzes, each chat session only analyzes the last set number, the unread number is given, the number of unread objects of each chat session is directly displayed, and the last offline message is displayed when the user clicks a chat session frame.
2. The method of claim 1, wherein the method comprises: the set number is 20.
3. The method of claim 2, wherein the method comprises: the client is a PC device, an android device or an ios device.
4. The method of claim 2, wherein the method comprises: the database of the synchronous database is an elastic search database.
5. The method of claim 2, wherein the method comprises: the offline message refers to all messages which are not received after the client is offline.
6. The method as claimed in claim 4, wherein the method comprises: the algorithm for sorting off-line messages is as follows:
1) using the pool query of the elastic search, and filtering and searching all messages after the synchronization point according to the range time point; query ": {" bone ": {" mut ": {" match \ ": {" sourceUid ":, + uid +" }, "+" "filter": { "range \": { "long time \": "+ time +" } is used to determine the sequence of the target
2) Analyzing the messages, and encapsulating each message into a chat session object chaPojo;
3) judging whether the chat session array has the object or not, and offfer the object to a LimitQueue queue, wherein the maximum number of the queue is 20, and the last 20 messages are always reserved;
4) if the analyzed message is unread, namely, the read is 1, then the unreaddCount +1 of the chat session is added;
5) and converting the packaged message into a data format which can be resolved by the corresponding client.
CN202011160233.XA 2020-10-27 2020-10-27 Instant communication off-line message pushing method Pending CN112333080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011160233.XA CN112333080A (en) 2020-10-27 2020-10-27 Instant communication off-line message pushing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011160233.XA CN112333080A (en) 2020-10-27 2020-10-27 Instant communication off-line message pushing method

Publications (1)

Publication Number Publication Date
CN112333080A true CN112333080A (en) 2021-02-05

Family

ID=74312247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011160233.XA Pending CN112333080A (en) 2020-10-27 2020-10-27 Instant communication off-line message pushing method

Country Status (1)

Country Link
CN (1) CN112333080A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002137A (en) * 2022-08-03 2022-09-02 广州此声网络科技有限公司 Offline message processing method and device, computer equipment and storage medium
CN115412520A (en) * 2022-09-04 2022-11-29 成都优啊网络科技有限公司 Method for storing, reading and writing interaction of Instant Messaging (IM) chat data
CN117061470A (en) * 2023-08-09 2023-11-14 中移互联网有限公司 Message pulling method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337844A (en) * 2015-09-28 2016-02-17 北京金山安全软件有限公司 Method and device for displaying message and electronic equipment
CN109067910A (en) * 2018-09-13 2018-12-21 乐蜜有限公司 A kind of method and device that message pulls
CN109639564A (en) * 2018-12-12 2019-04-16 金瓜子科技发展(北京)有限公司 A kind of method, apparatus and computer readable storage medium obtaining offline message
CN110493107A (en) * 2017-11-23 2019-11-22 陕西迈诺通讯科技有限公司 A kind of information transmitting methods and system based on communication interface
US20200160618A1 (en) * 2010-10-21 2020-05-21 Subrao Venugopal Shenoy Methods and systems for creating online unified contact and communication management (cm) platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200160618A1 (en) * 2010-10-21 2020-05-21 Subrao Venugopal Shenoy Methods and systems for creating online unified contact and communication management (cm) platform
CN105337844A (en) * 2015-09-28 2016-02-17 北京金山安全软件有限公司 Method and device for displaying message and electronic equipment
CN110493107A (en) * 2017-11-23 2019-11-22 陕西迈诺通讯科技有限公司 A kind of information transmitting methods and system based on communication interface
CN109067910A (en) * 2018-09-13 2018-12-21 乐蜜有限公司 A kind of method and device that message pulls
CN109639564A (en) * 2018-12-12 2019-04-16 金瓜子科技发展(北京)有限公司 A kind of method, apparatus and computer readable storage medium obtaining offline message

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002137A (en) * 2022-08-03 2022-09-02 广州此声网络科技有限公司 Offline message processing method and device, computer equipment and storage medium
CN115002137B (en) * 2022-08-03 2022-10-21 广州此声网络科技有限公司 Offline message processing method and device, computer equipment and storage medium
CN115412520A (en) * 2022-09-04 2022-11-29 成都优啊网络科技有限公司 Method for storing, reading and writing interaction of Instant Messaging (IM) chat data
CN117061470A (en) * 2023-08-09 2023-11-14 中移互联网有限公司 Message pulling method, device and storage medium
CN117061470B (en) * 2023-08-09 2024-07-26 中移互联网有限公司 Message pulling method, device and storage medium

Similar Documents

Publication Publication Date Title
CN112333080A (en) Instant communication off-line message pushing method
CN110069354A (en) The full link trace method of micro services and micro services framework
EP2629452B1 (en) Method for displaying message and message display apparatus
CN111008246B (en) Database log synchronization method, device, computer equipment and readable storage medium
CN110555028A (en) data display method and device
CN106452819B (en) Data acquisition system and data acquisition method
US8959162B2 (en) Publisher-based message data cashing in a publish-subscription environment
CN112131338B (en) Method and device for establishing question-answer pairs
CN107832291B (en) Man-machine cooperation customer service method, electronic device and storage medium
CN106790454A (en) Deferred information method for pushing and device
CN111064638B (en) Method, device, equipment and storage medium for testing e-mail protocol service
US9185181B2 (en) Shared cache for potentially repetitive message data in a publish-subscription environment
CN108519948A (en) The automatic interface testing method and system of daily record driving
CN113315692B (en) Mail processing method and device combining RPA and AI and electronic equipment
US8898223B2 (en) System for high reliability and high performance application message delivery
CN104468248A (en) Service performance monitoring method, reverse proxy server, statistical analysis server and system
CN117874033A (en) Database sub-table method and device, electronic equipment and storage medium
CN102325051A (en) EoC (Ethernet Over Coax) network equipment management system and method based on simple network management protocol
CN107040455B (en) Instant message communication method and system based on redis
CN115878914A (en) Domain name matching method, device, equipment and storage medium
CN104125100A (en) Method for real-time monitoring of dashboards in communication network management
CN113411630A (en) Live broadcast hot behavior playback method
CN114328750A (en) Method and device for synchronizing service data with ODS (oxide dispersion strengthened) layer
CN112217712A (en) Message multi-terminal synchronization method and client
CN112433989A (en) System and method for automatically collecting e-mails based on web mode

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210205