[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118612175A - Offline message transmission method and device, electronic equipment and readable medium - Google Patents

Offline message transmission method and device, electronic equipment and readable medium Download PDF

Info

Publication number
CN118612175A
CN118612175A CN202410879997.6A CN202410879997A CN118612175A CN 118612175 A CN118612175 A CN 118612175A CN 202410879997 A CN202410879997 A CN 202410879997A CN 118612175 A CN118612175 A CN 118612175A
Authority
CN
China
Prior art keywords
message
client
version number
online
server
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
CN202410879997.6A
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202410879997.6A priority Critical patent/CN118612175A/en
Publication of CN118612175A publication Critical patent/CN118612175A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides an offline message transmission method, an offline message transmission device, electronic equipment and a readable medium. The method comprises the following steps: receiving and storing a message sent by any user through the client and a version number corresponding to the message; for any client, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client; searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier; and transmitting the target offline message to the client. Therefore, the synchronization of multiple clients of the message can be realized based on the version number of the message, and the information is stored locally at the client, so that a user can view the complete historical message at any client, and the use convenience of the user is improved.

Description

Offline message transmission method and device, electronic equipment and readable medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an offline message transmission method, an offline message transmission device, an electronic device, and a computer readable medium.
Background
With the rapid development of the mobile internet, the demand of people for instant messaging is increasing. In the environment where smart devices are popular today, users typically use multiple terminal devices, such as smartphones, tablets, computers, etc., to communicate. In the process of multi-terminal message roaming, the communication application generally has the problem of incomplete message synchronization. For example, after a user comes online with a replacement device, messages generated during use of other devices are not usually synchronized directly to the current device, resulting in missing history messages and poor user experience.
Disclosure of Invention
The embodiment of the invention provides an offline message transmission method, an offline message transmission device, electronic equipment and a computer readable storage medium, so as to solve the problem that historical messages may be missing.
The embodiment of the invention discloses an offline message transmission method which is applied to a server, wherein the server is in communication connection with at least one client, and the method comprises the following steps:
receiving and storing a message sent by any user through the client and a version number corresponding to the message;
For any client, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
Searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier;
And transmitting the target offline message to the client.
Optionally, the step of searching the message corresponding to the user identifier for the target offline message generated later than the message corresponding to the first version number based on the version number comprises
Searching a second version number of the latest message corresponding to the user identifier in the message stored by the server;
Comparing whether the first version number is identical to the second version number;
And if the first version number is different from the second version number, searching a target offline message generated later than the first version number corresponding message in the user identification corresponding message based on the version number.
Optionally, the message synchronization request also records a device identifier;
the method further comprises the steps of:
Creating a device presence table; the equipment online state table is used for recording the user identification of the user, and the equipment identification and online state of the client held by the user;
After the step of sending a message synchronization request to any one of the clients when the client is online is received, the method further includes:
And updating the online state of the client corresponding to the equipment identifier in the equipment online state table to be online based on the equipment identifier recorded in the message synchronization request.
Optionally, the method further comprises:
Under the condition that a message generated aiming at a target user is received, a version number update notification is sent to a target online client corresponding to the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
receiving a message synchronization request sent by the target online client based on the version number update notification;
and based on the message synchronization request, the message generated for the target user is issued to the target online client.
Optionally, the method further comprises:
establishing communication connection with an online client in a long connection form; the online client is a client with online state in the online state table of the equipment;
if the online state is detected to be the online client-side disconnection of communication, in the equipment online state table, updating the online state of the online client-side to be offline;
And stopping sending the version number update notification to the client with the offline online state.
Optionally, the step of sending the target offline message to the client includes:
Combining and compressing the target offline message to obtain a compressed offline message;
And transmitting the compressed offline message to the client.
The embodiment of the invention also provides an offline message transmission method which is applied to the client, wherein the client is in communication connection with the server, and the method comprises the following steps:
When the client is online, sending a message synchronization request to a server; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
Receiving a target offline message issued by a server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
Optionally, the message synchronization request also records a device identifier;
Optionally, the method further comprises:
receiving a version number update notification sent by a server under the condition that the online state of the client is online; the version number update notification is sent to a target online client corresponding to a target user; the target online client is a client with online state corresponding to the target user;
based on the version number update notification, sending a message synchronization request to the server;
And acquiring a message which is issued by the server and is generated aiming at the target user.
Optionally, after the client is online, the client establishes a communication connection with the server through a long connection form.
Optionally, the step of receiving the target offline message sent by the server includes:
receiving compressed offline messages issued by a server;
Decompressing the compressed offline message to obtain at least one item of marked offline message.
The embodiment of the invention also provides an offline message transmission system, which comprises a server and at least one client which is in communication connection with the server;
The server is used for receiving and storing the message sent by any user through the client and the version number corresponding to the message;
The client is used for sending a message synchronization request to the server when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The server is used for receiving the message synchronization request sent by the client, searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier, and sending the target offline message to the client;
The client is used for receiving the target offline message issued by the server.
Optionally, the server is specifically configured to search a second version number corresponding to the latest message in the messages stored in the server, compare whether the first version number is the same as the second version number, and if the first version number is different from the second version number, search, in the messages corresponding to the user identifier, a target offline message generated later than the messages corresponding to the first version number based on the version number.
Optionally, the message synchronization request also records a device identifier;
The server is specifically used for creating a device presence table; the device online state table is used for recording the user identification of the user, the device identification of the client held by the user and the online state, and based on the device identification recorded in the message synchronization request, the online state of the client corresponding to the device identification in the device online state table is updated to be online.
Optionally, the server is specifically configured to send a version number update notification to a target online client corresponding to a target user when receiving a message generated for the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
The target online client is specifically configured to receive a version number update notification sent by a server, and send a message synchronization request to the server based on the version number update notification;
The server is specifically configured to receive a message synchronization request sent by the target online client based on the version number update notification, and send the message generated for the target user to the target online client based on the message synchronization request.
The target online client is configured to receive the message generated for the target user.
Optionally, the client is used for establishing communication connection with the server through a long connection form after being on line;
The server is specifically configured to update, in the device presence state table, the presence state of the online client to offline if the online state is detected to be that the online client is disconnected from communication; stopping sending a version number update notification to the client with the offline online state; the online client is a client with online state in the online state table of the equipment.
Optionally, the server is specifically configured to combine and compress the target offline message to obtain a compressed offline message, and send the compressed offline message to the client;
The client is specifically configured to receive a compressed offline message sent by the server, and decompress the compressed offline message to obtain at least one item of marked offline message.
The embodiment of the invention also provides an offline message transmission device, which is applied to a server, wherein the server is in communication connection with at least one client, and the device comprises:
the message storage module is used for receiving and storing the message sent by any user through the client and the version number corresponding to the message;
The first synchronous request receiving module is used for receiving a message synchronous request sent by any client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The first offline message searching module is used for searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier;
And the message issuing module is used for issuing the target offline message to the client.
Optionally, the first offline message searching module comprises
The latest version number searching sub-module is used for searching a second version number of the latest message corresponding to the user identifier in the messages stored in the server;
A version number comparing sub-module for comparing whether the first version number is the same as the second version number;
And the offline message searching sub-module is used for searching a target offline message generated later than the corresponding message of the first version number based on the version number in the corresponding message of the user identification if the first version number is different from the second version number.
Optionally, the message synchronization request also records a device identifier;
The apparatus further comprises:
the state table creating module is used for creating an equipment online state table; the equipment online state table is used for recording the user identification of the user, and the equipment identification and online state of the client held by the user;
and the online state recording module is used for updating the online state of the client corresponding to the equipment identifier in the equipment online state table based on the equipment identifier recorded in the message synchronization request.
Optionally, the apparatus further comprises:
The version number update notification module is used for sending a version number update notification to a target online client corresponding to a target user under the condition that a message generated for the target user is received; the target online client is a client with online state corresponding to a target user in the equipment online state table;
the second synchronous request receiving module is used for receiving a message synchronous request sent by the target online client based on the version number update notification;
And the second offline message searching module is used for sending the message generated aiming at the target user to the target online client based on the message synchronization request.
Optionally, the apparatus further comprises:
The long connection establishment module is used for establishing communication connection with the online client in a long connection mode; the online client is a client with online state in the online state table of the equipment;
the online state updating module is used for updating the online state of the online client to be offline in the equipment online state table if the online state is detected to be the disconnection of communication of the online client;
And the notification stopping module is used for stopping sending the version number update notification to the client with the offline online state.
Optionally, the message issuing module includes:
The message compression sub-module is used for carrying out merging compression on the target offline message to obtain a compressed offline message;
And the compressed message issuing sub-module is used for issuing the compressed offline message to the client.
The embodiment of the invention also provides an offline message transmission device, which is applied to a client, wherein the client is in communication connection with a server, and the device comprises:
the first synchronous request sending module is used for sending a message synchronous request to a server when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
the first offline message receiving module is used for receiving the target offline message issued by the server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
Optionally, the message synchronization request also records a device identifier;
optionally, the apparatus further comprises:
The update notification receiving module is used for receiving a version number update notification sent by the server under the condition that the online state of the client is online; the version number update notification is sent to a target online client corresponding to a target user; the target online client is a client with online state corresponding to the target user;
the second synchronization request sending module is used for sending a message synchronization request to the server based on the version number update notification;
And the second offline message receiving module is used for acquiring the message which is issued by the server and is generated aiming at the target user.
Optionally, after the client is online, the client establishes a communication connection with the server through a long connection form.
Optionally, the first offline message receiving module includes:
the compressed message receiving sub-module is used for receiving the compressed offline message issued by the server;
and the decompression sub-module is used for decompressing the compressed offline message to obtain at least one item of marked offline message.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
The processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Embodiments of the invention also disclose one or more computer-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described in the embodiments of the invention.
The embodiment of the invention has the following advantages:
by the offline message transmission method provided by the embodiment of the invention, the message sent by any user through the client and the version number corresponding to the message are received and stored; for any client, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client; searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier; and transmitting the target offline message to the client. Therefore, the synchronization of multiple clients of the message can be realized based on the version number of the message, and the information is stored locally at the client, so that a user can view the complete historical message at any client, and the use convenience of the user is improved.
Drawings
FIG. 1 is a flow chart of steps of an offline message transmission method according to an embodiment of the present invention;
FIG. 2 is a flow chart of steps of another method for offline message transmission provided in an embodiment of the present invention;
fig. 3 is a flow chart of an offline message transmission method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another offline message transmission method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an offline message transmission system according to an embodiment of the present invention;
fig. 6 is a block diagram of an offline message transmission apparatus according to an embodiment of the present invention;
FIG. 7 is a block diagram of another offline message transmitting apparatus provided in an embodiment of the present invention;
FIG. 8 is a block diagram of an electronic device provided in an embodiment of the invention;
fig. 9 is a schematic diagram of a computer readable medium provided in an embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a flowchart of steps of an offline message transmission method provided in an embodiment of the present invention is shown, where the flowchart is applied to a server, and the server is communicatively connected to at least one client, and may specifically include the following steps:
Step 101, receiving and storing a message sent by any user through the client and a version number corresponding to the message;
The embodiment of the invention can realize the roaming of the message under the condition that the user uses multiple devices, and can store the message generated in the instant messaging service. Meanwhile, each message can also have a unique version number, and the version number can be distributed to the message by the server after the server obtains the message, and meanwhile, the version numbers are stored together.
In the process of using the instant messaging service, the user can send messages to other users through the client of the instant messaging service held by the user, and can also receive messages sent by other users through the client. The client can upload the message to be sent to the server, and the message is forwarded to the client of the corresponding user by the server. Thus, the server can receive the message sent by any user through the client. Thereafter, the server may generate unique version numbers for the messages, respectively, and store both the messages and the version numbers corresponding to the messages.
Step 102, for any one of the clients, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
For any client, if the user accesses the server through the client itself to obtain the instant messaging service, the client can be considered to log on. At this time, in the offline process from the last online of the client to the current online login, the user may access the instant messaging service through other clients, receive and/or send the message, and the client is in an offline state, and does not acquire the information, so that the history message is missing. In order to acquire the missing history message, the client may send a message synchronization request to the server when the client is online, so as to request to acquire a message generated in an offline process.
In particular, the message synchronization request may be documented with a user identification so that the server may look up a message generated for the user based on the user identification, including a message sent to the user, as well as a message sent by the user.
The message synchronization request may record a first version number of a latest message stored locally by the client to inform the server of the latest message currently stored by the client, facilitating the server to determine a missing message for the client.
Step 103, searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier;
in a specific implementation, the message may be associated with a user identification. If the message is a message sent by a user or a message received by the user, the message may be associated with a user identification of the user. Therefore, the server can search the message generated for the user according to the user identification as the message corresponding to the user identification. The messages can form a message queue which is arranged according to time sequence based on the version numbers, therefore, the server can search the messages which are generated later than the messages corresponding to the first version numbers in the messages corresponding to the user identification based on the version numbers, namely, the messages which are not synchronized to the client in the offline process of the client, so as to obtain the target offline messages.
And 104, transmitting the target offline message to the client.
And then, the target offline message can be issued to the client, so that the client can acquire the message generated by the user in the offline process, and multi-terminal synchronization of the message is realized. The client can store the message locally, and even if the server subsequently deletes the stored message, the client can retain the user's message, so that the user can view his history message on any client.
By the offline message transmission method provided by the embodiment of the invention, the message sent by any user through the client and the version number corresponding to the message are received and stored; for any client, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client; searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier; and transmitting the target offline message to the client. Therefore, the synchronization of multiple clients of the message can be realized based on the version number of the message, and the information is stored locally at the client, so that a user can view the complete historical message at any client, and the use convenience of the user is improved.
In one embodiment of the present invention, the step of searching for the target offline message generated later than the first version number corresponding message in the messages corresponding to the user identification based on the version number comprises
S11, searching a second version number of the latest message corresponding to the user identifier in the message stored by the server;
In particular implementations, the server may confirm whether the client has an unsynchronized offline message. Thus, the server may first look up the second version number of the latest message to which the user identification corresponds from among the messages it stores.
In a specific implementation, the server may store the version numbers corresponding to the user identifiers in time sequence. For example, the information in the version number may be associated with time, so that the server may sort it by time directly based on the information in the version number associated with time. For another example, when the server stores a message, the server may further record a timestamp corresponding to the message, and then the server may sort the version numbers by time based on the timestamp of the version number corresponding to the message.
Then, due to the one-to-one correspondence between the messages and the version numbers, the version number with the latest time is generated in the version numbers in time sequence, namely the version number corresponding to the latest message is used as the user identifier, and the version number is used as the second version number.
S12, comparing whether the first version number is the same as the second version number;
Thereafter, the first version and the second version numbers may be compared to determine whether the message locally stored at the client has been synchronized with the message stored at the server. If the first version is the same as the second version, the client can be considered that no new message is generated in the offline process, and at the moment, the message stored locally by the client is the same as the message stored by the server, and the client and the server are in a synchronized state, so that no offline message needs to be acquired. If the first version is different from the second version, the client can be considered to generate a new message in the offline process, and the message stored locally by the client is different from the message stored by the server, so that the client needs to acquire the offline message to synchronize with the server.
And S13, if the first version number is different from the second version number, searching a target offline message generated later than the first version number corresponding message in the user identification corresponding message based on the version number.
If the first version number is different from the second version number, the client needs to acquire the message generated in the offline process. Specifically, the messages corresponding to the user identifiers may also be arranged according to a time sequence, and the server may determine the messages corresponding to the first version number first, and use the messages with a time sequence later than that of the messages corresponding to the first version number as the messages to be synchronized, so as to obtain the target offline message. The server may determine a target version number generated later than the first version number among the version numbers arranged in time sequence, and extract a corresponding message based on the target version number to obtain a target offline message.
In addition, the message synchronization request may also have a time stamp of the sending request time, so that the server processes the message synchronization request from at least one client according to the actual requirement and in time sequence.
In one embodiment of the present invention, the message synchronization request further records a device identifier;
the method further comprises the steps of:
S21, creating a device online state table; the equipment online state table is used for recording the user identification of the user, and the equipment identification and online state of the client held by the user;
In a specific implementation, in order to better manage multiple clients of a user, synchronization of messages is enabled to be more real-time and accurate. Whether the client of the user is online or not can be managed. Thus, a device presence table is possible. The device presence table may record a user identifier of a user, and a device identifier of a client held by the user, and may record a presence of the client.
After the step of sending a message synchronization request to any one of the clients when the client is online is received, the method further includes:
And S31, based on the equipment identification recorded in the message synchronization request, updating the online state of the client corresponding to the equipment identification in the equipment online state table to be online.
In the event that a message synchronization request sent when a client comes online is received, the server may determine that the client is going from offline to online. Therefore, the server can acquire the equipment identification recorded in the message synchronization request, and update the online state of the equipment identification corresponding to the client in the online state table of the equipment to be online, so that the equipment in the online state can be managed later.
Optionally, the method further comprises:
S41, under the condition that a message generated for a target user is received, a version number update notification is sent to a target online client corresponding to the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
Specifically, for a target user, if the server receives a message generated for the target user, that is, a message sent by the target user, or the target user receives a message sent by another user. In order to keep the information synchronization of a plurality of online clients, the client corresponding to the target user can be searched in the online state table of the device, and the client with online state is extracted from the client corresponding to the target user as the target online client. And sending a version number update notification to the target online client to inform the current online client that an updated message exists.
S42, receiving a message synchronization request sent by the target online client based on the version number update notification;
For the target online client, after receiving the version number update notification, the target online client may request the server to issue the latest message, so that the target online client may generate a message synchronization request in response to the version number update notification. The message synchronization request may be similar to a message synchronization request sent on-line, in which a user identifier is recorded, and a first version number of a latest message stored locally by the client, so that the server searches for an offline message that is not synchronized by the client.
S43, based on the message synchronization request, the message generated for the target user is issued to the target online client.
The server may search for a message generated for the user according to the user identifier, as a message corresponding to the user identifier. The messages can form a message queue which is arranged according to time sequence based on the version numbers, therefore, the server can search the messages generated later than the messages corresponding to the first version numbers in the messages corresponding to the user identifications based on the version numbers, obtain updated messages generated aiming at the target users, and send the messages generated aiming at the target users to the target online clients, so that the synchronization of the messages is realized.
Alternatively, the message may have a read status, which may include read and unread. When the message generated for the target user is issued to the target online client, the reading state of the message can be further issued. If the user has read the message at a certain client, the reading state of the message is changed from unread to read, the client can send the read state of the message to the server, and the server can further synchronize the read state to other online clients of the user, so that the real-time performance of the message synchronization is further improved.
In one embodiment of the invention, the method further comprises:
s51, establishing communication connection with an online client in a long connection mode; the online client is a client with online state in the online state table of the equipment;
In particular, to more efficiently transfer messages, a communication connection is established between a server and an online client by way of a long connection. For example, a long connection between a server and an online client may be established through WebSocket protocol. Thus, clients in the device presence table whose presence is online can always remain in communication with the server.
S52, if the online state is detected to be that the online client is disconnected from communication, updating the online state of the online client to be offline in the equipment online state table;
If the client is offline, i.e. changes from online to offline, the client may be disconnected from the server. Thus, the server can detect whether the client with the online state is disconnected from the communication connection, so as to confirm whether the client is offline. If the client with the online state being online is detected to disconnect the communication connection, the client can be considered to be offline, and the online state needs to be converted into offline. The server may update the presence status of the presence client to offline in the device presence status table.
And S53, stopping sending the version number update notification to the client with the offline online state.
Because the offline client can no longer need real-time synchronous information, the server can stop sending the version number update notification to the client with the offline online state, thereby avoiding wasting processing resources.
Optionally, the step of sending the target offline message to the client includes:
s61, merging and compressing the target offline message to obtain a compressed offline message;
in a specific implementation, if the client is not online for a long time, a large number of unsynchronized offline messages may be generated, and if the offline messages are directly issued to the client one by one, the client may be blocked, and at the same time, processing resources of the server may be wasted. For this purpose, the target offline message may be first combined and compressed before being delivered, so that at least one of the target offline messages is compressed into a data packet, resulting in a compressed offline message.
And S62, the compressed offline message is issued to the client.
And then, the server can send the compressed offline message to the client, so that the network transmission time and the user traffic consumption can be reduced, and the transmission efficiency of the message can be improved.
Referring to fig. 2, a flowchart of steps of an offline message transmission method provided in an embodiment of the present invention is shown, where the offline message transmission method is applied to a client, and the client is communicatively connected to a server, where the method specifically may include the following steps:
Step 201, when the client is online, sending a message synchronization request to a server; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The embodiment of the invention can realize the roaming of the message under the condition that the user uses multiple devices, and can store the message generated in the instant messaging service. Meanwhile, each message can also have a unique version number, and the version number can be distributed to the message by the server after the server obtains the message, and meanwhile, the version numbers are stored together.
In the process of using the instant messaging service, the user can send messages to other users through the client of the instant messaging service held by the user, and can also receive messages sent by other users through the client. The client can upload the message to be sent to the server, and the message is forwarded to the client of the corresponding user by the server. Thus, the server can receive the message sent by any user through the client. Thereafter, the server may generate unique version numbers for the messages, respectively, and store both the messages and the version numbers corresponding to the messages.
For any client, if the user accesses the server through the client itself to obtain the instant messaging service, the client can be considered to log on. At this time, in the offline process from the last online of the client to the current online login, the user may access the instant messaging service through other clients, receive and/or send the message, and the client is in an offline state, and does not acquire the information, so that the history message is missing. In order to acquire the missing history message, the client may send a message synchronization request to the server when the client is online, so as to request to acquire a message generated in an offline process.
In particular, the message synchronization request may be documented with a user identification so that the server may look up a message generated for the user based on the user identification, including a message sent to the user, as well as a message sent by the user.
The message synchronization request may record a first version number of a latest message stored locally by the client to inform the server of the latest message currently stored by the client, facilitating the server to determine a missing message for the client.
Step 202, receiving a target offline message issued by a server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
In a specific implementation, the message may be associated with a user identification. If the message is a message sent by a user or a message received by the user, the message may be associated with a user identification of the user. Therefore, the server can search the message generated for the user according to the user identification as the message corresponding to the user identification. The messages can form a message queue which is arranged according to time sequence based on the version numbers, therefore, the server can search the messages which are generated later than the messages corresponding to the first version numbers in the messages corresponding to the user identification based on the version numbers, namely, the messages which are not synchronized to the client in the offline process of the client, so as to obtain the target offline messages.
And then, the target offline message can be issued to the client, so that the client can acquire the message generated by the user in the offline process, and multi-terminal synchronization of the message is realized. The client can store the message locally, and even if the server subsequently deletes the stored message, the client can retain the user's message, so that the user can view his history message on any client.
According to the offline message transmission method provided by the embodiment of the invention, when the client is online, a message synchronization request is sent to a server; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client; receiving a target offline message issued by a server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server. Therefore, the synchronization of multiple clients of the message can be realized based on the version number of the message, and the information is stored locally at the client, so that a user can view the complete historical message at any client, and the use convenience of the user is improved.
In one embodiment of the present invention, the message synchronization request further records a device identifier. The server can update the online state of the device identifier corresponding to the client to online in the online state table of the device according to the device identifier, so that the device in the online state can be managed later.
In one embodiment of the present invention, the method further comprises:
Receiving a version number update notification sent by a server under the condition that the online state of the client is online; the version number update notification is sent to a target online client corresponding to a target user; the target online client is a client with online state corresponding to the target user; based on the version number update notification, sending a message synchronization request to the server; and acquiring a message which is issued by the server and is generated aiming at the target user.
Specifically, for a target user, if the server receives a message generated for the target user, that is, a message sent by the target user, or the target user receives a message sent by another user. In order to keep the information synchronization of a plurality of online clients, the client corresponding to the target user can be searched in the online state table of the device, the online state of the client corresponding to the target user is extracted, and a version number update notification is sent to inform the current online client of the updated information.
And under the condition that the online state of the client is online, the version number update notification sent by the server can be received. Thereafter, the client may generate a message synchronization request in response to the version number update notification. The message synchronization request may be similar to a message synchronization request sent on-line, in which a user identifier is recorded, and a first version number of a latest message stored locally by the client, so that the server searches for an offline message that is not synchronized by the client.
The server may search for a message generated for the user according to the user identifier, as a message corresponding to the user identifier. The messages can form a message queue which is arranged according to time sequence based on the version numbers, therefore, the server can search the messages generated later than the messages corresponding to the first version numbers in the messages corresponding to the user identifications based on the version numbers, obtain updated messages generated aiming at the target users, and send the messages generated aiming at the target users to the client side, so that the synchronization of the messages is realized.
In one embodiment of the present invention, the client establishes a communication connection with the server through a long connection after being online.
In particular, to more efficiently transfer messages, a communication connection is established between a server and an online client by way of a long connection. Meanwhile, the server can also determine whether the client is still online according to whether the communication connection is disconnected or not.
In one embodiment of the present invention, the step of receiving the target offline message sent by the server includes:
Receiving compressed offline messages issued by a server; decompressing the compressed offline message to obtain at least one item of marked offline message.
In a specific implementation, if the client is not online for a long time, a large number of unsynchronized offline messages may be generated, and if the offline messages are directly issued to the client one by one, the client may be blocked, and at the same time, processing resources of the server may be wasted. For this purpose, before the target offline message is issued, the target offline message may be first combined and compressed, so that at least one of the target offline messages is compressed into a data packet, and the compressed offline message is obtained and issued to the client.
After obtaining the compressed offline message, the client can decompress the compressed offline message to obtain at least one unsynchronized target offline message, thereby realizing the synchronization of the messages.
As a specific example of the present invention, fig. 3 is a schematic flow chart of an offline message transmission method provided in an embodiment of the present invention.
Step 1: the equipment 4 held by the user B is online, and a message synchronization request is sent to a gateway of the server;
step 2: the server updates the device presence table based on the device identification described in the message synchronization request, and updates the presence of the device 4 of the user B to online.
Step 3: the business logic processing module in the server inquires a message generated later than a message corresponding to the first version number in the stored offline message based on the first version number recorded in the message synchronization request, and the message is used as a target offline message;
step 4: the server pushes the target offline message to the client 4 of the user B through the gateway, thereby completing the message synchronization of the client 4 of the user B.
As a specific example of the present invention, fig. 4 is a schematic flow chart of another offline message transmission method provided in an embodiment of the present invention.
Step 1: user a may send a message to user B via the client, thereby sending the message to the server.
Step 2: after the server obtains the message sent by the user a, the version number in the sequence of the user B can be updated in the version number service provided by the server, and the version number corresponding to the message sent by the user a is written into the sequence of the user B.
Step 3: the server may store the offline message sent by user a to user B in an offline message storage module in the server. And simultaneously storing the message and the version number corresponding to the message.
Step 4: after the user B is online through the client, the client can send a message synchronization request to the server, wherein the message synchronization request carries the latest version number stored locally by the client;
Step 5: the server compares the latest version number locally stored by the client with the latest version number stored in the user B sequence to determine whether the version numbers between the server and the two ends of the client are the same.
Step 6: if the version numbers between the server and the two ends of the client are different, a target offline message generated later than the latest version number corresponding message stored locally in the client and the version number corresponding to the target offline message are acquired from the offline message storage.
Step7: and the server pushes the target offline message and the version number corresponding to the target offline message to the client of the user B, so that the synchronization of the offline message is completed.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 5, there is shown a schematic structural diagram of an offline message transmission system according to an embodiment of the present invention, where the offline message transmission system includes a server 501 and at least one client 502 communicatively connected to the server;
the server 501 is configured to receive and store a message sent by an arbitrary user through the client, and a version number corresponding to the message;
The client 502 is configured to send a message synchronization request to a server when online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The server 501 is configured to receive a message synchronization request sent by the client, search, in a message corresponding to the user identifier, a target offline message generated later than a message corresponding to the first version number based on the version number, and send the target offline message to the client;
the client 502 is configured to receive a target offline message sent by a server.
Optionally, the server is specifically configured to search a second version number corresponding to the latest message in the messages stored in the server, compare whether the first version number is the same as the second version number, and if the first version number is different from the second version number, search, in the messages corresponding to the user identifier, a target offline message generated later than the messages corresponding to the first version number based on the version number.
Optionally, the message synchronization request also records a device identifier;
The server is specifically used for creating a device presence table; the device online state table is used for recording the user identification of the user, the device identification of the client held by the user and the online state, and based on the device identification recorded in the message synchronization request, the online state of the client corresponding to the device identification in the device online state table is updated to be online.
Optionally, the server is specifically configured to send a version number update notification to a target online client corresponding to a target user when receiving a message generated for the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
The target online client is specifically configured to receive a version number update notification sent by a server, and send a message synchronization request to the server based on the version number update notification;
The server is specifically configured to receive a message synchronization request sent by the target online client based on the version number update notification, and send the message generated for the target user to the target online client based on the message synchronization request.
The target online client is configured to receive the message generated for the target user.
Optionally, the client is used for establishing communication connection with the server through a long connection form after being on line;
The server is specifically configured to update, in the device presence state table, the presence state of the online client to offline if the online state is detected to be that the online client is disconnected from communication; stopping sending a version number update notification to the client with the offline online state; the online client is a client with online state in the online state table of the equipment.
Optionally, the server is specifically configured to combine and compress the target offline message to obtain a compressed offline message, and send the compressed offline message to the client;
The client is specifically configured to receive a compressed offline message sent by the server, and decompress the compressed offline message to obtain at least one item of marked offline message.
Referring to fig. 6, there is shown a block diagram of an offline message transmission apparatus according to an embodiment of the present invention, where the block diagram is applied to a server, and the server is communicatively connected to at least one client, and the apparatus may specifically include the following modules:
A message storage module 601, configured to receive and store a message sent by an arbitrary user through the client, and a version number corresponding to the message;
A first synchronization request receiving module 602, configured to, for any one of the clients, receive a message synchronization request sent when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
A first offline message searching module 603, configured to search, in the messages corresponding to the user identities, a target offline message generated later than the messages corresponding to the first version number based on the version number;
and a message issuing module 604, configured to issue the target offline message to the client.
Optionally, the first offline message searching module comprises
The latest version number searching sub-module is used for searching a second version number of the latest message corresponding to the user identifier in the messages stored in the server;
A version number comparing sub-module for comparing whether the first version number is the same as the second version number;
And the offline message searching sub-module is used for searching a target offline message generated later than the corresponding message of the first version number based on the version number in the corresponding message of the user identification if the first version number is different from the second version number.
Optionally, the message synchronization request also records a device identifier;
The apparatus further comprises:
the state table creating module is used for creating an equipment online state table; the equipment online state table is used for recording the user identification of the user, and the equipment identification and online state of the client held by the user;
and the online state recording module is used for updating the online state of the client corresponding to the equipment identifier in the equipment online state table based on the equipment identifier recorded in the message synchronization request.
Optionally, the apparatus further comprises:
The version number update notification module is used for sending a version number update notification to a target online client corresponding to a target user under the condition that a message generated for the target user is received; the target online client is a client with online state corresponding to a target user in the equipment online state table;
the second synchronous request receiving module is used for receiving a message synchronous request sent by the target online client based on the version number update notification;
And the second offline message searching module is used for sending the message generated aiming at the target user to the target online client based on the message synchronization request.
Optionally, the apparatus further comprises:
The long connection establishment module is used for establishing communication connection with the online client in a long connection mode; the online client is a client with online state in the online state table of the equipment;
the online state updating module is used for updating the online state of the online client to be offline in the equipment online state table if the online state is detected to be the disconnection of communication of the online client;
And the notification stopping module is used for stopping sending the version number update notification to the client with the offline online state.
Optionally, the message issuing module includes:
The message compression sub-module is used for carrying out merging compression on the target offline message to obtain a compressed offline message;
And the compressed message issuing sub-module is used for issuing the compressed offline message to the client.
Referring to fig. 7, there is shown a block diagram of another offline message transmission apparatus according to an embodiment of the present invention, which is applied to a client, and the client is communicatively connected to a server. The device specifically comprises the following modules:
a first synchronization request sending module 701, configured to send a message synchronization request to a server when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
A first offline message receiving module 702, configured to receive a target offline message sent by a server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
Optionally, the message synchronization request also records a device identifier;
optionally, the apparatus further comprises:
The update notification receiving module is used for receiving a version number update notification sent by the server under the condition that the online state of the client is online; the version number update notification is sent to a target online client corresponding to a target user; the target online client is a client with online state corresponding to the target user;
the second synchronization request sending module is used for sending a message synchronization request to the server based on the version number update notification;
And the second offline message receiving module is used for acquiring the message which is issued by the server and is generated aiming at the target user.
Optionally, after the client is online, the client establishes a communication connection with the server through a long connection form.
Optionally, the first offline message receiving module includes:
the compressed message receiving sub-module is used for receiving the compressed offline message issued by the server;
and the decompression sub-module is used for decompressing the compressed offline message to obtain at least one item of marked offline message.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In addition, the embodiment of the invention also provides an electronic device, as shown in fig. 8, which comprises a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802 and the memory 803 complete communication with each other through the communication bus 804,
A memory 803 for storing a computer program;
the processor 801, when executing the program stored in the memory 803, implements the following steps:
receiving and storing a message sent by any user through the client and a version number corresponding to the message;
For any client, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
Searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier;
And transmitting the target offline message to the client.
Optionally, the step of searching the message corresponding to the user identifier for the target offline message generated later than the message corresponding to the first version number based on the version number comprises
Searching a second version number of the latest message corresponding to the user identifier in the message stored by the server;
Comparing whether the first version number is identical to the second version number;
And if the first version number is different from the second version number, searching a target offline message generated later than the first version number corresponding message in the user identification corresponding message based on the version number.
Optionally, the message synchronization request also records a device identifier;
the method further comprises the steps of:
Creating a device presence table; the equipment online state table is used for recording the user identification of the user, and the equipment identification and online state of the client held by the user;
After the step of sending a message synchronization request to any one of the clients when the client is online is received, the method further includes:
And updating the online state of the client corresponding to the equipment identifier in the equipment online state table to be online based on the equipment identifier recorded in the message synchronization request.
Optionally, the method further comprises:
Under the condition that a message generated aiming at a target user is received, a version number update notification is sent to a target online client corresponding to the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
receiving a message synchronization request sent by the target online client based on the version number update notification;
and based on the message synchronization request, the message generated for the target user is issued to the target online client.
Optionally, the method further comprises:
establishing communication connection with an online client in a long connection form; the online client is a client with online state in the online state table of the equipment;
if the online state is detected to be the online client-side disconnection of communication, in the equipment online state table, updating the online state of the online client-side to be offline;
And stopping sending the version number update notification to the client with the offline online state.
Optionally, the step of sending the target offline message to the client includes:
Combining and compressing the target offline message to obtain a compressed offline message;
And transmitting the compressed offline message to the client.
The processor 801, when executing the program stored in the memory 803, further performs the following steps:
When the client is online, sending a message synchronization request to a server; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
Receiving a target offline message issued by a server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
Optionally, the message synchronization request also records a device identifier;
Optionally, the method further comprises:
receiving a version number update notification sent by a server under the condition that the online state of the client is online; the version number update notification is sent to a target online client corresponding to a target user; the target online client is a client with online state corresponding to the target user;
based on the version number update notification, sending a message synchronization request to the server;
And acquiring a message which is issued by the server and is generated aiming at the target user.
Optionally, after the client is online, the client establishes a communication connection with the server through a long connection form.
Optionally, the step of receiving the target offline message sent by the server includes:
receiving compressed offline messages issued by a server;
Decompressing the compressed offline message to obtain at least one item of marked offline message.
The embodiment of the invention also provides an offline message transmission system, which comprises a server and at least one client which is in communication connection with the server;
The server is used for receiving and storing the message sent by any user through the client and the version number corresponding to the message;
The client is used for sending a message synchronization request to the server when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The server is used for receiving the message synchronization request sent by the client, searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier, and sending the target offline message to the client;
The client is used for receiving the target offline message issued by the server.
Optionally, the server is specifically configured to search a second version number corresponding to the latest message in the messages stored in the server, compare whether the first version number is the same as the second version number, and if the first version number is different from the second version number, search, in the messages corresponding to the user identifier, a target offline message generated later than the messages corresponding to the first version number based on the version number.
Optionally, the message synchronization request also records a device identifier;
The server is specifically used for creating a device presence table; the device online state table is used for recording the user identification of the user, the device identification of the client held by the user and the online state, and based on the device identification recorded in the message synchronization request, the online state of the client corresponding to the device identification in the device online state table is updated to be online.
Optionally, the server is specifically configured to send a version number update notification to a target online client corresponding to a target user when receiving a message generated for the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
The target online client is specifically configured to receive a version number update notification sent by a server, and send a message synchronization request to the server based on the version number update notification;
The server is specifically configured to receive a message synchronization request sent by the target online client based on the version number update notification, and send the message generated for the target user to the target online client based on the message synchronization request.
The target online client is configured to receive the message generated for the target user.
Optionally, the client is used for establishing communication connection with the server through a long connection form after being on line;
The server is specifically configured to update, in the device presence state table, the presence state of the online client to offline if the online state is detected to be that the online client is disconnected from communication; stopping sending a version number update notification to the client with the offline online state; the online client is a client with online state in the online state table of the equipment.
Optionally, the server is specifically configured to combine and compress the target offline message to obtain a compressed offline message, and send the compressed offline message to the client;
The client is specifically configured to receive a compressed offline message sent by the server, and decompress the compressed offline message to obtain at least one item of marked offline message.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment provided by the present invention, as shown in fig. 9, there is further provided a computer-readable storage medium 901 having instructions stored therein, which when run on a computer, cause the computer to perform the offline message transmission method described in the above embodiment.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the offline message transmission method described in the above embodiment.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (12)

1. An offline message transmission method, characterized in that it is applied to a server, said server being communicatively connected to at least one client, said method comprising:
receiving and storing a message sent by any user through the client and a version number corresponding to the message;
For any client, receiving a message synchronization request sent by the client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
Searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier;
And transmitting the target offline message to the client.
2. The method of claim 1, wherein the step of looking up the target offline message generated later than the first version number corresponding message in the user identification corresponding message based on version number comprises
Searching a second version number of the latest message corresponding to the user identifier in the message stored by the server;
Comparing whether the first version number is identical to the second version number;
And if the first version number is different from the second version number, searching a target offline message generated later than the first version number corresponding message in the user identification corresponding message based on the version number.
3. The method of claim 1, wherein the message synchronization request further records a device identification;
the method further comprises the steps of:
Creating a device presence table; the equipment online state table is used for recording the user identification of the user, and the equipment identification and online state of the client held by the user;
After the step of sending a message synchronization request to any one of the clients when the client is online is received, the method further includes:
And updating the online state of the client corresponding to the equipment identifier in the equipment online state table to be online based on the equipment identifier recorded in the message synchronization request.
4. A method according to claim 3, characterized in that the method further comprises:
Under the condition that a message generated aiming at a target user is received, a version number update notification is sent to a target online client corresponding to the target user; the target online client is a client with online state corresponding to a target user in the equipment online state table;
receiving a message synchronization request sent by the target online client based on the version number update notification;
and based on the message synchronization request, the message generated for the target user is issued to the target online client.
5. A method according to claim 3, characterized in that the method further comprises:
establishing communication connection with an online client in a long connection form; the online client is a client with online state in the online state table of the equipment;
if the online state is detected to be the online client-side disconnection of communication, in the equipment online state table, updating the online state of the online client-side to be offline;
And stopping sending the version number update notification to the client with the offline online state.
6. The method of claim 1, wherein the step of delivering the target offline message to the client comprises:
Combining and compressing the target offline message to obtain a compressed offline message;
And transmitting the compressed offline message to the client.
7. An offline message transmission method, characterized in that it is applied to a client, said client being communicatively connected to a server, said method comprising:
When the client is online, sending a message synchronization request to a server; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
Receiving a target offline message issued by a server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
8. An offline message transmission system, characterized in that it comprises a server and at least one client in communication with said server;
The server is used for receiving and storing the message sent by any user through the client and the version number corresponding to the message;
The client is used for sending a message synchronization request to the server when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The server is used for receiving the message synchronization request sent by the client, searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier, and sending the target offline message to the client;
The client is used for receiving the target offline message issued by the server.
9. An offline message transmission device, characterized in that it is applied to a server, said server being communicatively connected to at least one client, said device comprising:
the message storage module is used for receiving and storing the message sent by any user through the client and the version number corresponding to the message;
The first synchronous request receiving module is used for receiving a message synchronous request sent by any client when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
The first offline message searching module is used for searching a target offline message generated later than the message corresponding to the first version number based on the version number in the message corresponding to the user identifier;
And the message issuing module is used for issuing the target offline message to the client.
10. An offline message transmission device, characterized in that it is applied to a client, said client being communicatively connected to a server, said device comprising:
the first synchronous request sending module is used for sending a message synchronous request to a server when the client is online; the message synchronization request records a user identification and a first version number of the latest message stored locally by the client;
the first offline message receiving module is used for receiving the target offline message issued by the server; and the target offline message is a message generated later than the message corresponding to the first version number in the messages corresponding to the user identification stored in the server.
11. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
The processor is configured to implement the method according to any one of claims 1-7 when executing a program stored on a memory.
12. A computer-readable medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any of claims 1-7.
CN202410879997.6A 2024-07-02 2024-07-02 Offline message transmission method and device, electronic equipment and readable medium Pending CN118612175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410879997.6A CN118612175A (en) 2024-07-02 2024-07-02 Offline message transmission method and device, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410879997.6A CN118612175A (en) 2024-07-02 2024-07-02 Offline message transmission method and device, electronic equipment and readable medium

Publications (1)

Publication Number Publication Date
CN118612175A true CN118612175A (en) 2024-09-06

Family

ID=92563120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410879997.6A Pending CN118612175A (en) 2024-07-02 2024-07-02 Offline message transmission method and device, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN118612175A (en)

Similar Documents

Publication Publication Date Title
EP2783501B1 (en) Contact information synchronization system and method
CN111405042B (en) Electronic device discovery method and device, storage medium and electronic device
CN103501486A (en) Message pushing method and pushing server
US10263937B2 (en) Automated message recall from a sender's device
CN110391974A (en) A kind of message synchronization method, server-side, terminal and system
CN110311855B (en) User message processing method and device, electronic equipment and storage medium
CN111277483B (en) Multi-terminal message synchronization method, server and storage medium
EP2974159B1 (en) Method, device and system for voice communication
CN103716230A (en) Message sending method, device and server
KR20160026138A (en) Rapid sync method for cloud file system and cloud file system using the same
WO2015198124A1 (en) System and method for transferring and synchronizing content between electronic devices
CN112865927B (en) Message delivery verification method, device, computer equipment and storage medium
CN112838980A (en) Message processing method, system, device, electronic equipment and storage medium
US11171868B2 (en) Systems and methods for centrally-assisted distributed hash table
CN118612175A (en) Offline message transmission method and device, electronic equipment and readable medium
CN113612811B (en) Method, system, equipment and medium for client mounting in multiple channels
CN104468767A (en) Method and system for detecting cloud storage data collision
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN111953580B (en) Method, device and storage medium for sending and acquiring session
CN114338794A (en) Service message pushing method and device, electronic equipment and storage medium
CN110134547B (en) Middleware-based repeated data deleting method and related device
KR101529162B1 (en) System of providing synchronization information and method thereof
CN115460226A (en) Data synchronization management system, method, equipment, medium and product
CN112312094B (en) Method and device for processing media information, storage medium and electronic device
CN113612676B (en) Social group message synchronization method, device, equipment and storage medium

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